Advertisement
luckytyphlosion

Cries

Oct 24th, 2015
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.12 KB | None | 0 0
  1. #gawk sort order
  2. #export LC_CTYPE=C
  3.  
  4. .PHONY: all clean
  5.  
  6. .SUFFIXES: .asm .o .gbc
  7. .SECONDEXPANSION:
  8.  
  9. # Secondary expansion is required for dependency variables in object rules.
  10.  
  11.  
  12. ROMS := cries.gbc
  13. OBJS := cries.o
  14.  
  15. # If your default python is 3, you may want to change this to python27.
  16. PYTHON := python
  17.  
  18. # Collect file dependencies for objects in yellow/.
  19. # These aren't provided by rgbds by default, so we have to look for file includes ourselves.
  20. $(foreach obj, $(OBJS), \
  21.     $(eval $(obj:.o=)_dep := $(shell $(PYTHON) scan_includes.py $(obj:.o=.asm))) \
  22. )
  23.  
  24. all: cries.gbc
  25.  
  26. # Assemble source files into objects.
  27. # Queue payloads are here. These are made silent since there may be hundreds of targets.
  28. # Use rgbasm -h to use halts without nops.
  29. $(OBJS): $$*.asm $$($$*_dep) pcm.py
  30.     @$(PYTHON) pcm.py pcm $(pcmq)
  31.     rgbasm -h -o $@ $<
  32.  
  33. $(ROMS): $(OBJS)
  34.     rgbasm -p 0x00 -o cries.o cries.asm
  35.     rgblink -n cries.sym -o $@ $<
  36.     rgbfix -p 0x00 -Cjv -k OK -l 0x33 -m 0x1b -p 00 -r 3 -t "CRIES" $@
  37.    
  38. clean:
  39.     rm -f cries.o cries.gbc
  40.     find . \( -iname '*.pcm' \) -exec rm {} +
  41.  
  42. %.pcm: %.wav
  43.     $(eval pcmq += $<)
  44.     @rm -f $@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement