2 # makefile for CC65 runtime library
7 #--------------------------------------------------------------------------
12 AS = ../../src/ca65/ca65
13 CC = ../../src/cc65/cc65
14 CO = ../../src/co65/co65
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) $<
31 @$(CO) -o $(*)-emd.s --code-label _$(subst -,_,$(*)) $<
32 @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
35 @$(CO) -o $(*)-joy.s --code-label _$(subst -,_,$(*)) $<
36 @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
39 @$(CO) -o $(*)-mou.s --code-label _$(subst -,_,$(*)) $<
40 @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
43 @$(CO) -o $(*)-ser.s --code-label _$(subst -,_,$(*)) $<
44 @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
47 @$(CO) -o $(*)-tgi.s --code-label _$(subst -,_,$(*)) $<
48 @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
50 %.emd: %.o ../runtime/zeropage.o
51 @$(LD) -o $@ -t module $^
53 %.joy: %.o ../runtime/zeropage.o
54 @$(LD) -o $@ -t module $^
56 %.mou: %.o ../runtime/zeropage.o
57 @$(LD) -o $@ -t module $^
59 %.ser: %.o ../runtime/zeropage.o
60 @$(LD) -o $@ -t module $^
62 %.tgi: %.o ../runtime/zeropage.o
63 @$(LD) -o $@ -t module $^
65 #--------------------------------------------------------------------------
102 $(EMDS:.emd=-emd.o) \
103 $(JOYS:.joy=-joy.o) \
104 $(MOUS:.mou=-mou.o) \
105 $(SERS:.ser=-ser.o) \
109 #--------------------------------------------------------------------------
114 JOYS = atmos-pase.joy
118 SERS = atmos-acia.ser
120 TGIS = atmos-240-200-2.tgi atmos-228-200-3.tgi
122 #--------------------------------------------------------------------------
125 .PHONY: all clean zap
127 all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
129 ../runtime/zeropage.o:
130 $(MAKE) -C $(dir $@) $(notdir $@)
134 $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
135 $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
136 $(MOUS:.mou=.o) $(MOUS:.mou=-mou.s) \
137 $(SERS:.ser=.o) $(SERS:.ser=-ser.s) \
138 $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
141 @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)