2004-03-13 23:25:11 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
2004-10-26 19:28:26 +00:00
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = apple2enh
|
|
|
|
|
|
|
|
AS = ../../src/ca65/ca65
|
|
|
|
CC = ../../src/cc65/cc65
|
|
|
|
LD = ../../src/ld65/ld65
|
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
AFLAGS = -t $(SYS) -I../apple2 -I../../asminc
|
|
|
|
CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I ../apple2 -I ../../include
|
2004-10-26 19:28:26 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
2004-03-13 23:25:11 +00:00
|
|
|
# Rules
|
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
%.o: ../apple2/%.c
|
2005-04-18 10:00:40 +00:00
|
|
|
@$(CC) -o $(notdir $(*).s) $(CFLAGS) $<
|
2004-03-13 23:25:11 +00:00
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
%.o: ../apple2/%.s
|
2004-03-13 23:25:11 +00:00
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
|
|
|
%.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
|
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
OBJS= _scrsize.o \
|
|
|
|
break.o \
|
|
|
|
cclear.o \
|
|
|
|
cgetc.o \
|
|
|
|
chline.o \
|
2005-04-12 09:12:48 +00:00
|
|
|
close.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
2004-03-13 23:25:11 +00:00
|
|
|
cputc.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
crt0.o \
|
|
|
|
ctype.o \
|
2004-03-13 23:25:11 +00:00
|
|
|
cvline.o \
|
2005-03-31 07:24:01 +00:00
|
|
|
dioclose.o \
|
|
|
|
diocommon.o \
|
|
|
|
dioopen.o \
|
|
|
|
dioread.o \
|
|
|
|
diosectcount.o \
|
|
|
|
diosectsize.o \
|
|
|
|
diowrite.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
dosdetect.o \
|
2005-04-12 09:12:48 +00:00
|
|
|
filedes.o \
|
|
|
|
fileerr.o \
|
|
|
|
filename.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
get_ostype.o \
|
2005-04-01 09:59:53 +00:00
|
|
|
gotoxy.o \
|
|
|
|
gotoy.o \
|
2005-04-19 11:31:00 +00:00
|
|
|
initcwd.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
joy_stddrv.o \
|
|
|
|
kbhit.o \
|
|
|
|
mainargs.o \
|
2005-03-31 07:24:01 +00:00
|
|
|
mli.o \
|
2005-04-12 09:12:48 +00:00
|
|
|
open.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
oserrlist.o \
|
2005-04-12 09:12:48 +00:00
|
|
|
oserror.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
randomize.o \
|
|
|
|
rcout.o \
|
|
|
|
read.o \
|
|
|
|
revers.o \
|
|
|
|
rhome.o \
|
|
|
|
rom.o \
|
|
|
|
rpread.o \
|
|
|
|
rrdkey.o \
|
|
|
|
rvtabz.o \
|
2005-04-12 09:12:48 +00:00
|
|
|
rwcommon.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
systime.o \
|
|
|
|
sysuname.o \
|
|
|
|
textframe.o \
|
|
|
|
tgi_mode_table.o\
|
|
|
|
wherex.o \
|
|
|
|
wherey.o \
|
|
|
|
write.o
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
EMDS = apple2-lc.emd
|
2004-03-13 23:25:11 +00:00
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
JOYS = apple2-stdjoy.joy
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
SERS =
|
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
|
|
|
|
|
|
|
zap: clean
|
|
|
|
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
|
|
|
|
|
|
|
|