2 # makefile for CC65 runtime library
8 #--------------------------------------------------------------------------
13 AS = ../../src/ca65/ca65
14 CC = ../../src/cc65/cc65
15 LD = ../../src/ld65/ld65
17 AFLAGS = -t $(SYS) -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) $<
30 %.emd: %.o ../runtime/zeropage.o
31 @$(LD) -t module -o $@ $^
33 %.joy: %.o ../runtime/zeropage.o
34 @$(LD) -t module -o $@ $^
36 %.mou: %.o ../runtime/zeropage.o
37 @$(LD) -t module -o $@ $^
39 %.ser: %.o ../runtime/zeropage.o
40 @$(LD) -t module -o $@ $^
42 %.tgi: %.o ../runtime/zeropage.o
43 @$(LD) -t module -o $@ $^
45 #--------------------------------------------------------------------------
69 #--------------------------------------------------------------------------
72 EMDS = c64-georam.emd c64-ram.emd c64-ramcart.emd c64-reu.emd c64-vdc.emd dtv-himem.emd
74 JOYS = c64-hitjoy.joy c64-numpad.joy c64-ptvjoy.joy c64-stdjoy.joy
76 MOUS = c64-1351.mou c64-joymouse.mou c64-potmouse.mou
80 TGIS = c64-320-200-2.tgi
82 #--------------------------------------------------------------------------
87 all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
89 ../runtime/zeropage.o:
90 $(MAKE) -C $(dir $@) $(notdir $@)
93 @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
96 @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)