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. -I../../asminc
17 CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -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) -o $@ -t module $^
32 %.joy: %.o ../runtime/zeropage.o
33 @$(LD) -o $@ -t module $^
35 %.mou: %.o ../runtime/zeropage.o
36 @$(LD) -o $@ -t module $^
38 %.ser: %.o ../runtime/zeropage.o
39 @$(LD) -o $@ -t module $^
41 %.tgi: %.o ../runtime/zeropage.o
42 @$(LD) -o $@ -t module $^
44 #--------------------------------------------------------------------------
54 #--------------------------------------------------------------------------
59 JOYS = geos-stdjoy.joy
61 MOUS = #geos-stdmou.mou
67 #--------------------------------------------------------------------------
70 include $(addsuffix /Makefile, $(DIRS))
74 #--------------------------------------------------------------------------
79 all: $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
81 ../runtime/zeropage.o:
82 $(MAKE) -C $(dir $@) $(notdir $@)
85 @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
88 @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)