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 "D:"
12 # needs UCASE_FILENAME to be defined, otherwise no effect
14 ATARIDEFS = -DNUMDRVS=4 -DUCASE_FILENAME=1 -DDEFAULT_DEVICE=1 -DLINEBUF=80
18 #--------------------------------------------------------------------------
23 AS = ../../src/ca65/ca65
24 CC = ../../src/cc65/cc65
25 LD = ../../src/ld65/ld65
27 AFLAGS = -t $(SYS) -I../../asminc
28 CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
30 #--------------------------------------------------------------------------
34 @$(CC) $(CFLAGS) $(ATARIDEFS) $<
35 @$(AS) -o $@ $(AFLAGS) $(*).s
38 @$(AS) -g -o $@ $(AFLAGS) $(ATARIDEFS) $<
40 %.emd: %.o ../runtime/zeropage.o
41 @$(LD) -t module -o $@ $^
43 %.joy: %.o ../runtime/zeropage.o
44 @$(LD) -t module -o $@ $^
46 %.tgi: %.o ../runtime/zeropage.o
47 @$(LD) -t module -o $@ $^
49 #--------------------------------------------------------------------------
109 #--------------------------------------------------------------------------
114 JOYS = atari-stdjoy.joy
118 #--------------------------------------------------------------------------
121 all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
123 ../runtime/zeropage.o:
124 $(MAKE) -C $(dir $@) $(notdir $@)
127 @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
130 @$(RM) $(EMDS) $(JOYS) $(TGIS)