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