2001-09-13 21:09:19 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 19:28:26 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = cbm510
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2003-02-16 15:39:32 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o extzp.o
|
2002-12-10 10:30:01 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-02-16 15:39:32 +00:00
|
|
|
%.joy: %.o ../runtime/zeropage.o extzp.o
|
2003-02-16 14:41:12 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-12-26 21:43:18 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o extzp.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-02-16 15:39:32 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o extzp.o
|
2002-12-10 10:30:01 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2001-09-13 21:09:19 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
|
|
|
OBJS = _scrsize.o \
|
|
|
|
banking.o \
|
|
|
|
break.o \
|
|
|
|
cgetc.o \
|
2001-09-14 09:52:30 +00:00
|
|
|
clrscr.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
color.o \
|
2001-09-14 14:37:08 +00:00
|
|
|
cputc.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
crt0.o \
|
2003-02-16 14:41:12 +00:00
|
|
|
extzp.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
kbhit.o \
|
2003-12-27 16:11:14 +00:00
|
|
|
kclose.o \
|
|
|
|
kernal.o \
|
|
|
|
kiobase.o \
|
|
|
|
kopen.o \
|
|
|
|
kreadst.o \
|
2001-09-13 21:09:19 +00:00
|
|
|
kscnkey.o \
|
2005-07-25 18:15:11 +00:00
|
|
|
kscreen.o \
|
2003-12-27 16:11:14 +00:00
|
|
|
ksetnam.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
kudtim.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2001-09-14 09:52:30 +00:00
|
|
|
peeksys.o \
|
2001-09-14 20:52:54 +00:00
|
|
|
pokesys.o \
|
2002-11-05 10:48:20 +00:00
|
|
|
randomize.o \
|
2002-12-19 20:29:27 +00:00
|
|
|
revers.o \
|
2009-07-27 18:44:37 +00:00
|
|
|
systime.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
sysuname.o \
|
2002-10-03 18:19:25 +00:00
|
|
|
tgi_mode_table.o
|
2001-09-13 21:09:19 +00:00
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS = cbm510-ram.emd
|
|
|
|
|
2003-02-16 14:41:12 +00:00
|
|
|
JOYS = cbm510-stdjoy.joy
|
|
|
|
|
2003-12-26 21:43:18 +00:00
|
|
|
SERS = cbm510-stdser.ser
|
|
|
|
|
2003-02-16 14:41:12 +00:00
|
|
|
TGIS =
|
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2003-12-26 21:43:18 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2002-12-10 10:30:01 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2001-09-13 21:09:19 +00:00
|
|
|
|
|
|
|
clean:
|
2003-12-26 21:43:18 +00:00
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
2001-09-13 21:09:19 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2003-12-26 21:43:18 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2003-02-06 15:35:30 +00:00
|
|
|
|