From c4b81f0916ca9f7826552aa1b51a2d8d27ef8b3e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 4 Jun 2018 12:18:37 -0400 Subject: Clean up linkerscript and add it as a Makefile target --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bf7cf66..9fd252a 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,14 @@ clean: mostlyclean: rm -rf $(ROM) $(CORRECTEDROM) $(OBJS) $(OBJS:.o=.d) $(ROMS:.gb=.sym) $(ROMS:.gb=.map) +.PHONY: linkerscript +linkerscript: $(ROM:.gb=.link) + +%.link: %.map + $(PYTHON3) tools/map2link.py $< $@ + +%.map: %.gb; + $(CORRECTEDROM): %-correctheader.gb: %.gb cp $< $@ $(RGBFIX) -f hg -m 0x10 $@ -- cgit v1.2.3 From a406b638b1c18c9c78806db395068cf03fc9c64a Mon Sep 17 00:00:00 2001 From: pfero Date: Tue, 5 Jun 2018 16:54:58 +0200 Subject: Clarify 'extra' utilities in Makefile --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d9a3d52..31d49f2 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,6 @@ compare: $(ROM) $(CORRECTEDROM) tools tools/pkmncompress tools/gfx: "$(MAKE)" -C tools/ -.PHONY: coverage -coverage: tools/disasm_coverage.py $(ROM) - $(PYTHON) $< -m $(ROM:.gb=.map) -b 0x40 - # Remove files generated by the build process. .PHONY: clean clean: @@ -59,13 +55,18 @@ clean: mostlyclean: rm -rf $(ROM) $(CORRECTEDROM) $(OBJS) $(OBJS:.o=.d) $(ROMS:.gb=.sym) $(ROMS:.gb=.map) +# Utilities +.PHONY: coverage +coverage: $(ROM:.gb=.map) tools/disasm_coverage.py + $(PYTHON) tools/disasm_coverage.py -m $< -b 0x40 + .PHONY: linkerscript linkerscript: $(ROM:.gb=.link) -%.link: %.map +%.link: %.map tools/map2link.py $(PYTHON3) tools/map2link.py $< $@ -%.map: %.gb; +%.map: %.gb $(CORRECTEDROM): %-correctheader.gb: %.gb $(RGBASM) $(RGBASMFLAGS) -o $(BUILD)/zero_checksum.o zero_checksum.inc -- cgit v1.2.3