2 # makefile for CC65 Atari runtime library
4 # NUMDRVS - number of supported drives (max. 16)
5 # 4 bytes for each device are statically allocated
6 # LINEBUF - support line buffered reads from E: (the number specifies
7 # the length of the buffer)
8 # UCASE_FILENAME - all filenames get uppercased
9 # DEFAULT_DEVICE - if the string passed to the uppercase function doesn't
10 # include a device (":" at position 2 or 3), provide "Dn:"
11 # as a default disk device
12 # n is the value of DEFAULT_DEVICE, unless DYNAMIC_DD is
13 # also set, in which case it's overridden by a runtime
14 # check (on SpartaDOS only)
15 # needs UCASE_FILENAME to be defined, otherwise no effect
16 # DYNAMIC_DD - determine default disk device at runtime (SpartaDOS only)
17 # needs DEFAULT_DEVICE to be defined, otherwise no effect
19 ATARIDEFS = -DNUMDRVS=4 -DUCASE_FILENAME=1 -DDEFAULT_DEVICE=1 -DLINEBUF=80
20 ATARIDEFS += -DDYNAMIC_DD=1
24 #--------------------------------------------------------------------------
29 AS = ../../src/ca65/ca65
30 CC = ../../src/cc65/cc65
31 LD = ../../src/ld65/ld65
33 AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
34 CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
36 #--------------------------------------------------------------------------
40 @$(CC) $(CFLAGS) $(ATARIDEFS) $<
41 @$(AS) -o $@ $(AFLAGS) $(*).s
44 @$(AS) -g -o $@ $(AFLAGS) $(ATARIDEFS) $<
46 %.emd: %.o ../runtime/zeropage.o
47 @$(LD) -t module -o $@ $^
49 %.joy: %.o ../runtime/zeropage.o
50 @$(LD) -t module -o $@ $^
52 %.tgi: %.o ../runtime/zeropage.o atari_tgi_common.inc
53 @$(LD) -t module -o $@ $< ../runtime/zeropage.o
56 #--------------------------------------------------------------------------
126 #--------------------------------------------------------------------------
131 JOYS = atari-stdjoy.joy atari-multijoy.joy
133 TGIS = atari-3.tgi atari-4.tgi atari-5.tgi atari-6.tgi atari-7.tgi atari-8.tgi \
134 atari-9.tgi atari-10.tgi atari-11.tgi atari-14.tgi atari-15.tgi atari-8p2.tgi \
135 atari-9p2.tgi atari-10p2.tgi atari-15p2.tgi
137 #--------------------------------------------------------------------------
140 all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
142 ../runtime/zeropage.o:
143 $(MAKE) -C $(dir $@) $(notdir $@)
146 @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
149 @$(RM) $(EMDS) $(JOYS) $(TGIS)