2004-10-08 18:14:19 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 19:28:26 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = lynx
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2004-10-08 18:14:19 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o extzp.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-10-08 18:14:19 +00:00
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.joy: %.o ../runtime/zeropage.o extzp.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-10-08 18:14:19 +00:00
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.mou: %.o ../runtime/zeropage.o extzp.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-10-08 18:14:19 +00:00
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o extzp.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-10-08 18:14:19 +00:00
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o extzp.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-10-08 18:14:19 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2011-01-26 22:14:42 +00:00
|
|
|
OBJS = bllhdr.o \
|
2011-04-06 19:51:15 +00:00
|
|
|
bootldr.o \
|
2011-01-26 22:14:42 +00:00
|
|
|
cgetc.o \
|
2004-11-13 10:34:06 +00:00
|
|
|
crt0.o \
|
2004-10-26 19:28:26 +00:00
|
|
|
ctype.o \
|
2011-04-06 19:51:15 +00:00
|
|
|
defdir.o \
|
2004-10-14 17:29:22 +00:00
|
|
|
eeprom.o \
|
2011-04-25 18:42:50 +00:00
|
|
|
eeprom46.o \
|
|
|
|
eeprom66.o \
|
|
|
|
eeprom86.o \
|
2010-12-29 10:37:57 +00:00
|
|
|
exec.o \
|
2011-01-26 22:14:42 +00:00
|
|
|
exehdr.o \
|
2004-11-06 13:51:02 +00:00
|
|
|
extzp.o \
|
2004-11-13 10:34:06 +00:00
|
|
|
kbhit.o \
|
2010-12-29 10:37:57 +00:00
|
|
|
load.o \
|
|
|
|
lseek.o \
|
|
|
|
lynx-cart.o \
|
2004-10-26 19:28:26 +00:00
|
|
|
mainargs.o \
|
2010-12-29 10:37:57 +00:00
|
|
|
open.o \
|
|
|
|
oserror.o \
|
|
|
|
read.o \
|
2010-12-19 11:49:58 +00:00
|
|
|
sysuname.o \
|
2011-04-25 17:11:23 +00:00
|
|
|
tgi_colors.o \
|
2011-04-06 19:54:55 +00:00
|
|
|
toascii.o \
|
|
|
|
uploader.o
|
2004-10-08 18:14:19 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS =
|
|
|
|
|
2004-10-14 16:50:50 +00:00
|
|
|
JOYS = lynx-stdjoy.joy
|
2004-10-08 18:14:19 +00:00
|
|
|
|
|
|
|
MOUS =
|
|
|
|
|
2009-09-20 16:47:30 +00:00
|
|
|
SERS = lynx-comlynx.ser
|
2004-10-08 18:14:19 +00:00
|
|
|
|
2004-10-14 16:50:50 +00:00
|
|
|
TGIS = lynx-160-102-16.tgi
|
2004-10-08 18:14:19 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
|
|
|
|
|
|
|
zap: clean
|
|
|
|
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|
|
|
|
|