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
|
|
|
|
|
2009-09-24 17:44:22 +00:00
|
|
|
AFLAGS = -t $(SYS) --forget-inc-paths -I../apple2 -I../../asminc
|
2005-03-26 17:03:30 +00:00
|
|
|
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) $<
|
|
|
|
|
2009-09-22 21:43:57 +00:00
|
|
|
extra/%.o: ../apple2/extra/%.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2010-11-09 21:33:14 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-03-13 23:25:11 +00:00
|
|
|
|
2006-04-06 19:51:37 +00:00
|
|
|
%.mou: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2006-04-06 19:51:37 +00:00
|
|
|
|
2005-09-08 21:03:46 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2005-09-08 21:03:46 +00:00
|
|
|
|
2004-03-13 23:25:11 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2005-08-31 20:11:45 +00:00
|
|
|
C_OBJS= closedir.o \
|
|
|
|
opendir.o \
|
|
|
|
readdir.o \
|
|
|
|
rewinddir.o
|
|
|
|
|
|
|
|
S_OBJS= _scrsize.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
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 \
|
2008-03-16 09:37:22 +00:00
|
|
|
cout.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 \
|
2010-05-24 20:10:19 +00:00
|
|
|
drives.o \
|
2011-02-06 22:27:31 +00:00
|
|
|
exec.o \
|
2005-04-12 09:12:48 +00:00
|
|
|
filedes.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 \
|
2008-03-16 09:37:22 +00:00
|
|
|
home.o \
|
2005-04-19 11:31:00 +00:00
|
|
|
initcwd.o \
|
2009-09-10 09:59:26 +00:00
|
|
|
iobuf.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
joy_stddrv.o \
|
|
|
|
kbhit.o \
|
|
|
|
mainargs.o \
|
2006-04-06 19:51:37 +00:00
|
|
|
mcbdefault.o \
|
2005-03-31 07:24:01 +00:00
|
|
|
mli.o \
|
2009-09-11 19:35:13 +00:00
|
|
|
mouse_stddrv.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 \
|
2008-03-16 09:37:22 +00:00
|
|
|
rdkey.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
read.o \
|
2009-09-14 19:58:06 +00:00
|
|
|
reboot.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
revers.o \
|
2010-05-26 21:02:35 +00:00
|
|
|
rootdir.o \
|
2005-04-12 09:12:48 +00:00
|
|
|
rwcommon.o \
|
2005-08-31 20:11:45 +00:00
|
|
|
syschdir.o \
|
|
|
|
sysmkdir.o \
|
|
|
|
sysremove.o \
|
|
|
|
sysrename.o \
|
|
|
|
sysrmdir.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
systime.o \
|
|
|
|
sysuname.o \
|
|
|
|
textframe.o \
|
|
|
|
tgi_mode_table.o\
|
2009-09-10 09:04:05 +00:00
|
|
|
videomode.o \
|
2008-03-16 09:37:22 +00:00
|
|
|
vtabz.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
wherex.o \
|
|
|
|
wherey.o \
|
|
|
|
write.o
|
2004-03-13 23:25:11 +00:00
|
|
|
|
2010-01-24 14:53:48 +00:00
|
|
|
S_EXTRA_OBJS= \
|
2009-09-22 21:43:57 +00:00
|
|
|
extra/iobuf-0800.o
|
|
|
|
|
2004-03-13 23:25:11 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
2008-03-16 09:37:22 +00:00
|
|
|
EMDS = apple2-auxmem.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
|
|
|
|
2006-04-06 19:51:37 +00:00
|
|
|
MOUS = apple2-stdmou.mou
|
|
|
|
|
2005-09-08 21:03:46 +00:00
|
|
|
SERS = apple2-ssc.ser
|
2004-03-13 23:25:11 +00:00
|
|
|
|
2008-03-16 09:37:22 +00:00
|
|
|
TGIS = apple2-280-192-8.tgi apple2-40-48-16.tgi
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2009-09-22 21:43:57 +00:00
|
|
|
all: $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
|
|
|
|
|
|
|
clean:
|
2009-09-22 21:43:57 +00:00
|
|
|
@$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
2004-03-13 23:25:11 +00:00
|
|
|
|
|
|
|
zap: clean
|
2006-04-06 19:51:37 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|