2 # Makefile for cc65 samples
4 # This Makefile requires GNU make
7 # Enter the target system here
10 CRT0 = ../libsrc/$(SYS).o
11 CLIB = ../libsrc/$(SYS).lib
19 # --------------------------------------------------------------------------
24 @$(CC) -Oirs -T --codesize 500 -g -t $(SYS) -I../include/ $<
25 @$(AS) $(basename $<).s
29 @$(AS) $(basename $<).s
32 # --------------------------------------------------------------------------
33 # Rules how to make each one of the binaries
35 EXELIST=hello mousedemo nachtm plasma sieve tgidemo
40 hello: $(CRT0) hello.o $(CLIB)
41 @$(LD) -t $(SYS) -m hello.map -Ln hello.lbl -o $@ $^
43 mousedemo: $(CRT0) mousedemo.o $(CLIB)
44 @$(LD) -t $(SYS) -m mousedemo.map -Ln mousedemo.lbl -o $@ $^
46 nachtm: $(CRT0) nachtm.o $(CLIB)
47 @$(LD) -t $(SYS) -vm -m nachtm.map -Ln nachtm.lbl -o $@ $^
49 plasma: $(CRT0) plasma.o $(CLIB)
50 @$(LD) -t $(SYS) -m plasma.map -Ln nachtm.lbl -o $@ $^
52 sieve: $(CRT0) sieve.o $(CLIB)
53 @$(LD) -t $(SYS) -m sieve.map -Ln sieve.lbl -o $@ $^
55 tgidemo: $(CRT0) tgidemo.o $(CLIB)
56 @$(LD) -t $(SYS) -m tgidemo.map -Ln tgidemo.lbl -o $@ $^
59 # --------------------------------------------------------------------------
60 # Rule to make a disk with all samples. Needs the c1541 program that comes
61 # with the VICE emulator.
67 $(C1541) -format samples,AA d64 $@
68 for exe in $(EXELIST); do\
69 $(C1541) -attach $@ -write $$exe;\
73 # --------------------------------------------------------------------------
78 rm -f *~ *.map *.o *.s *.lbl
82 rm -f $(EXELIST) samples.d64