2 # makefile for CC65 runtime library
7 #--------------------------------------------------------------------------
12 AS = ../../src/ca65/ca65
13 CC = ../../src/cc65/cc65
14 LD = ../../src/ld65/ld65
16 AFLAGS = -t $(SYS) -I../apple2 -I../../asminc
17 CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I ../apple2 -I ../../include
19 #--------------------------------------------------------------------------
24 @$(AS) -o $@ $(AFLAGS) $(*).s
27 @$(AS) -g -o $@ $(AFLAGS) $<
29 %.emd: %.o ../runtime/zeropage.o
30 @$(LD) -t module -o $@ $^
32 %.joy: %.o ../runtime/zeropage.o
33 @$(LD) -t module -o $@ $^
35 %.tgi: %.o ../runtime/zeropage.o
36 @$(LD) -t module -o $@ $^
38 #--------------------------------------------------------------------------
86 #--------------------------------------------------------------------------
91 JOYS = apple2-stdjoy.joy
95 TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
97 #--------------------------------------------------------------------------
100 .PHONY: all clean zap
102 all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
104 ../runtime/zeropage.o:
105 $(MAKE) -C $(dir $@) $(notdir $@)
108 @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
111 @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)