Skip to content

Commit

Permalink
Simplify makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Noam Preil committed Oct 10, 2020
1 parent b1dd7f4 commit 685309b
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 685309b

Please sign in to comment.