You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.8KB

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