mirror of
https://github.com/pret/pokepinball.git
synced 2026-09-27 21:47:12 -04:00
36 lines
1.2 KiB
Makefile
Executable File
36 lines
1.2 KiB
Makefile
Executable File
# Build Pokemon Pinball.
|
|
outputrom := pokepinball.gbc
|
|
|
|
# Header options for rgbfix.
|
|
header_opts = -jsvc -k 01 -l 0x33 -m 0x1e -p 0 -r 02 -t "POKEPINBALLVPHE"
|
|
|
|
# If your default python is 3, you may want to change this to python27.
|
|
PYTHON := python
|
|
|
|
# Link objects together to build a rom.
|
|
all: main.o
|
|
rgblink -n pokepinball.sym -o $(outputrom) main.o
|
|
rgbfix $($header_opts) pokepinball.gbc
|
|
|
|
# Assemble source files into objects.
|
|
# Use rgbasm -h to use halts without nops.
|
|
main.o: main.asm bin
|
|
rgbasm -h -o main.o main.asm
|
|
|
|
# Create .bin dumps from baserom.gbc by scanning main.asm for INCBIN.
|
|
bin:
|
|
$(PYTHON) util/generate_bin_dumps.py main.asm
|
|
|
|
# The compare target is a shortcut to check that the build matches the original roms exactly.
|
|
# This is for contributors to make sure a change didn't affect the contents of the rom.
|
|
# More thorough comparison can be made by diffing the output of hexdump -C against both roms.
|
|
compare: $(outputrom) baserom.gbc
|
|
md5sum $(outputrom)
|
|
md5sum baserom.gbc
|
|
|
|
# Remove files generated by the build process.
|
|
clean:
|
|
rm -f $(outputrom) *.o poke*.sym *.sav
|
|
rm -rf bin
|
|
find . \( -iname '*.1bpp' -o -iname '*.pic' \) -exec rm {} +
|