summaryrefslogtreecommitdiffstats
path: root/src/arch/e1/Makefile
diff options
context:
space:
mode:
authorMichael Brown2005-03-08 19:53:11 +0100
committerMichael Brown2005-03-08 19:53:11 +0100
commit3d6123e69ab879c72ff489afc5bf93ef0b7a94ce (patch)
tree9f3277569153a550fa8d81ebd61bd88f266eb8da /src/arch/e1/Makefile
downloadipxe-3d6123e69ab879c72ff489afc5bf93ef0b7a94ce.tar.gz
ipxe-3d6123e69ab879c72ff489afc5bf93ef0b7a94ce.tar.xz
ipxe-3d6123e69ab879c72ff489afc5bf93ef0b7a94ce.zip
Initial revision
Diffstat (limited to 'src/arch/e1/Makefile')
-rw-r--r--src/arch/e1/Makefile70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/arch/e1/Makefile b/src/arch/e1/Makefile
new file mode 100644
index 000000000..a7c6f3b81
--- /dev/null
+++ b/src/arch/e1/Makefile
@@ -0,0 +1,70 @@
+ARCH_FORMAT= coff-e1
+
+BUILD_ROMS= $(ROMS)
+BUILD_COFFS= $(patsubst %img, %coff, $(IMGS))
+SUFFIXES+= rom zrom coff
+
+CC= e1-coff-gcc
+AS= e1-coff-as
+LD= e1-coff-ld
+SIZE= e1-coff-size
+AR= e1-coff-ar
+RANLIB= e1-coff-ranlib
+OBJCOPY=e1-coff-objcopy
+
+# DMAC_HW_ADDR_DRV holds the ethernet's MAC address. It is passed as
+# flag to the low level driver instead of reading it from an
+# external EEPROM, which we do not have!
+EXTRA_CFLAGS = -DEMBEDDED -DMAC_HW_ADDR_DRV="'H','Y','L','N','X','1'"
+
+START= $(BIN)/start.o
+START16= $(BIN)/start.o
+
+SRCS+= arch/e1/core/e132_xs.c
+SRCS+= arch/e1/core/e1_timer.c
+SRCS+= arch/e1/core/longjmp.c
+SRCS+= arch/e1/core/memcmp.S
+SRCS+= arch/e1/core/memcpy.S
+SRCS+= arch/e1/core/memset.S
+SRCS+= arch/e1/core/setjmp.c
+SRCS+= arch/e1/core/strcmp.S
+SRCS+= arch/e1/core/start.S
+
+ROMLIMIT:=3276800
+
+include $(BIN)/Roms
+
+ROMS= $(BIN)/cs89x0.rom
+IMGS= $(BIN)/cs89x0.img
+
+#allfiles: $(BUILD_ROMS)
+all: $(BUILD_COFFS)
+
+BOBJS+= $(BIN)/e1_timer.o
+BOBJS+= $(BIN)/memcmp.o $(BIN)/memcpy.o $(BIN)/memset.o
+BOBJS+= $(BIN)/setjmp.o $(BIN)/longjmp.o
+BOBJS+= $(BIN)/e132_xs.o
+
+# Utilities
+
+$(BIN)/nrv2b: util/nrv2b.c
+ $(HOST_CC) -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32 -DENDIAN=0 -o $@ $<
+
+# Pattern Rules
+# General for compiling/assembly source files
+$(BIN)/cs89x0.o: drivers/net/cs89x0.c $(MAKEDEPS)
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<
+# With the current tools we have problem with the compilation
+# of the vsprintf file when the -O2 is selected. So we compile
+# the aforemntioned file with -O1 !!!
+$(BIN)/vsprintf.o: core/vsprintf.c $(MAKEDEPS)
+ $(CC) $(CFLAGS) -O1 -o $@ -c $<
+
+$(BIN)/%.o: arch/e1/core/%.c $(MAKEDEPS)
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+$(BIN)/%.o: arch/e1/core/%.S $(MAKEDEPS)
+ $(CPP) $(CFLAGS) -D ASSEMBLY $< | $(AS) $(ASFLAGS) -o $@
+
+$(BIN)/%.coff: $(BIN)/%.tmp $(MAKEDEPS)
+ mv $< $(BIN)/etherboot.coff