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 #--------------------------------------------------------------------------
23 @$(CC) -o $(notdir $(*).s) $(CFLAGS) $<
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 %.ser: %.o ../runtime/zeropage.o
36 @$(LD) -t module -o $@ $^
38 %.tgi: %.o ../runtime/zeropage.o
39 @$(LD) -t module -o $@ $^
41 #--------------------------------------------------------------------------
106 #--------------------------------------------------------------------------
111 JOYS = apple2-stdjoy.joy
113 SERS = apple2-ssc.ser
115 TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
117 #--------------------------------------------------------------------------
120 .PHONY: all clean zap
122 all: $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
124 ../runtime/zeropage.o:
125 $(MAKE) -C $(dir $@) $(notdir $@)
128 @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
131 @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)