2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 Atari runtime library
|
|
|
|
#
|
2000-10-16 23:22:07 +00:00
|
|
|
# NUMDRVS - number of supported drives (max. 16)
|
2003-11-14 22:39:16 +00:00
|
|
|
# 4 bytes for each device are statically allocated
|
2004-05-28 22:04:33 +00:00
|
|
|
# LINEBUF - support line buffered reads from E: (the number specifies
|
2004-05-28 22:05:01 +00:00
|
|
|
# the length of the buffer)
|
2002-07-24 21:42:27 +00:00
|
|
|
# UCASE_FILENAME - all filenames get uppercased
|
2003-11-14 22:39:16 +00:00
|
|
|
# DEFAULT_DEVICE - if the string passed to the uppercase function doesn't
|
2004-12-16 22:41:14 +00:00
|
|
|
# include a device (":" at position 2 or 3), provide "Dn:"
|
|
|
|
# as a default disk device
|
|
|
|
# n is the value of DEFAULT_DEVICE, unless DYNAMIC_DD is
|
|
|
|
# also set, in which case it's overridden by a runtime
|
|
|
|
# check (on SpartaDOS only)
|
2003-11-14 22:39:16 +00:00
|
|
|
# needs UCASE_FILENAME to be defined, otherwise no effect
|
2004-12-16 22:41:14 +00:00
|
|
|
# DYNAMIC_DD - determine default disk device at runtime (SpartaDOS only)
|
|
|
|
# needs DEFAULT_DEVICE to be defined, otherwise no effect
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2004-12-16 22:41:14 +00:00
|
|
|
ATARIDEFS = -DNUMDRVS=4 -DUCASE_FILENAME=1 -DDEFAULT_DEVICE=1 -DLINEBUF=80
|
|
|
|
ATARIDEFS += -DDYNAMIC_DD=1
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 19:28:26 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = atari
|
|
|
|
|
|
|
|
AS = ../../src/ca65/ca65
|
|
|
|
CC = ../../src/cc65/cc65
|
|
|
|
LD = ../../src/ld65/ld65
|
|
|
|
|
|
|
|
AFLAGS = -t $(SYS) -I../../asminc
|
|
|
|
CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
|
|
|
|
|
2002-12-21 09:10:15 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $(ATARIDEFS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $(ATARIDEFS) $<
|
|
|
|
|
2002-12-21 09:10:15 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2003-08-12 17:24:02 +00:00
|
|
|
OBJS = _scrsize.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
break.o \
|
|
|
|
cclear.o \
|
|
|
|
cgetc.o \
|
|
|
|
chline.o \
|
|
|
|
clock.o \
|
|
|
|
close.o \
|
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
cputc.o \
|
|
|
|
crt0.o \
|
|
|
|
ctype.o \
|
|
|
|
cvline.o \
|
|
|
|
dio_cts.o \
|
|
|
|
dio_stc.o \
|
|
|
|
diopncls.o \
|
2005-02-19 00:58:26 +00:00
|
|
|
dioqsize.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
dioread.o \
|
|
|
|
diowrite.o \
|
|
|
|
diowritev.o \
|
|
|
|
dosdetect.o \
|
|
|
|
fdtable.o \
|
|
|
|
getargs.o \
|
|
|
|
getdefdev.o \
|
|
|
|
getfd.o \
|
|
|
|
gotox.o \
|
|
|
|
gotoy.o \
|
|
|
|
gotoxy.o \
|
|
|
|
graphics.o \
|
|
|
|
graphuse.o \
|
|
|
|
joy_stddrv.o \
|
|
|
|
kbhit.o \
|
|
|
|
lseek.o \
|
|
|
|
mouse.o \
|
|
|
|
mul40.o \
|
|
|
|
open.o \
|
|
|
|
oserrlist.o \
|
|
|
|
oserror.o \
|
|
|
|
ostype.o \
|
|
|
|
randomize.o \
|
|
|
|
read.o \
|
|
|
|
revers.o \
|
|
|
|
rs232.o \
|
|
|
|
rwcommon.o \
|
|
|
|
savevec.o \
|
|
|
|
scroll.o \
|
|
|
|
setcolor.o \
|
|
|
|
siocall.o \
|
|
|
|
sysremove.o \
|
|
|
|
systime.o \
|
|
|
|
tvtype.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
sysuname.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
ucase_fn.o \
|
|
|
|
wherex.o \
|
|
|
|
wherey.o \
|
|
|
|
write.o
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2002-12-21 09:10:15 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS =
|
|
|
|
|
|
|
|
JOYS = atari-stdjoy.joy
|
|
|
|
|
|
|
|
TGIS =
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
|
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2003-08-20 11:59:27 +00:00
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2003-08-20 11:59:27 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(TGIS)
|
2003-02-06 15:35:30 +00:00
|
|
|
|