1 | ## |
---|
2 | ## $Id$ |
---|
3 | ## |
---|
4 | |
---|
5 | ## NOTE: This Makefile.am applies automake compilation rules and does not |
---|
6 | ## apply RTEMS's compilation rules. |
---|
7 | |
---|
8 | AUTOMAKE_OPTIONS = foreign no-exeext 1.5 |
---|
9 | |
---|
10 | VPATH = @srcdir@:@srcdir@/../../shared/bootloader:@srcdir@/../../shared/console |
---|
11 | |
---|
12 | noinst_PROGRAMS = bootloader.o |
---|
13 | |
---|
14 | bootloader_o_SOURCES = misc.c pci.c zlib.c mm.c em86.c polled_io.c lib.c |
---|
15 | bootloader_o_SOURCES += bootldr.h zlib.h pci.h keyboard.h |
---|
16 | bootloader_o_SOURCES += head.S exception.S em86real.S |
---|
17 | |
---|
18 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
19 | |
---|
20 | NM = @NM@ |
---|
21 | LD = @LD@ |
---|
22 | |
---|
23 | # ---- |
---|
24 | ## Custom compilation vars, stripped versions of what is used in |
---|
25 | ## automake/compile.am and by automake-1.5's standard rules. |
---|
26 | COMPILE = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) |
---|
27 | ASCOMPILE = $(CC) $(AM_ASFLAGS) |
---|
28 | CCLD = $(CC) |
---|
29 | LINK = $(CCLD) $(AM_CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ |
---|
30 | |
---|
31 | # ---- |
---|
32 | DEFAULT_INCLUDES = |
---|
33 | |
---|
34 | AM_CPPFLAGS = -D__BOOT__ -DDEBUG |
---|
35 | AM_CFLAGS = \ |
---|
36 | $(GCC_SPECS) -specs bsp_specs -qrtems -mrelocatable \ |
---|
37 | -msoft-float -mstrict-align -fno-builtin -Wall -mmultiple \ |
---|
38 | -mstring -O2 -fomit-frame-pointer -ffixed-r13 -mno-sdata \ |
---|
39 | $(CPU_CFLAGS) |
---|
40 | AM_ASFLAGS = $(INCLUDES) $(AM_CPPFLAGS) \ |
---|
41 | $(GCC_SPECS) -specs bsp_specs -qrtems -mrelocatable \ |
---|
42 | -DASM $(CPU_CFLAGS) |
---|
43 | |
---|
44 | # |
---|
45 | # CAUTION : |
---|
46 | # |
---|
47 | # As we use very specific compilation options in this directory |
---|
48 | # we shall not use any other code. This includes the newlib libc.a |
---|
49 | # as well as other code located in .o files in mcp750 directory. |
---|
50 | # |
---|
51 | # NEVER remove lib.c. You have been warned... |
---|
52 | # |
---|
53 | bootloader.o: $(bootloader_o_OBJECTS) |
---|
54 | $(LD) -r -o $@ $(bootloader_o_OBJECTS) |
---|
55 | $(NM) $@ | grep ' U ' |
---|
56 | @echo "Every symbol listed should be defined in @srcdir@/ppcboot.lds" |
---|
57 | |
---|
58 | # FIXME: We might want to apply this in future. |
---|
59 | # ppcbootdir = $(exec_prefix)/@RTEMS_BSP@/lib |
---|
60 | # ppcboot_DATA = bootloader.o |
---|
61 | # ppcboot_DATA += ../../shared/bootloader/ppcboot.lds |
---|
62 | |
---|
63 | # FIXME: Tmp-install stuff to make mcp750.cfg's make-exe happy. |
---|
64 | # As mcp750.cfg's make-exe doesn't work outside of the source-tree. |
---|
65 | # We might consider to use this directory directly for in-source-tree |
---|
66 | # building, instead. |
---|
67 | $(PROJECT_RELEASE)/lib/%: % |
---|
68 | $(INSTALL_DATA) $< $@ |
---|
69 | |
---|
70 | TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib/bootloader.o \ |
---|
71 | $(PROJECT_RELEASE)/lib/ppcboot.lds |
---|
72 | |
---|
73 | all-local: $(TMPINSTALL_FILES) |
---|
74 | |
---|
75 | include $(top_srcdir)/../../../../../../automake/local.am |
---|