]> git.sur5r.net Git - cc65/blob - samples/Makefile
Make the voice data unsigned
[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 # --------------------------------------------------------------------------
20 # Generic rules
21
22 .c.o:
23         @echo $<
24         @$(CC) -Oirs -T --codesize 500 -g -t $(SYS) -I../include/ $<
25         @$(AS) $(basename $<).s
26
27 .s.o:
28         @echo $<
29         @$(AS) $(basename $<).s
30
31
32 # --------------------------------------------------------------------------
33 # Rules how to make each one of the binaries
34
35 EXELIST=hello mousedemo nachtm plasma sieve
36
37 .PHONY: all
38 all:    $(EXELIST)
39
40 hello:  $(CRT0) hello.o $(CLIB)
41         @$(LD) -t $(SYS) -m hello.map -Ln hello.lbl -o $@ $^
42
43 mousedemo:      $(CRT0) mousedemo.o $(CLIB)
44         @$(LD) -t $(SYS) -m mousedemo.map -Ln mousedemo.lbl -o $@ $^
45
46 nachtm: $(CRT0) nachtm.o $(CLIB)
47         @$(LD) -t $(SYS) -m nachtm.map -Ln nachtm.lbl -o $@ $^
48
49 plasma: $(CRT0) plasma.o $(CLIB)
50         @$(LD) -t $(SYS) -m nachtm.map -Ln nachtm.lbl -o $@ $^
51
52 sieve:  $(CRT0) sieve.o $(CLIB)
53         @$(LD) -t $(SYS) -m sieve.map -Ln sieve.lbl -o $@ $^
54
55
56 # --------------------------------------------------------------------------
57 # Rule to make a disk with all samples. Needs the c1541 program that comes
58 # with the VICE emulator.
59
60 .PHONY: disk
61 disk:   samples.d64
62
63 samples.d64:    all
64         $(C1541) -format samples,AA  d64 $@
65         for exe in $(EXELIST); do\
66             $(C1541) -attach $@ -write $$exe;\
67         done
68
69
70 # --------------------------------------------------------------------------
71 # Cleanup rules
72
73 .PHONY: clean
74 clean:
75         rm -f *~ *.map *.o *.s *.lbl
76
77 .PHONY: zap
78 zap:    clean
79         rm -f $(EXELIST) samples.d64
80
81
82
83