|
@@ -36,12 +36,15 @@ boot_depth := 8192
|
|
|
boot_width := 32
|
|
|
boot_stride := 1
|
|
|
|
|
|
+ROMS := $(wildcard roms/*.rom)
|
|
|
+ROMOBJS = $(ROMS:.rom=.o)
|
|
|
+
|
|
|
max80.elf: head.o die.o main.o dummy.o irqtable.o irqasm.o sbrk.o \
|
|
|
console.o rtc.o \
|
|
|
sdcard.o diskcache.o \
|
|
|
abcio.o abcdisk.o \
|
|
|
memset.o memcpy.o \
|
|
|
- testdata.o \
|
|
|
+ testdata.o $(ROMOBJS) \
|
|
|
fatfs.a
|
|
|
|
|
|
FATFS_C = $(wildcard fatfs/source/*.c)
|
|
@@ -88,6 +91,10 @@ dram.hex: max80.elf
|
|
|
%.s: %.S | $(genhdrs)
|
|
|
$(CC) $(SFLAGS) $(SFLAGS_$<) $(gendeps) -E -o $@ $<
|
|
|
|
|
|
+roms/%.o: roms/%.rom rom.S
|
|
|
+ $(CC) $(SFLAGS) $(SFLAGS_$(F<)) -DNAME='rom_$*' -DFILE='"$<"' \
|
|
|
+ -c -o $@ rom.S
|
|
|
+
|
|
|
%.ild: %.ld | $(genhdrs)
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_$<) $(gendeps) \
|
|
|
-x assembler-with-cpp \
|
|
@@ -101,7 +108,8 @@ irqtable.c: ../iodevs.conf ../tools/iodevs.pl
|
|
|
$(PERL) ../tools/iodevs.pl c $< $@
|
|
|
|
|
|
clean:
|
|
|
- rm -f *.o *.i *.s *.elf *.bin .*.d *.ild $(genhdrs) $(gensrcs)
|
|
|
+ rm -f *.o *.i *.s *.elf *.bin .*.d *.ild roms/*.o
|
|
|
+ rm -f $(genhdrs) $(gensrcs) $(ROMOBJS)
|
|
|
|
|
|
spotless: clean
|
|
|
rm -f *.mem *.hex *.mif
|