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 = c16
|
|
|
|
|
|
|
|
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 08:53:39 +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) $<
|
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-21 08:53:39 +00:00
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
|
|
|
|
|
|
|
%.mou: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-21 08:53:39 +00:00
|
|
|
|
2003-12-14 17:40:57 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2003-12-14 17:40:57 +00:00
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-21 08:53:39 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2000-11-23 19:05:32 +00:00
|
|
|
OBJS = _scrsize.o \
|
|
|
|
break.o \
|
|
|
|
cgetc.o \
|
2002-12-21 08:53:39 +00:00
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
conio.o \
|
|
|
|
cputc.o \
|
|
|
|
crt0.o \
|
2010-02-14 23:12:54 +00:00
|
|
|
devnum.o \
|
2002-12-03 22:19:21 +00:00
|
|
|
get_tv.o \
|
2002-12-21 09:32:14 +00:00
|
|
|
joy_stddrv.o \
|
2002-11-22 22:16:20 +00:00
|
|
|
kacptr.o \
|
|
|
|
kbasin.o \
|
2002-12-21 08:53:39 +00:00
|
|
|
kbhit.o \
|
2002-11-22 22:16:20 +00:00
|
|
|
kbsout.o \
|
|
|
|
kchkin.o \
|
|
|
|
kciout.o \
|
|
|
|
kckout.o \
|
|
|
|
kclall.o \
|
|
|
|
kclose.o \
|
|
|
|
kclrch.o \
|
|
|
|
kiobase.o \
|
|
|
|
klisten.o \
|
|
|
|
kload.o \
|
|
|
|
kopen.o \
|
2002-11-22 22:24:24 +00:00
|
|
|
kplot.o \
|
2002-11-22 22:16:20 +00:00
|
|
|
krdtim.o \
|
|
|
|
kreadst.o \
|
|
|
|
ksave.o \
|
|
|
|
ksetlfs.o \
|
|
|
|
ksetnam.o \
|
2002-11-22 22:24:24 +00:00
|
|
|
ksettim.o \
|
2002-11-22 22:16:20 +00:00
|
|
|
ktalk.o \
|
|
|
|
kunlsn.o \
|
|
|
|
kuntlk.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2002-11-05 10:48:20 +00:00
|
|
|
randomize.o \
|
2002-12-19 20:29:27 +00:00
|
|
|
revers.o \
|
2012-09-30 18:20:15 +00:00
|
|
|
status.o \
|
2009-07-27 18:44:37 +00:00
|
|
|
systime.o \
|
2011-05-02 10:30:49 +00:00
|
|
|
sysuname.o
|
2000-11-23 19:05:32 +00:00
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS =
|
|
|
|
|
|
|
|
JOYS = plus4-stdjoy.joy
|
|
|
|
|
2003-12-14 17:40:57 +00:00
|
|
|
SERS = plus4-stdser.ser
|
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
TGIS =
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2003-12-14 17:40:57 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2002-12-21 08:53:39 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2003-12-14 17:40:57 +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
|
2004-10-26 19:28:26 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2003-02-06 15:35:30 +00:00
|
|
|
|