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) --forget-inc-paths -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 %.mou: %.o ../runtime/zeropage.o
36 @$(LD) -t module -o $@ $^
38 %.ser: %.o ../runtime/zeropage.o
39 @$(LD) -t module -o $@ $^
41 %.tgi: %.o ../runtime/zeropage.o
42 @$(LD) -t module -o $@ $^
44 #--------------------------------------------------------------------------
74 #--------------------------------------------------------------------------
77 EMDS = c128-georam.emd \
84 JOYS = c128-ptvjoy.joy \
87 MOUS = c128-1351.mou \
91 SERS = c128-swlink.ser
93 TGIS = c128-640-200-2.tgi \
96 #--------------------------------------------------------------------------
101 all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
103 ../runtime/zeropage.o:
104 $(MAKE) -C $(dir $@) $(notdir $@)
107 @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
111 @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)