# There's a big size/speed tradeoff. For example, in release v0.3 (no icon),
# -O0 is 7088 bytes, -O1 is 5264 bytes, -O2 is 5296 bytes, and -O3 is 6036 bytes
# in 0.4
# -O0 is 10009 bytes, -O1 is 7453 bytes, -O2 is 7553 bytes, and -O3 is 8653

all: chordpro.prc makepdb
	cp chordpro.prc /home/httpd/html/yihchun

clean:
	rm -f hello *.bin *.hello.grc chordpro.prc makepdb

makepdb: makepdb.c common.h
	gcc -O6 -o makepdb makepdb.c -lz

tver0001.bin: hello.rcp resource.h
	../pilrc-2.7b/pilrc hello.rcp

hello: hello.c resource.h common.h
	m68k-palmos-gcc -Wall -I../ZLib -I/usr/local/palmdev/sdk/Incs/Core/System/Unix/ -I/usr/local/palmdev/sdk/Incs/Core -I/usr/local/palmdev/sdk/Incs -I/usr/local/palmdev/sdk/Incs/Core/Hardware -I/usr/local/palmdev/sdk/Incs/Core/System -I/usr/local/palmdev/sdk/Incs/Core/UI -O3 -L. hello.c -o hello -lz

code0000.hello.grc: hello
	m68k-palmos-obj-res hello

chordpro.prc: code0000.hello.grc tver0001.bin
	build-prc -z 2 chordpro.prc "ChordPro" PCdP *.bin *.hello.grc
