mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 00:07:21 +00:00
a168e6ed64
git-svn-id: svn://svn.cc65.org/cc65/trunk@25 b7a2c559-68d2-44c3-8de9-860c34a00d81
57 lines
845 B
Makefile
57 lines
845 B
Makefile
#
|
|
# Makefile for cc65 samples
|
|
#
|
|
# This Makefile requires GNU make
|
|
#
|
|
|
|
# Enter the target system here
|
|
SYS = c64
|
|
|
|
CRT0 = ../lib/$(SYS).o
|
|
CLIB = ../lib/$(SYS).lib
|
|
CC = ../cc65/cc65
|
|
CL = ../cl65/cl65
|
|
AS = ../binutils/ca65/ca65
|
|
LD = ../binutils/ld65/ld65
|
|
C1541 = c1541
|
|
|
|
|
|
.c.o:
|
|
@echo $<
|
|
@$(CL) -c -Oirs -t $(SYS) -I../include/ $<
|
|
|
|
.s.o:
|
|
@echo $<
|
|
@$(CL) -c $(basename $<).s
|
|
|
|
|
|
.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
|
|
|
|
|
|
|
|
|