diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 38 |
1 files changed, 24 insertions, 14 deletions
@@ -1,4 +1,4 @@ -roms := pokered.gbc pokeblue.gbc +roms := pokered.gbc pokeblue.gbc pokeblue_debug.gbc rom_obj := \ audio.o \ @@ -11,8 +11,9 @@ gfx/pics.o \ gfx/sprites.o \ gfx/tilesets.o -pokered_obj := $(rom_obj:.o=_red.o) -pokeblue_obj := $(rom_obj:.o=_blue.o) +pokered_obj := $(rom_obj:.o=_red.o) +pokeblue_obj := $(rom_obj:.o=_blue.o) +pokeblue_debug_obj := $(rom_obj:.o=_blue_debug.o) ### Build tools @@ -36,19 +37,20 @@ RGBLINK ?= $(RGBDS)rgblink .SECONDEXPANSION: .PRECIOUS: .SECONDARY: -.PHONY: all red blue clean tidy compare tools +.PHONY: all red blue blue_debug clean tidy compare tools all: $(roms) -red: pokered.gbc -blue: pokeblue.gbc +red: pokered.gbc +blue: pokeblue.gbc +blue_debug: pokeblue_debug.gbc clean: - rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o + rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete $(MAKE) clean -C tools/ tidy: - rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o + rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o $(MAKE) clean -C tools/ compare: $(roms) @@ -64,8 +66,9 @@ ifeq ($(DEBUG),1) RGBASMFLAGS += -E endif -$(pokered_obj): RGBASMFLAGS += -D _RED -$(pokeblue_obj): RGBASMFLAGS += -D _BLUE +$(pokered_obj): RGBASMFLAGS += -D _RED +$(pokeblue_obj): RGBASMFLAGS += -D _BLUE +$(pokeblue_debug_obj): RGBASMFLAGS += -D _BLUE -D _DEBUG rgbdscheck.o: rgbdscheck.asm $(RGBASM) -o $@ $< @@ -87,18 +90,25 @@ $(info $(shell $(MAKE) -C tools)) # Dependencies for objects (drop _red and _blue from asm file basenames) $(foreach obj, $(pokered_obj), $(eval $(call DEP,$(obj),$(obj:_red.o=.asm)))) $(foreach obj, $(pokeblue_obj), $(eval $(call DEP,$(obj),$(obj:_blue.o=.asm)))) +$(foreach obj, $(pokeblue_debug_obj), $(eval $(call DEP,$(obj),$(obj:_blue_debug.o=.asm)))) endif %.asm: ; -pokered_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON RED" -pokeblue_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE" + +pokered_pad = 0x00 +pokeblue_pad = 0x00 +pokeblue_debug_pad = 0xff + +pokered_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON RED" +pokeblue_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE" +pokeblue_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE" %.gbc: $$(%_obj) layout.link - $(RGBLINK) -d -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^) - $(RGBFIX) $($*_opt) $@ + $(RGBLINK) -p $($*_pad) -d -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^) + $(RGBFIX) -p $($*_pad) $($*_opt) $@ ### Misc file-specific graphics rules |
