]> git.sur5r.net Git - cc65/blob - samples/Makefile
Added the mousedemo program, changed some makefile rules
[cc65] / samples / Makefile
1 #
2 # Makefile for cc65 samples
3 #
4 # This Makefile requires GNU make
5 #
6
7 # Enter the target system here
8 SYS     = c64
9
10 CRT0    = ../libsrc/$(SYS).o
11 CLIB    = ../libsrc/$(SYS).lib
12 CC      = ../src/cc65/cc65
13 CL      = ../src/cl65/cl65
14 AS      = ../src/ca65/ca65
15 LD      = ../src/ld65/ld65
16 C1541   = c1541
17
18
19 .c.o:
20         @echo $<
21         @$(CC) -Oirs -T --codesize 500 -g -t $(SYS) -I../include/ $<
22         @$(AS) $(basename $<).s
23
24 .s.o:
25         @echo $<
26         @$(AS) $(basename $<).s
27
28
29 .PHONY: all
30 all:    nachtm hello sieve mousedemo
31
32 nachtm: $(CRT0) nachtm.o $(CLIB)
33         @$(LD) -t $(SYS) -m nachtm.map -Ln nachtm.lbl -o $@ $^
34
35 hello:  $(CRT0) hello.o $(CLIB)
36         @$(LD) -t $(SYS) -m hello.map -Ln hello.lbl -o $@ $^
37
38 sieve:  $(CRT0) sieve.o $(CLIB)
39         @$(LD) -t $(SYS) -m sieve.map -Ln sieve.lbl -o $@ $^
40
41 mousedemo:      $(CRT0) mousedemo.o $(CLIB)
42         @$(LD) -t $(SYS) -m mousedemo.map -Ln mousedemo.lbl -o $@ $^
43
44 .PHONY: disk
45 disk:   samples.d64
46
47 samples.d64:    all
48         $(C1541) -format samples,AA  d64 $@
49         $(C1541) -attach $@ -write nachtm -write hello -write sieve -write mousedemo
50
51 .PHONY: clean
52 clean:
53         rm -f *~ *.map *.o *.s *.lbl
54
55 .PHONY: zap
56 zap:    clean
57         rm -f nachtm hello sieve mousedemo samples.d64
58
59
60
61