1 | ARCH_FORMAT= coff-e1
|
---|
2 |
|
---|
3 | BUILD_ROMS= $(ROMS)
|
---|
4 | BUILD_COFFS= $(patsubst %img, %coff, $(IMGS))
|
---|
5 | SUFFIXES+= rom zrom coff
|
---|
6 |
|
---|
7 | CC= e1-coff-gcc
|
---|
8 | AS= e1-coff-as
|
---|
9 | LD= e1-coff-ld
|
---|
10 | SIZE= e1-coff-size
|
---|
11 | AR= e1-coff-ar
|
---|
12 | RANLIB= e1-coff-ranlib
|
---|
13 | OBJCOPY=e1-coff-objcopy
|
---|
14 |
|
---|
15 | # DMAC_HW_ADDR_DRV holds the ethernet's MAC address. It is passed as
|
---|
16 | # flag to the low level driver instead of reading it from an
|
---|
17 | # external EEPROM, which we do not have!
|
---|
18 | EXTRA_CFLAGS = -DEMBEDDED -DMAC_HW_ADDR_DRV="'H','Y','L','N','X','1'"
|
---|
19 |
|
---|
20 | START= $(BIN)/start.o
|
---|
21 | START16= $(BIN)/start.o
|
---|
22 |
|
---|
23 | SRCS+= arch/e1/core/e132_xs.c
|
---|
24 | SRCS+= arch/e1/core/e1_timer.c
|
---|
25 | SRCS+= arch/e1/core/longjmp.c
|
---|
26 | SRCS+= arch/e1/core/memcmp.S
|
---|
27 | SRCS+= arch/e1/core/memcpy.S
|
---|
28 | SRCS+= arch/e1/core/memset.S
|
---|
29 | SRCS+= arch/e1/core/setjmp.c
|
---|
30 | SRCS+= arch/e1/core/strcmp.S
|
---|
31 | SRCS+= arch/e1/core/start.S
|
---|
32 |
|
---|
33 | ROMLIMIT:=3276800
|
---|
34 |
|
---|
35 | include $(BIN)/Roms
|
---|
36 |
|
---|
37 | ROMS= $(BIN)/cs89x0.rom
|
---|
38 | IMGS= $(BIN)/cs89x0.img
|
---|
39 |
|
---|
40 | #allfiles: $(BUILD_ROMS)
|
---|
41 | all: $(BUILD_COFFS)
|
---|
42 |
|
---|
43 | BOBJS+= $(BIN)/e1_timer.o
|
---|
44 | BOBJS+= $(BIN)/memcmp.o $(BIN)/memcpy.o $(BIN)/memset.o
|
---|
45 | BOBJS+= $(BIN)/setjmp.o $(BIN)/longjmp.o
|
---|
46 | BOBJS+= $(BIN)/e132_xs.o
|
---|
47 |
|
---|
48 | # Utilities
|
---|
49 |
|
---|
50 | $(BIN)/nrv2b: util/nrv2b.c
|
---|
51 | $(HOST_CC) -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32 -DENDIAN=0 -o $@ $<
|
---|
52 |
|
---|
53 | # Pattern Rules
|
---|
54 | # General for compiling/assembly source files
|
---|
55 | $(BIN)/cs89x0.o: drivers/net/cs89x0.c $(MAKEDEPS)
|
---|
56 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<
|
---|
57 | # With the current tools we have problem with the compilation
|
---|
58 | # of the vsprintf file when the -O2 is selected. So we compile
|
---|
59 | # the aforemntioned file with -O1 !!!
|
---|
60 | $(BIN)/vsprintf.o: core/vsprintf.c $(MAKEDEPS)
|
---|
61 | $(CC) $(CFLAGS) -O1 -o $@ -c $<
|
---|
62 |
|
---|
63 | $(BIN)/%.o: arch/e1/core/%.c $(MAKEDEPS)
|
---|
64 | $(CC) $(CFLAGS) -o $@ -c $<
|
---|
65 |
|
---|
66 | $(BIN)/%.o: arch/e1/core/%.S $(MAKEDEPS)
|
---|
67 | $(CPP) $(CFLAGS) -D ASSEMBLY $< | $(AS) $(ASFLAGS) -o $@
|
---|
68 |
|
---|
69 | $(BIN)/%.coff: $(BIN)/%.tmp $(MAKEDEPS)
|
---|
70 | mv $< $(BIN)/etherboot.coff
|
---|