]> git.sur5r.net Git - c128-kasse/blob - Makefile
Add hex viewer "cat"
[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/c128time.o src/config.o src/kasse.o src/general.o src/credit_manager.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 cat: src/general.o src/cat.o
29         ${CL} -t c128 src/general.o src/cat.o -o cat
30
31 all: kasse itemz
32
33 package: all
34         cp images/kasse.d64 .
35         c1541 -attach kasse.d64 -delete state || exit 0 
36         c1541 -attach kasse.d64 -delete items  || exit 0
37         c1541 -attach kasse.d64 -delete kasse  || exit 0
38         c1541 -attach kasse.d64 -delete itemz  || exit 0
39         c1541 -attach kasse.d64 -write kasse  || exit 0
40         c1541 -attach kasse.d64 -write itemz  || exit 0
41 #       c1541 -attach kasse.d64 -write state || exit 0 
42 #       c1541 -attach kasse.d64 -write items  || exit 0
43
44 test: src/config.o test/test.o src/general.o
45         ${CL} -t c128 src/config.o test/test.o src/general.o -o test
46
47 test-package: test
48         c1541 -attach test.d64 -delete state || exit 0 
49         c1541 -attach test.d64 -delete items  || exit 0
50         c1541 -attach test.d64 -delete test  || exit 0
51         c1541 -attach test.d64 -write test  || exit 0
52         c1541 -attach test.d64 -write state || exit 0 
53         c1541 -attach test.d64 -write items  || exit 0
54
55 clean:
56         rm -rf src/*.o src/*.s test/*.o test/*.s
57         
58 dist-clean: clean
59         rm kasse itemz kasse.d64