2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2002-12-10 10:30:01 +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) $<
|
|
|
|
|
2003-12-20 23:13:26 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o extzp.o
|
2002-12-10 10:30:01 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-12-20 23:13:26 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o extzp.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.tgi: %.o ../runtime/zeropage.o extzp.o
|
2002-12-10 10:30:01 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2000-11-23 19:05:32 +00:00
|
|
|
OBJS = _scrsize.o \
|
|
|
|
banking.o \
|
|
|
|
break.o \
|
|
|
|
cgetc.o \
|
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
cputc.o \
|
|
|
|
crt0.o \
|
|
|
|
crtc.o \
|
2003-12-20 23:13:26 +00:00
|
|
|
extzp.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
kbhit.o \
|
2003-12-21 18:43:25 +00:00
|
|
|
kclose.o \
|
2003-12-20 23:13:26 +00:00
|
|
|
kernal.o \
|
2003-12-19 00:12:08 +00:00
|
|
|
kiobase.o \
|
2003-12-20 23:13:26 +00:00
|
|
|
kopen.o \
|
2003-12-19 00:12:08 +00:00
|
|
|
krdtim.o \
|
|
|
|
kreadst.o \
|
2003-12-21 18:43:25 +00:00
|
|
|
kscnkey.o \
|
2003-12-19 00:12:08 +00:00
|
|
|
kscreen.o \
|
|
|
|
ksetnam.o \
|
|
|
|
ksettim.o \
|
2003-12-21 18:43:25 +00:00
|
|
|
kudtim.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2001-09-14 08:42:17 +00:00
|
|
|
peeksys.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
pokesys.o \
|
2002-11-05 10:48:20 +00:00
|
|
|
randomize.o \
|
2002-12-19 20:29:27 +00:00
|
|
|
revers.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
sysuname.o
|
2000-11-23 19:05:32 +00:00
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS = cbm610-ram.emd
|
|
|
|
|
2003-12-20 23:13:26 +00:00
|
|
|
JOYS =
|
|
|
|
|
|
|
|
SERS = cbm610-stdser.ser
|
|
|
|
|
|
|
|
TGIS =
|
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2003-12-20 23:13:26 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2002-12-10 10:30:01 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2003-12-20 23:13:26 +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-20 23:13:26 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2003-02-06 15:35:30 +00:00
|
|
|
|