From 00d491a646174a0b00475969675c1e6e60da81df Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 29 Jan 2016 01:01:41 -0500 Subject: [PATCH 01/14] Bump extras for faster scan_includes. --- extras | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras b/extras index adbc204d7..9644160b8 160000 --- a/extras +++ b/extras @@ -1 +1 @@ -Subproject commit adbc204d741bec7a68c1e6cd67751f226d0347cb +Subproject commit 9644160b87e706f3a6ae20fe09e9c469f628c06d From 1176712cfebba527fac1438fdf8ca8b9e643a8e7 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 29 Jan 2016 01:10:41 -0500 Subject: [PATCH 02/14] Use rgbasm -D instead of extra files for version differences. --- Makefile | 10 ++++++---- crystal11.asm | 4 ---- misc/mobile_5c.asm | 2 +- wram11.asm | 3 --- 4 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 crystal11.asm delete mode 100644 wram11.asm diff --git a/Makefile b/Makefile index 261b58c24..ccfd36357 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ includes := $(PYTHON) $(poketools)/scan_includes.py crystal11_obj := \ wram11.o \ -crystal11.o \ +main11.o \ lib/mobile/main.o \ home.o \ audio.o \ @@ -42,10 +42,10 @@ misc/crystal_misc.o \ text/common_text.o \ gfx/pics.o -all_obj := $(crystal_obj) crystal11.o wram11.o +all_obj := $(crystal_obj) main11.o wram11.o # object dependencies -$(foreach obj, $(all_obj), \ +$(foreach obj, $(crystal_obj), \ $(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \ ) @@ -64,7 +64,9 @@ compare: pokecrystal.gbc pokecrystal11.gbc @$(MD5) roms.md5 %.asm: ; -$(all_obj): $$*.asm $$($$*_dep) +%11.o: %.asm $$(%_dep) + rgbasm -D CRYSTAL11 -o $@ $< +%.o: %.asm $$(%_dep) rgbasm -o $@ $< pokecrystal11.gbc: $(crystal11_obj) diff --git a/crystal11.asm b/crystal11.asm deleted file mode 100644 index c4c7712e8..000000000 --- a/crystal11.asm +++ /dev/null @@ -1,4 +0,0 @@ -CRYSTAL11 = 1 -CORRUPT_TILES = 1 - -INCLUDE "main.asm" diff --git a/misc/mobile_5c.asm b/misc/mobile_5c.asm index b8710a78a..8ecd35edf 100755 --- a/misc/mobile_5c.asm +++ b/misc/mobile_5c.asm @@ -934,7 +934,7 @@ GFX_172f1f: INCBIN "gfx/unknown/172f1f.2bpp" Tilemap_1733af: -IF DEF(CORRUPT_TILES) +IF DEF(CRYSTAL11) INCBIN "gfx/unknown/1733af_corrupt.tilemap" ELSE INCBIN "gfx/unknown/1733af.tilemap" diff --git a/wram11.asm b/wram11.asm deleted file mode 100644 index 4d3303fd0..000000000 --- a/wram11.asm +++ /dev/null @@ -1,3 +0,0 @@ -CRYSTAL11 = 1 - -INCLUDE "wram.asm" From 08ac6dfd80000f1cdd449225e4d2cc195e086439 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 29 Jan 2016 16:24:02 -0500 Subject: [PATCH 03/14] *_crystal.asm files are no longer needed to build crystal *.o. --- Makefile | 28 ++++++++++++++++------------ data/egg_moves_crystal.asm | 2 -- data/evos_attacks_crystal.asm | 2 -- engine/credits_crystal.asm | 2 -- engine/events_crystal.asm | 2 -- includes.asm | 1 + maps_crystal.asm | 2 -- pokecrystal.asm => version.asm | 0 8 files changed, 17 insertions(+), 22 deletions(-) delete mode 100644 data/egg_moves_crystal.asm delete mode 100644 data/evos_attacks_crystal.asm delete mode 100644 engine/credits_crystal.asm delete mode 100644 engine/events_crystal.asm delete mode 100644 maps_crystal.asm rename pokecrystal.asm => version.asm (100%) diff --git a/Makefile b/Makefile index ccfd36357..d458381b2 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,12 @@ main11.o \ lib/mobile/main.o \ home.o \ audio.o \ -maps_crystal.o \ -engine/events_crystal.o \ -engine/credits_crystal.o \ -data/egg_moves_crystal.o \ -data/evos_attacks_crystal.o \ -data/pokedex/entries_crystal.o \ +maps.o \ +engine/events.o \ +engine/credits.o \ +data/egg_moves.o \ +data/evos_attacks.o \ +data/pokedex/entries.o \ misc/crystal_misc.o \ text/common_text.o \ gfx/pics.o @@ -32,12 +32,12 @@ main.o \ lib/mobile/main.o \ home.o \ audio.o \ -maps_crystal.o \ -engine/events_crystal.o \ -engine/credits_crystal.o \ -data/egg_moves_crystal.o \ -data/evos_attacks_crystal.o \ -data/pokedex/entries_crystal.o \ +maps.o \ +engine/events.o \ +engine/credits.o \ +data/egg_moves.o \ +data/evos_attacks.o \ +data/pokedex/entries.o \ misc/crystal_misc.o \ text/common_text.o \ gfx/pics.o @@ -69,6 +69,10 @@ compare: pokecrystal.gbc pokecrystal11.gbc %.o: %.asm $$(%_dep) rgbasm -o $@ $< +# This seems to be required because of a filename collision (but not a path collision). +lib/%.o: lib/%.asm $$(lib/%_dep) + rgbasm -o $@ $< + pokecrystal11.gbc: $(crystal11_obj) rgblink -n $*.sym -m $*.map -o $@ $^ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@ diff --git a/data/egg_moves_crystal.asm b/data/egg_moves_crystal.asm deleted file mode 100644 index 50fbb1471..000000000 --- a/data/egg_moves_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "data/egg_moves.asm" diff --git a/data/evos_attacks_crystal.asm b/data/evos_attacks_crystal.asm deleted file mode 100644 index 22ec9d84c..000000000 --- a/data/evos_attacks_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "data/evos_attacks.asm" diff --git a/engine/credits_crystal.asm b/engine/credits_crystal.asm deleted file mode 100644 index 51265434b..000000000 --- a/engine/credits_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "engine/credits.asm" diff --git a/engine/events_crystal.asm b/engine/events_crystal.asm deleted file mode 100644 index 56cb7a200..000000000 --- a/engine/events_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "engine/events.asm" diff --git a/includes.asm b/includes.asm index 456623d9f..1b3d6bed5 100644 --- a/includes.asm +++ b/includes.asm @@ -1,2 +1,3 @@ +INCLUDE "version.asm" INCLUDE "contents.asm" INCLUDE "constants.asm" diff --git a/maps_crystal.asm b/maps_crystal.asm deleted file mode 100644 index 7bb87d329..000000000 --- a/maps_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "maps.asm" diff --git a/pokecrystal.asm b/version.asm similarity index 100% rename from pokecrystal.asm rename to version.asm From 36f0bda0b33f5444241f1081b93f63f94a1b046a Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 10 Feb 2016 00:31:32 -0500 Subject: [PATCH 04/14] Use static pattern rules to fix dependencies for objects in subdirs. --- Makefile | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index d458381b2..c5fad3779 100644 --- a/Makefile +++ b/Makefile @@ -10,22 +10,6 @@ gfx := $(PYTHON) gfx.py includes := $(PYTHON) $(poketools)/scan_includes.py -crystal11_obj := \ -wram11.o \ -main11.o \ -lib/mobile/main.o \ -home.o \ -audio.o \ -maps.o \ -engine/events.o \ -engine/credits.o \ -data/egg_moves.o \ -data/evos_attacks.o \ -data/pokedex/entries.o \ -misc/crystal_misc.o \ -text/common_text.o \ -gfx/pics.o - crystal_obj := \ wram.o \ main.o \ @@ -42,11 +26,10 @@ misc/crystal_misc.o \ text/common_text.o \ gfx/pics.o -all_obj := $(crystal_obj) main11.o wram11.o +crystal11_obj := $(crystal_obj:.o=11.o) -# object dependencies -$(foreach obj, $(crystal_obj), \ - $(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \ +$(foreach obj, $(crystal_obj:.o=), \ + $(eval $(obj)_dep := $(shell $(includes) $(obj).asm)) \ ) @@ -54,23 +37,18 @@ roms := pokecrystal.gbc all: $(roms) crystal: pokecrystal.gbc - crystal11: pokecrystal11.gbc clean: - rm -f $(roms) $(all_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) + rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) compare: pokecrystal.gbc pokecrystal11.gbc @$(MD5) roms.md5 %.asm: ; -%11.o: %.asm $$(%_dep) +$(crystal11_obj): %11.o: %.asm $$(%_dep) rgbasm -D CRYSTAL11 -o $@ $< -%.o: %.asm $$(%_dep) - rgbasm -o $@ $< - -# This seems to be required because of a filename collision (but not a path collision). -lib/%.o: lib/%.asm $$(lib/%_dep) +$(crystal_obj): %.o: %.asm $$(%_dep) rgbasm -o $@ $< pokecrystal11.gbc: $(crystal11_obj) From bd11b60477833bcaa88489ec2e4f6e90c5bb01ab Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 11 Feb 2016 22:53:00 -0500 Subject: [PATCH 05/14] Use EGG_LEVEL for the Poke Seer. --- event/poke_seer.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event/poke_seer.asm b/event/poke_seer.asm index 5f1a5d1ab..08d0924c9 100644 --- a/event/poke_seer.asm +++ b/event/poke_seer.asm @@ -168,7 +168,7 @@ GetCaughtLevel: ; 4f18c jr z, .unknown cp 1 ; hatched from an egg jr nz, .print - ld a, 5 ; egg hatch level + ld a, EGG_LEVEL ; egg hatch level .print ld [wSeerCaughtLevel], a From 776dd6182347322f16f0d5e677f91b7ee68d112f Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 15 Feb 2016 18:57:49 -0500 Subject: [PATCH 06/14] hRemainder --- hram.asm | 1 + misc/mobile_12.asm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hram.asm b/hram.asm index 3e921f78e..dc6c480bf 100644 --- a/hram.asm +++ b/hram.asm @@ -50,6 +50,7 @@ hStringCmpString2 EQU $ffb5 hDividend EQU $ffb3 ; length in b register, before 'call Divide' (max 4 bytes) hDivisor EQU $ffb7 ; 1 byte long hQuotient EQU $ffb4 ; result (3 bytes long) +hRemainder EQU $ffb7 hMultiplicand EQU $ffb4 ; 3 bytes long hMultiplier EQU $ffb7 ; 1 byte long diff --git a/misc/mobile_12.asm b/misc/mobile_12.asm index 48e740681..dd0f63135 100755 --- a/misc/mobile_12.asm +++ b/misc/mobile_12.asm @@ -1805,8 +1805,8 @@ Function48d94: ; 48d94 (12:4d94) ld [hDivisor], a ld b, 2 call Divide - ld a, [hDivisor] - ld c, $a + ld a, [hRemainder] + ld c, 10 call SimpleDivide sla b sla b From 2ae8f65b426dff98d998bece374bea98b1e46dea Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 17 Feb 2016 16:15:18 -0500 Subject: [PATCH 07/14] Try to fix pic dimensions. --- gfx.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/gfx.py b/gfx.py index ec5bbb9d8..b39d919ef 100644 --- a/gfx.py +++ b/gfx.py @@ -12,11 +12,23 @@ pics = [ 'gfx/shrink2', ] +def recursive_read(filename): + def recurse(filename_): + lines = [] + for line in open(filename_): + if 'include "' in line.lower(): + lines += recurse(line.split('"')[1]) + else: + lines += [line] + return lines + lines = recurse(filename) + return ''.join(lines) + base_stats = None def get_base_stats(): global base_stats if not base_stats: - base_stats = open('data/base_stats.asm').read() + base_stats = recursive_read('data/base_stats.asm') return base_stats def get_pokemon_dimensions(name): @@ -25,7 +37,7 @@ def get_pokemon_dimensions(name): if name.startswith('unown_'): name = 'unown' base_stats = get_base_stats() - start = base_stats.find(name.title() + 'BaseData:') + start = base_stats.find('\tdb ' + name.upper()) start = base_stats.find('\tdn ', start) end = base_stats.find('\n', start) line = base_stats[start:end].replace(',', ' ') @@ -37,12 +49,15 @@ def filepath_rules(filepath): args = {} filedir, filename = os.path.split(filepath) + if filedir.startswith('./'): + filedir = filedir[2:] + name, ext = os.path.splitext(filename) pokemon_name = '' if 'gfx/pics/' in filedir: - pokemon_name = filedir.split('/')[3] + pokemon_name = filedir.split('/')[-1] if pokemon_name.startswith('unown_'): index = filedir.find(pokemon_name) if index != -1: From 73a660bf2a4f4d91ee846f403ce128fc30958b85 Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 17 Feb 2016 16:22:05 -0500 Subject: [PATCH 08/14] Remove "make pngs". --- Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c5fad3779..cb6a66726 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PYTHON := python MD5 := md5sum -c --quiet .SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .lz .pal .bin .blk .tilemap -.PHONY: all clean crystal crystal11 pngs +.PHONY: all clean crystal crystal11 .SECONDEXPANSION: poketools := extras/pokemontools @@ -60,12 +60,7 @@ pokecrystal.gbc: $(crystal_obj) rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ -pngs: - find . -iname "*.lz" -exec $(gfx) unlz {} + - find . -iname "*.[12]bpp" -exec $(gfx) png {} + - find . -iname "*.[12]bpp" -exec touch {} \; - find . -iname "*.lz" -exec touch {} \; - +%.png: ; %.2bpp: %.png ; $(gfx) 2bpp $< %.1bpp: %.png ; $(gfx) 1bpp $< %.lz: % ; $(gfx) lz $< From dd777065247b3926a63aef4410cc22993455410c Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 17 Feb 2016 16:44:27 -0500 Subject: [PATCH 09/14] Bump extras; pypng is now part of extras. --- INSTALL.md | 12 ++++++------ extras | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index befa3418a..f595ca176 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -7,8 +7,7 @@ These instructions explain how to set up the tools required to build. Python 2.7 is required. ```bash -sudo apt-get install make gcc bison git python python-pip -pip install pypng +sudo apt-get install make gcc bison git python git clone https://github.com/bentley/rgbds cd rgbds @@ -32,7 +31,6 @@ In **Terminal**, run: ```bash xcode-select --install -sudo easy_install pypng git clone https://github.com/bentley/rgbds cd rgbds @@ -54,7 +52,7 @@ make To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings. -In the installer, select the following packages: `make` `git` `python` `python-setuptools` `gcc-core` `libsasl2-3` `ca-certificates` +In the installer, select the following packages: `make` `git` `python` `gettext` Then get the most recent version of [**rgbds**](https://github.com/bentley/rgbds/releases/). Extract the archive and put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`. @@ -62,8 +60,6 @@ Extract the archive and put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\ In the **Cygwin terminal**: ```bash -lynx -source bootstrap.pypa.io/get-pip.py | python -pip install pypng git clone --recursive https://github.com/pret/pokecrystal cd pokecrystal @@ -74,3 +70,7 @@ To build **pokecrystal.gbc**: ```bash make ``` + +## notes + +- If `gettext` no longer exists, grab `libsasl2-3` `ca-certificates`. diff --git a/extras b/extras index 9644160b8..68edf51f1 160000 --- a/extras +++ b/extras @@ -1 +1 @@ -Subproject commit 9644160b87e706f3a6ae20fe09e9c469f628c06d +Subproject commit 68edf51f1070b056c281471242220f9c6142e1b6 From f6fc07d1c9fc1fdf9d95842d59879450b98fa721 Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 17 Feb 2016 17:12:51 -0500 Subject: [PATCH 10/14] Assume pokemon pics are 7x7 if not in base stats. --- gfx.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/gfx.py b/gfx.py index b39d919ef..abd53c5b0 100644 --- a/gfx.py +++ b/gfx.py @@ -32,17 +32,22 @@ def get_base_stats(): return base_stats def get_pokemon_dimensions(name): - if name == 'egg': - return 5, 5 - if name.startswith('unown_'): - name = 'unown' - base_stats = get_base_stats() - start = base_stats.find('\tdb ' + name.upper()) - start = base_stats.find('\tdn ', start) - end = base_stats.find('\n', start) - line = base_stats[start:end].replace(',', ' ') - w, h = map(int, line.split()[1:3]) - return w, h + try: + if name == 'egg': + return 5, 5 + if name == 'questionmark': + return 7, 7 + if name.startswith('unown_'): + name = 'unown' + base_stats = get_base_stats() + start = base_stats.find('\tdb ' + name.upper()) + start = base_stats.find('\tdn ', start) + end = base_stats.find('\n', start) + line = base_stats[start:end].replace(',', ' ') + w, h = map(int, line.split()[1:3]) + return w, h + except: + return 7, 7 def filepath_rules(filepath): """Infer attributes of certain graphics by their location in the filesystem.""" From 21a9fac5d04c5865ccdeac28e236067907a420c0 Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 17 Feb 2016 18:08:11 -0500 Subject: [PATCH 11/14] Decompress images in one step instead of having to invoke 'unlz'. --- gfx.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gfx.py b/gfx.py index abd53c5b0..75af28b80 100644 --- a/gfx.py +++ b/gfx.py @@ -58,6 +58,8 @@ def filepath_rules(filepath): filedir = filedir[2:] name, ext = os.path.splitext(filename) + if ext == '.lz': + name, ext = os.path.splitext(name) pokemon_name = '' @@ -104,22 +106,31 @@ def filepath_rules(filepath): def to_1bpp(filename, **kwargs): - _, ext = os.path.splitext(filename) + name, ext = os.path.splitext(filename) if ext == '.1bpp': pass elif ext == '.2bpp': gfx.export_2bpp_to_1bpp(filename, **kwargs) elif ext == '.png': gfx.export_png_to_1bpp(filename, **kwargs) + elif ext == '.lz': + decompress(filename, **kwargs) + to_1bpp(name, **kwargs) def to_2bpp(filename, **kwargs): - _, ext = os.path.splitext(filename) + name, ext = os.path.splitext(filename) if ext == '.1bpp': gfx.export_1bpp_to_2bpp(filename, **kwargs) elif ext == '.2bpp': pass elif ext == '.png': gfx.export_png_to_2bpp(filename, **kwargs) + elif ext == '.lz': + decompress(filename, **kwargs) + to_2bpp(name, **kwargs) def to_png(filename, **kwargs): - _, ext = os.path.splitext(filename) + name, ext = os.path.splitext(filename) if ext == '.1bpp': gfx.export_1bpp_to_png(filename, **kwargs) elif ext == '.2bpp': gfx.export_2bpp_to_png(filename, **kwargs) elif ext == '.png': pass + elif ext == '.lz': + decompress(filename, **kwargs) + to_png(name, **kwargs) def compress(filename, **kwargs): data = open(filename, 'rb').read() From 782cbc14d66e544ed78dc9d6468455baad239834 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 1 Mar 2016 20:58:00 -0500 Subject: [PATCH 12/14] Only use suffixes needed for intermediate rules. This is technically a hack, since keeping the .asm suffix was causing nonexistent rules to be evaluated as per the next commit. On the other hand, this is the intended purpose of .SUFFIXES. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cb6a66726..c1e16af65 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ PYTHON := python MD5 := md5sum -c --quiet -.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .lz .pal .bin .blk .tilemap +.SUFFIXES: +.SUFFIXES: .2bpp .PHONY: all clean crystal crystal11 .SECONDEXPANSION: From e11ef2b8d5d73fd8c56ee015c78b086aaf3daf02 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 1 Mar 2016 21:01:34 -0500 Subject: [PATCH 13/14] Only generate dependencies for a target when it's invoked. This means dependencies for unrelated targets aren't generated if you aren't building them. This makes "make clean" and building individual targets fast again. --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c1e16af65..44f872647 100644 --- a/Makefile +++ b/Makefile @@ -29,10 +29,6 @@ gfx/pics.o crystal11_obj := $(crystal_obj:.o=11.o) -$(foreach obj, $(crystal_obj:.o=), \ - $(eval $(obj)_dep := $(shell $(includes) $(obj).asm)) \ -) - roms := pokecrystal.gbc @@ -47,9 +43,15 @@ compare: pokecrystal.gbc pokecrystal11.gbc @$(MD5) roms.md5 %.asm: ; -$(crystal11_obj): %11.o: %.asm $$(%_dep) + +%11.o: dep = $(shell $(includes) $(@D)/$*.asm) +$(crystal11_obj): %11.o: +%11.o: %.asm $$(dep) rgbasm -D CRYSTAL11 -o $@ $< -$(crystal_obj): %.o: %.asm $$(%_dep) + +%.o: dep = $(shell $(includes) $(@D)/$*.asm) +$(crystal_obj): %.o: +%.o: %.asm $$(dep) rgbasm -o $@ $< pokecrystal11.gbc: $(crystal11_obj) From 0be6e6c910ea4ab7909d878aa12c4c7989d5ca13 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 1 Mar 2016 21:09:34 -0500 Subject: [PATCH 14/14] Remove useless lines in the makefile. The previous rules were composed this way but only because target-specific variables weren't used. As they are now, they actually do nothing. --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 44f872647..65c64ede0 100644 --- a/Makefile +++ b/Makefile @@ -45,12 +45,10 @@ compare: pokecrystal.gbc pokecrystal11.gbc %.asm: ; %11.o: dep = $(shell $(includes) $(@D)/$*.asm) -$(crystal11_obj): %11.o: %11.o: %.asm $$(dep) rgbasm -D CRYSTAL11 -o $@ $< %.o: dep = $(shell $(includes) $(@D)/$*.asm) -$(crystal_obj): %.o: %.o: %.asm $$(dep) rgbasm -o $@ $<