shithub: pokecrystal

Download patch

ref: 8e1167a1e594f226af6fc46638ef9eb713913608
parent: e044b8ec08fee4a5d4f9cd942551ff94f2577b76
parent: 36f0bda0b33f5444241f1081b93f63f94a1b046a
author: yenatch <[email protected]>
date: Tue Feb 9 19:32:58 EST 2016

Merge branch 'fix-makefile'

git/query: bad hash adbc204d741bec7a68c1e6cd67751f226d0347cb
--- a/Makefile
+++ b/Makefile
@@ -10,22 +10,6 @@
 includes  := $(PYTHON) $(poketools)/scan_includes.py
 
 
-crystal11_obj := \
-wram11.o \
-crystal11.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 \
-misc/crystal_misc.o \
-text/common_text.o \
-gfx/pics.o
-
 crystal_obj := \
 wram.o \
 main.o \
@@ -32,21 +16,20 @@
 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
 
-all_obj := $(crystal_obj) crystal11.o wram11.o
+crystal11_obj := $(crystal_obj:.o=11.o)
 
-# object dependencies
-$(foreach obj, $(all_obj), \
-	$(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \
+$(foreach obj, $(crystal_obj:.o=), \
+	$(eval $(obj)_dep := $(shell $(includes) $(obj).asm)) \
 )
 
 
@@ -54,17 +37,18 @@
 
 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: ;
-$(all_obj): $$*.asm $$($$*_dep)
+$(crystal11_obj): %11.o: %.asm $$(%_dep)
+	rgbasm -D CRYSTAL11 -o $@ $<
+$(crystal_obj): %.o: %.asm $$(%_dep)
 	rgbasm -o $@ $<
 
 pokecrystal11.gbc: $(crystal11_obj)
--- a/crystal11.asm
+++ /dev/null
@@ -1,4 +1,0 @@
-CRYSTAL11 = 1
-CORRUPT_TILES = 1
-
-INCLUDE "main.asm"
--- a/data/egg_moves_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "data/egg_moves.asm"
--- a/data/evos_attacks_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "data/evos_attacks.asm"
--- a/engine/credits_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "engine/credits.asm"
--- a/engine/events_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "engine/events.asm"