2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# Makefile for cc65 samples
|
|
|
|
#
|
2000-06-06 17:45:06 +00:00
|
|
|
# This Makefile requires GNU make
|
|
|
|
#
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
# Enter the target system here
|
|
|
|
SYS = c64
|
|
|
|
|
2000-06-14 21:14:47 +00:00
|
|
|
CRT0 = ../libsrc/$(SYS).o
|
|
|
|
CLIB = ../libsrc/$(SYS).lib
|
|
|
|
CC = ../src/cc65/cc65
|
|
|
|
CL = ../src/cl65/cl65
|
|
|
|
AS = ../src/ca65/ca65
|
|
|
|
LD = ../src/ld65/ld65
|
2000-05-28 13:40:48 +00:00
|
|
|
C1541 = c1541
|
|
|
|
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
@echo $<
|
2001-07-14 14:44:44 +00:00
|
|
|
@$(CC) -Oirs --codesize 500 -g -t $(SYS) -I../include/ $<
|
2000-06-14 21:14:47 +00:00
|
|
|
@$(AS) $(basename $<).s
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
.s.o:
|
|
|
|
@echo $<
|
2000-06-14 21:14:47 +00:00
|
|
|
@$(AS) $(basename $<).s
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: nachtm hello sieve
|
|
|
|
|
|
|
|
nachtm: $(CRT0) nachtm.o $(CLIB)
|
|
|
|
@$(LD) -t $(SYS) -m nachtm.map -Ln nachtm.lbl -o $@ $^
|
|
|
|
|
|
|
|
hello: $(CRT0) hello.o $(CLIB)
|
|
|
|
@$(LD) -t $(SYS) -m hello.map -Ln hello.lbl -o $@ $^
|
|
|
|
|
|
|
|
sieve: $(CRT0) sieve.o $(CLIB)
|
|
|
|
@$(LD) -t $(SYS) -m sieve.map -Ln sieve.lbl -o $@ $^
|
|
|
|
|
|
|
|
.PHONY: disk
|
|
|
|
disk: c64.d64
|
|
|
|
|
|
|
|
c64.d64: all
|
|
|
|
$(C1541) < c1541.rsp
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f *~ *.map *.o *.s *.lbl
|
|
|
|
|
|
|
|
.PHONY: zap
|
|
|
|
zap: clean
|
|
|
|
rm -f nachtm hello
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|