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
|
|
|
|
|
2009-09-24 17:44:22 +00:00
|
|
|
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
|
2004-10-26 19:28:26 +00:00
|
|
|
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) $<
|
|
|
|
|
2010-11-09 21:33:14 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-21 09:10:15 +00:00
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-21 09:10:15 +00:00
|
|
|
|
2009-11-10 21:53:55 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o atari_tgi_common.inc
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $< ../runtime/zeropage.o
|
2009-11-10 21:53:55 +00:00
|
|
|
|
2002-12-21 09:10:15 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# 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 \
|
2009-11-25 17:35:21 +00:00
|
|
|
do_oserr.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
dosdetect.o \
|
|
|
|
fdtable.o \
|
2009-12-07 18:58:32 +00:00
|
|
|
fdtab.o \
|
2009-11-23 21:59:29 +00:00
|
|
|
fdtoiocb.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
getargs.o \
|
|
|
|
getdefdev.o \
|
|
|
|
getfd.o \
|
|
|
|
gotox.o \
|
|
|
|
gotoy.o \
|
|
|
|
gotoxy.o \
|
|
|
|
graphics.o \
|
2010-05-01 22:33:25 +00:00
|
|
|
initcwd.o \
|
2009-11-25 17:35:21 +00:00
|
|
|
inviocb.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
joy_stddrv.o \
|
|
|
|
kbhit.o \
|
|
|
|
lseek.o \
|
|
|
|
mul40.o \
|
|
|
|
open.o \
|
|
|
|
oserrlist.o \
|
|
|
|
oserror.o \
|
|
|
|
ostype.o \
|
2010-10-28 21:03:05 +00:00
|
|
|
posixdirent.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
randomize.o \
|
|
|
|
read.o \
|
|
|
|
revers.o \
|
|
|
|
rwcommon.o \
|
|
|
|
savevec.o \
|
|
|
|
scroll.o \
|
|
|
|
setcolor.o \
|
|
|
|
siocall.o \
|
2010-05-01 22:33:25 +00:00
|
|
|
syschdir.o \
|
2006-01-04 09:58:11 +00:00
|
|
|
sysmkdir.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
sysremove.o \
|
2006-01-04 09:58:11 +00:00
|
|
|
sysrmdir.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
systime.o \
|
2006-01-04 09:58:11 +00:00
|
|
|
sysuname.o \
|
2011-04-25 17:11:23 +00:00
|
|
|
tgi_colors.o \
|
2011-05-02 10:38:48 +00:00
|
|
|
tgi_stddrv.o \
|
2011-04-25 17:11:23 +00:00
|
|
|
toascii.o \
|
2003-11-14 22:39:16 +00:00
|
|
|
tvtype.o \
|
|
|
|
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 =
|
|
|
|
|
2009-04-11 18:10:44 +00:00
|
|
|
JOYS = atari-stdjoy.joy atari-multijoy.joy
|
2002-12-21 09:10:15 +00:00
|
|
|
|
2009-11-10 21:53:55 +00:00
|
|
|
TGIS = atari-3.tgi atari-4.tgi atari-5.tgi atari-6.tgi atari-7.tgi atari-8.tgi \
|
|
|
|
atari-9.tgi atari-10.tgi atari-11.tgi atari-14.tgi atari-15.tgi atari-8p2.tgi \
|
|
|
|
atari-9p2.tgi atari-10p2.tgi atari-15p2.tgi
|
2002-12-21 09:10:15 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# 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
|
|
|
|