2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 19:28:26 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = apple2
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2004-06-04 17:54:15 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
2003-05-02 09:03:47 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2004-06-04 17:54:15 +00:00
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
2003-05-02 09:03:47 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2004-06-04 17:54:15 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
2003-05-02 09:03:47 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
OBJS= _scrsize.o \
|
2004-01-04 21:24:37 +00:00
|
|
|
break.o \
|
|
|
|
cclear.o \
|
|
|
|
cgetc.o \
|
|
|
|
chline.o \
|
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
cputc.o \
|
|
|
|
crt0.o \
|
|
|
|
ctype.o \
|
|
|
|
cvline.o \
|
2005-03-30 18:25:04 +00:00
|
|
|
dioclose.o \
|
|
|
|
diocommon.o \
|
|
|
|
dioopen.o \
|
|
|
|
dioread.o \
|
2005-03-31 07:24:01 +00:00
|
|
|
diosectcount.o \
|
|
|
|
diosectsize.o \
|
2005-03-30 18:25:04 +00:00
|
|
|
diowrite.o \
|
2004-03-11 21:54:22 +00:00
|
|
|
dosdetect.o \
|
2003-08-12 17:48:31 +00:00
|
|
|
get_ostype.o \
|
2003-05-02 14:39:05 +00:00
|
|
|
getenv.o \
|
2005-04-01 09:59:53 +00:00
|
|
|
gotoxy.o \
|
|
|
|
gotoy.o \
|
2003-05-02 09:03:47 +00:00
|
|
|
joy_stddrv.o \
|
2004-01-04 21:24:37 +00:00
|
|
|
kbhit.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2005-03-30 18:25:04 +00:00
|
|
|
mli.o \
|
2004-01-04 21:24:37 +00:00
|
|
|
oserrlist.o \
|
2002-11-07 12:16:15 +00:00
|
|
|
randomize.o \
|
2004-06-03 15:05:41 +00:00
|
|
|
rcout.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
read.o \
|
2004-01-04 21:24:37 +00:00
|
|
|
revers.o \
|
2004-06-03 15:05:41 +00:00
|
|
|
rhome.o \
|
|
|
|
rom.o \
|
|
|
|
rpread.o \
|
|
|
|
rrdkey.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
rvtabz.o \
|
2002-11-12 22:49:38 +00:00
|
|
|
systime.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
sysuname.o \
|
2003-11-12 16:41:09 +00:00
|
|
|
tgi_mode_table.o\
|
2004-01-04 21:24:37 +00:00
|
|
|
wherex.o \
|
2005-03-26 17:03:30 +00:00
|
|
|
wherey.o \
|
|
|
|
write.o
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-05-02 09:03:47 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
2004-01-04 21:12:01 +00:00
|
|
|
EMDS = apple2-lc.emd
|
2003-05-02 09:03:47 +00:00
|
|
|
|
|
|
|
JOYS = apple2-stdjoy.joy
|
|
|
|
|
2004-01-04 21:12:01 +00:00
|
|
|
SERS =
|
2003-12-21 11:02:52 +00:00
|
|
|
|
2003-12-09 20:46:38 +00:00
|
|
|
TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
|
2003-05-02 09:03:47 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2003-12-21 11:02:52 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2003-05-02 09:03:47 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2003-12-21 11:02:52 +00:00
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2003-12-21 11:02:52 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2000-11-23 19:05:32 +00:00
|
|
|
|