diff --git a/Makefile b/Makefile index 820994d..b985051 100644 --- a/Makefile +++ b/Makefile @@ -112,20 +112,10 @@ baserom: mkdir -p $(BINDIR) mkrom $(BINDIR)kernel.rom $(LENGTH) /dev/null:0x00 -$(OUTDIR)$(PLATFORM)/00.bin: src/00/*.asm include/constants.asm src/00/jumptable.config +$(OUTDIR)$(PLATFORM)/%.bin: src/%/*.asm include/constants.asm src/%/jumptable.config @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/00/" --symbols $(BINDIR)00.sym --listing $(BINDIR)00.list src/00/base.asm $(BINDIR)00.bin - patchrom src/00/jumptable.config $(BINDIR)kernel.rom 00 < $(BINDIR)00.sym > $(BINDIR)00.inc - -$(OUTDIR)$(PLATFORM)/01.bin: $(OUTDIR)$(PLATFORM)/00.bin src/01/*.asm include/constants.asm src/01/jumptable.config - @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/01/" --symbols $(BINDIR)01.sym --listing $(BINDIR)01.list src/01/base.asm $(BINDIR)01.bin - patchrom src/01/jumptable.config $(BINDIR)kernel.rom 01 < $(BINDIR)01.sym > $(BINDIR)01.inc - -$(OUTDIR)$(PLATFORM)/02.bin: $(OUTDIR)$(PLATFORM)/00.bin src/02/*.asm include/constants.asm src/02/jumptable.config - @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/02/" --symbols $(BINDIR)02.sym --listing $(BINDIR)02.list src/02/base.asm $(BINDIR)02.bin - patchrom src/02/jumptable.config $(BINDIR)kernel.rom 02 < $(BINDIR)02.sym > $(BINDIR)02.inc + $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/$*/" --symbols $(BINDIR)$*.sym --listing $(BINDIR)$*.list src/$*/base.asm $(BINDIR)$*.bin + patchrom src/$*/jumptable.config $(BINDIR)kernel.rom $* < $(BINDIR)$*.sym > $(BINDIR)$*.inc $(OUTDIR)$(PLATFORM)/privileged.bin: src/privileged/*.asm include/constants.asm $(OUTDIR)$(PLATFORM)/00.bin @mkdir -p $(BINDIR)