version-neutral build targets

pokecrystal will probably never build gold/silver, but who knows
This commit is contained in:
yenatch 2013-11-21 21:15:37 -05:00
parent f6706ecb09
commit 02e8b4c7b6

View File

@ -6,7 +6,10 @@ PYTHON := python
TEXTFILES := $(shell find ./ -type f -name '*.asm' | grep -v globals.asm) TEXTFILES := $(shell find ./ -type f -name '*.asm' | grep -v globals.asm)
TEXTQUEUE := TEXTQUEUE :=
OBJS := wram.o main.o CRYSTAL_OBJS := wram.o main.o
OBJS := $(CRYSTAL_OBJS)
ROMS := pokecrystal.gbc
PNGS := $(shell find gfx/ -type f -name '*.png') PNGS := $(shell find gfx/ -type f -name '*.png')
LZS := $(shell find gfx/ -type f -name '*.lz') LZS := $(shell find gfx/ -type f -name '*.lz')
@ -21,10 +24,11 @@ $(shell \
) \ ) \
) )
all: baserom.gbc globals.asm pokecrystal.gbc all: baserom.gbc globals.asm $(ROMS)
cmp baserom.gbc pokecrystal.gbc cmp baserom.gbc pokecrystal.gbc
clean: clean:
rm -f pokecrystal.o pokecrystal.gbc rm -f $(ROMS)
rm -f $(OBJS)
rm -f globals.asm globals.tx rm -f globals.asm globals.tx
@echo 'Removing preprocessed .tx files...' @echo 'Removing preprocessed .tx files...'
@rm -f $(TEXTFILES:.asm=.tx) @rm -f $(TEXTFILES:.asm=.tx)
@ -45,7 +49,7 @@ globals.asm: $(TEXTFILES:.asm=.tx)
$(OBJS): $$(patsubst %.o,%.tx,$$@) $$(patsubst %.asm,%.tx,$$(OBJ_$$(patsubst %.o,%,$$@))) $(OBJS): $$(patsubst %.o,%.tx,$$@) $$(patsubst %.asm,%.tx,$$(OBJ_$$(patsubst %.o,%,$$@)))
rgbasm -o $@ $(@:.o=.tx) rgbasm -o $@ $(@:.o=.tx)
pokecrystal.gbc: $(OBJS) pokecrystal.gbc: $(CRYSTAL_OBJS)
rgblink -n pokecrystal.sym -m pokecrystal.map -o pokecrystal.gbc $^ rgblink -n pokecrystal.sym -m pokecrystal.map -o pokecrystal.gbc $^
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@