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
|
|
|
|
|
|
|
|
AFLAGS = -t $(SYS) -I../../asminc
|
|
|
|
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
|
2004-10-08 18:14:19 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.joy: %.o ../runtime/zeropage.o extzp.o
|
2004-10-08 18:14:19 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.mou: %.o ../runtime/zeropage.o extzp.o
|
2004-10-08 18:14:19 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o extzp.o
|
2004-10-08 18:14:19 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2004-11-06 13:51:02 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o extzp.o
|
2004-10-08 18:14:19 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2008-03-30 08:41:26 +00:00
|
|
|
OBJS = cgetc.o \
|
2004-11-13 10:34:06 +00:00
|
|
|
crt0.o \
|
2004-10-26 19:28:26 +00:00
|
|
|
ctype.o \
|
2004-10-14 17:29:22 +00:00
|
|
|
eeprom.o \
|
2004-11-06 13:51:02 +00:00
|
|
|
extzp.o \
|
2004-10-15 21:26:34 +00:00
|
|
|
framerate.o \
|
2004-11-13 10:34:06 +00:00
|
|
|
kbhit.o \
|
2004-10-26 19:28:26 +00:00
|
|
|
mainargs.o \
|
|
|
|
sysuname.o \
|
|
|
|
upload.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 =
|
|
|
|
|
|
|
|
SERS =
|
|
|
|
|
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)
|
|
|
|
|