2 # makefile for CC65 runtime library
8 #--------------------------------------------------------------------------
13 AS = ../../src/ca65/ca65
14 CC = ../../src/cc65/cc65
15 LD = ../../src/ld65/ld65
17 AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
18 CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
20 #--------------------------------------------------------------------------
25 @$(AS) -o $@ $(AFLAGS) $(*).s
28 @$(AS) -g -o $@ $(AFLAGS) $<
30 %.emd: %.o ../runtime/zeropage.o
31 @$(LD) -t module -o $@ $^
33 %.joy: %.o ../runtime/zeropage.o
34 @$(LD) -t module -o $@ $^
36 %.mou: %.o ../runtime/zeropage.o
37 @$(LD) -t module -o $@ $^
39 %.ser: %.o ../runtime/zeropage.o
40 @$(LD) -t module -o $@ $^
42 %.tgi: %.o ../runtime/zeropage.o
43 @$(LD) -t module -o $@ $^
45 #--------------------------------------------------------------------------
72 #--------------------------------------------------------------------------
75 EMDS = c64-c256k.emd \
85 JOYS = c64-hitjoy.joy \
96 TGIS = c64-320-200-2.tgi
98 #--------------------------------------------------------------------------
101 .PHONY: all clean zap
103 all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
105 ../runtime/zeropage.o:
106 $(MAKE) -C $(dir $@) $(notdir $@)
109 @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
112 @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)