mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
9edd8087d3
git-svn-id: svn://svn.cc65.org/cc65/trunk@904 b7a2c559-68d2-44c3-8de9-860c34a00d81
62 lines
1.1 KiB
Makefile
62 lines
1.1 KiB
Makefile
#
|
|
# Makefile for cc65 samples
|
|
#
|
|
# This Makefile requires GNU make
|
|
#
|
|
|
|
# Enter the target system here
|
|
SYS = c64
|
|
|
|
CRT0 = ../libsrc/$(SYS).o
|
|
CLIB = ../libsrc/$(SYS).lib
|
|
CC = ../src/cc65/cc65
|
|
CL = ../src/cl65/cl65
|
|
AS = ../src/ca65/ca65
|
|
LD = ../src/ld65/ld65
|
|
C1541 = c1541
|
|
|
|
|
|
.c.o:
|
|
@echo $<
|
|
@$(CC) -Oirs -T --codesize 500 -g -t $(SYS) -I../include/ $<
|
|
@$(AS) $(basename $<).s
|
|
|
|
.s.o:
|
|
@echo $<
|
|
@$(AS) $(basename $<).s
|
|
|
|
|
|
.PHONY: all
|
|
all: nachtm hello sieve mousedemo
|
|
|
|
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 $@ $^
|
|
|
|
mousedemo: $(CRT0) mousedemo.o $(CLIB)
|
|
@$(LD) -t $(SYS) -m mousedemo.map -Ln mousedemo.lbl -o $@ $^
|
|
|
|
.PHONY: disk
|
|
disk: samples.d64
|
|
|
|
samples.d64: all
|
|
$(C1541) -format samples,AA d64 $@
|
|
$(C1541) -attach $@ -write nachtm -write hello -write sieve -write mousedemo
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f *~ *.map *.o *.s *.lbl
|
|
|
|
.PHONY: zap
|
|
zap: clean
|
|
rm -f nachtm hello sieve mousedemo samples.d64
|
|
|
|
|
|
|
|
|