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 = no-exeext |
---|
9 | |
---|
10 | VPATH = @srcdir@:@srcdir@/../../shared/bootloader:@srcdir@/../../shared/console |
---|
11 | |
---|
12 | noinst_PROGRAMS = bootloader |
---|
13 | |
---|
14 | ## IMPORTANT: head.S must be first, T. Straumann 12/17/2001 |
---|
15 | bootloader_SOURCES = head.S exception.S em86real.S |
---|
16 | bootloader_SOURCES += misc.c pci.c zlib.c mm.c em86.c polled_io.c lib.c |
---|
17 | bootloader_SOURCES += bootldr.h zlib.h pci.h keyboard.h |
---|
18 | |
---|
19 | |
---|
20 | NM = @NM@ |
---|
21 | LD = @LD@ |
---|
22 | |
---|
23 | # ---- |
---|
24 | DEFAULT_INCLUDES = |
---|
25 | |
---|
26 | # Remove references to EABI when compiling bootloader |
---|
27 | BOOTLOADER_CPU_FLAGS=$(subst -msdata=eabi,,$(subst -meabi,,$(CPU_CFLAGS))) |
---|
28 | AM_CPPFLAGS = -D__BOOT__ |
---|
29 | AM_CFLAGS = \ |
---|
30 | $(GCC_SPECS) -specs bsp_specs -qrtems -mrelocatable \ |
---|
31 | -msoft-float -mstrict-align -fno-builtin -Wall -mmultiple \ |
---|
32 | -mstring -O2 -fomit-frame-pointer -ffixed-r13 -mno-sdata \ |
---|
33 | $(BOOTLOADER_CPU_CFLAGS) |
---|
34 | AM_CCASFLAGS = $(AM_CPPFLAGS) \ |
---|
35 | $(GCC_SPECS) -specs bsp_specs -qrtems -mrelocatable \ |
---|
36 | -DASM $(BOOTLOADER_CPU_CFLAGS) |
---|
37 | |
---|
38 | # |
---|
39 | # CAUTION : |
---|
40 | # |
---|
41 | # As we use very specific compilation options in this directory |
---|
42 | # we shall not use any other code. This includes the newlib libc.a |
---|
43 | # as well as other code located in .$(OBJEXT) files in mcp750 directory. |
---|
44 | # |
---|
45 | # NEVER remove lib.c. You have been warned... |
---|
46 | # |
---|
47 | bootloader$(EXEEXT): $(bootloader_OBJECTS) |
---|
48 | $(LD) -r -o $@ $(bootloader_OBJECTS) |
---|
49 | $(NM) $@ | grep ' U ' |
---|
50 | @echo "Every symbol listed should be defined in @srcdir@/ppcboot.lds" |
---|
51 | bootloader.$(OBJEXT): bootloader$(EXEEXT) |
---|
52 | cp $< $@ |
---|
53 | |
---|
54 | ppcbootdir = $(bsplibdir) |
---|
55 | ppcboot_DATA = bootloader.$(OBJEXT) |
---|
56 | ppcboot_DATA += ../../shared/bootloader/ppcboot.lds |
---|
57 | |
---|
58 | # FIXME: Tmp-install stuff to make mcp750.cfg's make-exe happy. |
---|
59 | # As mcp750.cfg's make-exe doesn't work outside of the source-tree. |
---|
60 | # We might consider to use this directory directly for in-source-tree |
---|
61 | # building, instead. |
---|
62 | $(PROJECT_RELEASE)/lib/%: % |
---|
63 | $(INSTALL_DATA) $< $@ |
---|
64 | |
---|
65 | TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib/bootloader.$(OBJEXT) \ |
---|
66 | $(PROJECT_RELEASE)/lib/ppcboot.lds |
---|
67 | |
---|
68 | all-local: $(TMPINSTALL_FILES) |
---|
69 | |
---|
70 | include $(top_srcdir)/../../../../../../automake/local.am |
---|