1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | @SET_MAKE@ |
---|
6 | srcdir = @srcdir@ |
---|
7 | VPATH = @srcdir@:@srcdir@/../../../shared:@srcdir@/../console |
---|
8 | RTEMS_ROOT = @top_srcdir@ |
---|
9 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
10 | |
---|
11 | # C source names, if any, go here -- minus the .c |
---|
12 | C_PIECES=misc pci zlib mm em86 polled_io lib |
---|
13 | C_FILES=$(C_PIECES:%=%.c) |
---|
14 | C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) |
---|
15 | |
---|
16 | H_FILES=bootldr.h zlib.h pci.h |
---|
17 | |
---|
18 | # Assembly source names, if any, go here -- minus the .s |
---|
19 | S_PIECES=head exception em86real |
---|
20 | S_FILES=$(S_PIECES:%=%.S) |
---|
21 | S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o) |
---|
22 | |
---|
23 | SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) |
---|
24 | OBJS=$(S_O_FILES) $(C_O_FILES) |
---|
25 | |
---|
26 | include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg |
---|
27 | include $(RTEMS_ROOT)/make/leaf.cfg |
---|
28 | |
---|
29 | CC_PIECES= |
---|
30 | CC_FILES=$(CC_PIECES:%=%.cc) |
---|
31 | CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o) |
---|
32 | |
---|
33 | |
---|
34 | # |
---|
35 | # (OPTIONAL) Add local stuff here using += |
---|
36 | # |
---|
37 | |
---|
38 | DEFINES += |
---|
39 | CPPFLAGS += -D__BOOT__ -DDEBUG |
---|
40 | CFLAGS += -msoft-float -mstrict-align -fno-builtin -Wall -mmultiple -mstring \ |
---|
41 | -O2 -fomit-frame-pointer -mrelocatable -ffixed-r13 \ |
---|
42 | -mno-sdata -D__BOOT__ -DDEBUG |
---|
43 | |
---|
44 | ASFLAGS += -mrelocatable |
---|
45 | |
---|
46 | LD_PATHS += |
---|
47 | LD_LIBS += |
---|
48 | LDFLAGS += |
---|
49 | |
---|
50 | IMAGES := rtems.gz |
---|
51 | |
---|
52 | # |
---|
53 | # Add your list of files to delete here. The config files |
---|
54 | # already know how to delete some stuff, so you may want |
---|
55 | |
---|
56 | # to just run 'make clean' first to see what gets missed. |
---|
57 | # 'make clobber' already includes 'make clean' |
---|
58 | # |
---|
59 | |
---|
60 | CLEAN_ADDITIONS += bootloader reloc.O |
---|
61 | CLOBBER_ADDITIONS += $(IMAGES) |
---|
62 | |
---|
63 | # |
---|
64 | # CAUTION : |
---|
65 | # |
---|
66 | # As we use very specific compilation options in this directory |
---|
67 | # we shall not use any other code. This includes the newlib libc.a |
---|
68 | # as well as other code located in .o files in mcp750 directory. |
---|
69 | # |
---|
70 | # NEVER remove lib.c. You have been warned... |
---|
71 | # |
---|
72 | bootloader : ${OBJS} $(IMAGES) $(BINARY_LOADED) ppcboot.lds |
---|
73 | $(LD) -o bootloader $(OBJS) --just-symbols=$(BINARY_LOADED) \ |
---|
74 | -b binary $(IMAGES) -T @srcdir@/ppcboot.lds \ |
---|
75 | -Map bootloader.map |
---|
76 | |
---|
77 | check_unresolved : ${OBJS} |
---|
78 | $(LD) -r -o reloc.O ${OBJS} |
---|
79 | $(NM) reloc.O |grep ' U ' |
---|
80 | echo "Every symbol listed should be defined in @srcdir@/ppcboot.lds" |
---|
81 | |
---|
82 | rtems.gz: $(BINARY_LOADED) |
---|
83 | $(OBJCOPY) $(BINARY_LOADED) rtems -O binary -R .comment -S |
---|
84 | gzip -vf9 rtems |
---|
85 | rm -f rtems |
---|
86 | |
---|
87 | |
---|
88 | all: ${ARCH} $(SRCS) ${OBJ} |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | |
---|
96 | |
---|
97 | |
---|
98 | |
---|