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
21 @$(CC) -Oirs -T --codesize 500 -g -t $(SYS) -I../include/ $<
22 @$(AS) $(basename $<).s
26 @$(AS) $(basename $<).s
30 all: nachtm hello sieve mousedemo
32 nachtm: $(CRT0) nachtm.o $(CLIB)
33 @$(LD) -t $(SYS) -m nachtm.map -Ln nachtm.lbl -o $@ $^
35 hello: $(CRT0) hello.o $(CLIB)
36 @$(LD) -t $(SYS) -m hello.map -Ln hello.lbl -o $@ $^
38 sieve: $(CRT0) sieve.o $(CLIB)
39 @$(LD) -t $(SYS) -m sieve.map -Ln sieve.lbl -o $@ $^
41 mousedemo: $(CRT0) mousedemo.o $(CLIB)
42 @$(LD) -t $(SYS) -m mousedemo.map -Ln mousedemo.lbl -o $@ $^
48 $(C1541) -format samples,AA d64 $@
49 $(C1541) -attach $@ -write nachtm -write hello -write sieve -write mousedemo
53 rm -f *~ *.map *.o *.s *.lbl
57 rm -f nachtm hello sieve mousedemo samples.d64