mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
rgbds variables in the makefile
this is for my own convenience but anyone using both rgbds 2 and 3 may find it useful
This commit is contained in:
parent
1439887b49
commit
021afb6831
31
Makefile
31
Makefile
@ -4,6 +4,11 @@ else
|
|||||||
SHA1 := sha1sum
|
SHA1 := sha1sum
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
RGBASM := rgbasm
|
||||||
|
RGBFIX := rgbfix
|
||||||
|
RGBGFX := rgbgfx
|
||||||
|
RGBLINK := rgblink
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.PHONY: all clean tools compare crystal crystal11
|
.PHONY: all clean tools compare crystal crystal11
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
@ -53,20 +58,20 @@ tools:
|
|||||||
|
|
||||||
%11.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
|
%11.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
|
||||||
%11.o: %.asm $$(dep)
|
%11.o: %.asm $$(dep)
|
||||||
rgbasm -D CRYSTAL11 -o $@ $<
|
$(RGBASM) -D CRYSTAL11 -o $@ $<
|
||||||
|
|
||||||
%.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
|
%.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
|
||||||
%.o: %.asm $$(dep)
|
%.o: %.asm $$(dep)
|
||||||
rgbasm -o $@ $<
|
$(RGBASM) -o $@ $<
|
||||||
|
|
||||||
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
|
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
|
||||||
rgblink -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -o $@ $(crystal11_obj)
|
$(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -o $@ $(crystal11_obj)
|
||||||
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
|
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
|
||||||
sort pokecrystal11.sym -o pokecrystal11.sym
|
sort pokecrystal11.sym -o pokecrystal11.sym
|
||||||
|
|
||||||
pokecrystal.gbc: $(crystal_obj) pokecrystal.link
|
pokecrystal.gbc: $(crystal_obj) pokecrystal.link
|
||||||
rgblink -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -o $@ $(crystal_obj)
|
$(RGBLINK) -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -o $@ $(crystal_obj)
|
||||||
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 $@
|
||||||
sort pokecrystal.sym -o pokecrystal.sym
|
sort pokecrystal.sym -o pokecrystal.sym
|
||||||
|
|
||||||
|
|
||||||
@ -105,11 +110,11 @@ gfx/pics/girafarig/front.animated.tilemap: gfx/pics/girafarig/front.2bpp gfx/pic
|
|||||||
### Pokemon pic graphics rules
|
### Pokemon pic graphics rules
|
||||||
|
|
||||||
gfx/pics/%/normal.gbcpal: gfx/pics/%/front.png
|
gfx/pics/%/normal.gbcpal: gfx/pics/%/front.png
|
||||||
rgbgfx -p $@ $<
|
$(RGBGFX) -p $@ $<
|
||||||
gfx/pics/%/normal.pal: gfx/pics/%/normal.gbcpal
|
gfx/pics/%/normal.pal: gfx/pics/%/normal.gbcpal
|
||||||
tools/palette -p $< > $@
|
tools/palette -p $< > $@
|
||||||
gfx/pics/%/back.2bpp: gfx/pics/%/back.png
|
gfx/pics/%/back.2bpp: gfx/pics/%/back.png
|
||||||
rgbgfx -h -o $@ $<
|
$(RGBGFX) -h -o $@ $<
|
||||||
gfx/pics/%/bitmask.asm: gfx/pics/%/front.animated.tilemap gfx/pics/%/front.dimensions
|
gfx/pics/%/bitmask.asm: gfx/pics/%/front.animated.tilemap gfx/pics/%/front.dimensions
|
||||||
tools/pokemon_animation -b $^ > $@
|
tools/pokemon_animation -b $^ > $@
|
||||||
gfx/pics/%/frames.asm: gfx/pics/%/front.animated.tilemap gfx/pics/%/front.dimensions
|
gfx/pics/%/frames.asm: gfx/pics/%/front.animated.tilemap gfx/pics/%/front.dimensions
|
||||||
@ -120,7 +125,7 @@ gfx/pics/%/front.animated.tilemap: gfx/pics/%/front.2bpp gfx/pics/%/front.dimens
|
|||||||
tools/pokemon_animation_graphics -t $@ $^
|
tools/pokemon_animation_graphics -t $@ $^
|
||||||
# Don't use -h, pokemon_animation_graphics takes care of it
|
# Don't use -h, pokemon_animation_graphics takes care of it
|
||||||
#gfx/pics/%/front.2bpp: gfx/pics/%/front.png
|
#gfx/pics/%/front.2bpp: gfx/pics/%/front.png
|
||||||
# rgbgfx -o $@ $<
|
# $(RGBGFX) -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
### Misc file-specific graphics rules
|
### Misc file-specific graphics rules
|
||||||
@ -194,19 +199,19 @@ gfx/unknown/171db1.2bpp: tools/gfx += --trim-whitespace
|
|||||||
%.blk: ;
|
%.blk: ;
|
||||||
|
|
||||||
%.2bpp: %.png
|
%.2bpp: %.png
|
||||||
rgbgfx $(rgbgfx) -o $@ $<
|
$(RGBGFX) $(rgbgfx) -o $@ $<
|
||||||
$(if $(tools/gfx),\
|
$(if $(tools/gfx),\
|
||||||
tools/gfx $(tools/gfx) -o $@ $@)
|
tools/gfx $(tools/gfx) -o $@ $@)
|
||||||
|
|
||||||
%.1bpp: %.png
|
%.1bpp: %.png
|
||||||
rgbgfx $(rgbgfx) -d1 -o $@ $<
|
$(RGBGFX) $(rgbgfx) -d1 -o $@ $<
|
||||||
$(if $(tools/gfx),\
|
$(if $(tools/gfx),\
|
||||||
tools/gfx $(tools/gfx) -d1 -o $@ $@)
|
tools/gfx $(tools/gfx) -d1 -o $@ $@)
|
||||||
|
|
||||||
%.tilemap: %.png
|
%.tilemap: %.png
|
||||||
rgbgfx -t $@ $<
|
$(RGBGFX) -t $@ $<
|
||||||
%.gbcpal: %.png
|
%.gbcpal: %.png
|
||||||
rgbgfx -p $@ $<
|
$(RGBGFX) -p $@ $<
|
||||||
%.pal: %.gbcpal
|
%.pal: %.gbcpal
|
||||||
tools/palette $< > $@
|
tools/palette $< > $@
|
||||||
%.dimensions: %.png
|
%.dimensions: %.png
|
||||||
|
Loading…
Reference in New Issue
Block a user