2 # makefile for CC65 runtime library (C16)
7 #--------------------------------------------------------------------------
12 AS = ../../src/ca65/ca65
13 CC = ../../src/cc65/cc65
14 LD = ../../src/ld65/ld65
16 AFLAGS = -t $(SYS) -I../../asminc
17 CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -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 %.ser: %.o ../runtime/zeropage.o
36 @$(LD) -t module -o $@ $^
38 %.tgi: %.o ../runtime/zeropage.o
39 @$(LD) -t module -o $@ $^
41 #--------------------------------------------------------------------------
62 #--------------------------------------------------------------------------
73 #--------------------------------------------------------------------------
78 all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
80 ../runtime/zeropage.o:
81 $(MAKE) -C $(dir $@) $(notdir $@)
84 @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
87 @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)