]> git.sur5r.net Git - c128-kasse/blob - Makefile
modularized itemz and moved new credit manager stuff into credit_manager.c
[c128-kasse] / Makefile
1 # Note: this are my paths to cc65 as there is no gentoo ebuild, sorry for that.
2 # Please use the path below if you've installed cc65 system-wide
3 #CC=~/customSoftware/cc65-2.11.0/src/cc65/cc65 -I ~/customSoftware/cc65-2.11.0/include
4 #CA=~/customSoftware/cc65-2.11.0/src/ca65/ca65
5 #CL=~/customSoftware/cc65-2.11.0/src/cl65/cl65
6 CC=cc65
7 CA=ca65
8 CL=cl65
9
10 src/%.o: src/%.c include/%.h
11         ${CC} -O -I include -t c128 $<
12         ${CA} -I include -t c128 src/$$(basename $< .c).s
13
14 test/%.o: test/%.c
15         ${CC} -O -I include -t c128 $<
16         ${CA} -I include -t c128 test/$$(basename $< .c).s
17
18 kasse: src/config.o src/kasse.o src/general.o src/credit_manager.o src/c128time.o
19         # See above, please just kill the PATH-definition
20         # cp /tmp/cc65/lib/c128* .
21         PATH=${PATH}:~/customSoftware/cc65-2.11.0/src/ld65:/tmp/cc65/lib ${CL} -t c128 src/*.o -o kasse
22
23 itemz: src/config.o src/itemz.o src/general.o src/credit_manager.o
24         # See above, please just kill the PATH-definition
25         # cp /tmp/cc65/lib/c128* .
26         PATH=${PATH}:~/customSoftware/cc65-2.11.0/src/ld65:/tmp/cc65/lib ${CL} -t c128 src/config.o src/itemz.o src/general.o src/credit_manager.o -o itemz
27
28 all: kasse itemz
29
30 package: all
31         cp images/kasse.d64 .
32         c1541 -attach kasse.d64 -delete state || exit 0 
33         c1541 -attach kasse.d64 -delete items  || exit 0
34         c1541 -attach kasse.d64 -delete kasse  || exit 0
35         c1541 -attach kasse.d64 -delete itemz  || exit 0
36 #       c1541 -attach kasse.d64 -write itemz  || exit 0
37         c1541 -attach kasse.d64 -write kasse  || exit 0
38         c1541 -attach kasse.d64 -write state || exit 0 
39         c1541 -attach kasse.d64 -write items  || exit 0
40
41 test: src/config.o test/test.o src/general.o
42         ${CL} -t c128 src/config.o test/test.o src/general.o -o test
43
44 test-package: test
45         c1541 -attach test.d64 -delete state || exit 0 
46         c1541 -attach test.d64 -delete items  || exit 0
47         c1541 -attach test.d64 -delete test  || exit 0
48         c1541 -attach test.d64 -write test  || exit 0
49         c1541 -attach test.d64 -write state || exit 0 
50         c1541 -attach test.d64 -write items  || exit 0
51
52 clean:
53         rm -rf src/*.o src/*.s test/*.o test/*.s
54         
55 dist-clean: clean
56         rm kasse itemz kasse.d64