aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2015-10-24 14:50:59 -0700
committerMarcus Huderle <huderlem@gmail.com>2015-10-24 19:43:39 -0700
commit38537b052b24e58fc7ef8823487d7e520f7e4c09 (patch)
tree6ee7ff01279416cf6c7a61c2fff7d5054c5fd591 /Makefile
parentdata/facing.asm, titlescreen functions, oam/sprite related functions, other m... (diff)
downloadpokeyellow-38537b052b24e58fc7ef8823487d7e520f7e4c09.tar.gz
pokeyellow-38537b052b24e58fc7ef8823487d7e520f7e4c09.tar.xz
pokeyellow-38537b052b24e58fc7ef8823487d7e520f7e4c09.zip
Convert pikachu cries to .wav files, and process .wav files into .pcm files at compile-time.
Update pret
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ecbeb32a..c14eb599 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ compare: yellow
# Clear the default suffixes.
.SUFFIXES:
-.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic
+.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic .wav .pcm
# Secondary expansion is required for dependency variables in object rules.
.SECONDEXPANSION:
@@ -44,6 +44,7 @@ compare: yellow
# Filepath shortcuts to avoid overly long recipes.
poketools := extras/pokemontools
gfx := $(PYTHON) $(poketools)/gfx.py
+pcm := $(PYTHON) $(poketools)/pcm.py
pic := $(PYTHON) $(poketools)/pic.py
includes := $(PYTHON) $(poketools)/scan_includes.py
@@ -61,16 +62,19 @@ $(foreach obj, $(all_obj), \
)
-# Image files are added to a queue to reduce build time. They're converted when building parent objects.
+# Image and audio files are added to a queue to reduce build time. They're converted when building parent objects.
%.png: ;
%.2bpp: %.png ; $(eval 2bppq += $<) @rm -f $@
%.1bpp: %.png ; $(eval 1bppq += $<) @rm -f $@
%.pic: %.2bpp ; $(eval picq += $<) @rm -f $@
+%.wav: ;
+%.pcm: %.wav ; $(eval pcmq += $<) @rm -f $@
# Assemble source files into objects.
# Queue payloads are here. These are made silent since there may be hundreds of targets.
# Use rgbasm -h to use halts without nops.
$(all_obj): $$*.asm $$($$*_dep)
+ @$(pcm) pcm $(pcmq); $(eval pcmq :=)
@$(gfx) 2bpp $(2bppq); $(eval 2bppq :=)
@$(gfx) 1bpp $(1bppq); $(eval 1bppq :=)
@$(pic) compress $(picq); $(eval picq :=)
@@ -89,4 +93,4 @@ poke%.gbc: $$(%_obj)
clean:
rm -f $(roms) $(all_obj) poke*.sym
- find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} + \ No newline at end of file
+ find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -exec rm {} + \ No newline at end of file