1 | ## |
---|
2 | ## $Id$ |
---|
3 | ## |
---|
4 | |
---|
5 | AUTOMAKE_OPTIONS = foreign 1.4 |
---|
6 | |
---|
7 | VPATH = @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/console:@srcdir@/../../shared/bootloader |
---|
8 | |
---|
9 | C_FILES = misc.c pci.c zlib.c mm.c em86.c polled_io.c lib.c |
---|
10 | C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o) |
---|
11 | |
---|
12 | H_FILES = bootldr.h zlib.h pci.h |
---|
13 | |
---|
14 | S_FILES = head.S exception.S em86real.S |
---|
15 | S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o) |
---|
16 | |
---|
17 | OBJS = $(S_O_FILES) $(C_O_FILES) |
---|
18 | |
---|
19 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
20 | include $(top_srcdir)/../../../../../../automake/compile.am |
---|
21 | include $(top_srcdir)/../../../../../../automake/lib.am |
---|
22 | |
---|
23 | # |
---|
24 | # (OPTIONAL) Add local stuff here using += |
---|
25 | # |
---|
26 | |
---|
27 | ## FIXME: |
---|
28 | ## ASFLAGS = -mrelocatable |
---|
29 | CFLAGS_DEBUG_V = $(CFLAGS_OPTIMIZE_V) |
---|
30 | |
---|
31 | AM_CPPFLAGS += -D__BOOT__ -DDEBUG -mrelocatable |
---|
32 | AM_CFLAGS += -msoft-float -mstrict-align -fno-builtin -Wall -mmultiple \ |
---|
33 | -mstring -O2 -fomit-frame-pointer -ffixed-r13 -mno-sdata |
---|
34 | |
---|
35 | IMAGES = rtems.gz |
---|
36 | |
---|
37 | CLEANFILES += bootloader reloc.O |
---|
38 | DISTCLEANFILES += $(IMAGES) |
---|
39 | |
---|
40 | # |
---|
41 | # CAUTION : |
---|
42 | # |
---|
43 | # As we use very specific compilation options in this directory |
---|
44 | # we shall not use any other code. This includes the newlib libc.a |
---|
45 | # as well as other code located in .o files in mcp750 directory. |
---|
46 | # |
---|
47 | # NEVER remove lib.c. You have been warned... |
---|
48 | # |
---|
49 | bootloader : $(OBJS) $(IMAGES) $(BINARY_LOADED) ppcboot.lds |
---|
50 | $(LD) -o bootloader $(OBJS) --just-symbols=$(BINARY_LOADED) \ |
---|
51 | -b binary $(IMAGES) -T @srcdir@/../../shared/bootloader/ppcboot.lds \ |
---|
52 | -Map $(ARCH)/bootloader.map |
---|
53 | |
---|
54 | check_unresolved : $(OBJS) |
---|
55 | $(LD) -r -o reloc.O $(OBJS) |
---|
56 | $(NM) reloc.O |grep ' U ' |
---|
57 | echo "Every symbol listed should be defined in @srcdir@/ppcboot.lds" |
---|
58 | |
---|
59 | rtems: $(BINARY_LOADED) |
---|
60 | $(OBJCOPY) $(BINARY_LOADED) rtems -O binary -R .comment -S |
---|
61 | |
---|
62 | rtems.gz: rtems |
---|
63 | gzip -vf9 rtems |
---|
64 | |
---|
65 | all-local: $(ARCH) $(OBJS) |
---|
66 | |
---|
67 | include $(top_srcdir)/../../../../../../automake/local.am |
---|