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 --codesize 500 -g -t $(SYS) -I../include/ $<
22 @$(AS) $(basename $<).s
26 @$(AS) $(basename $<).s
30 all: nachtm hello sieve
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 $@ $^
49 rm -f *~ *.map *.o *.s *.lbl