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 = pet
|
|
|
|
|
|
|
|
AS = ../../src/ca65/ca65
|
|
|
|
CC = ../../src/cc65/cc65
|
|
|
|
LD = ../../src/ld65/ld65
|
|
|
|
|
2009-12-18 11:58:50 +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
|
|
|
|
|
2003-02-06 15:35:30 +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) $<
|
|
|
|
|
2005-08-28 21:06:23 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2000-11-23 19:05:32 +00:00
|
|
|
OBJS = _scrsize.o \
|
|
|
|
break.o \
|
|
|
|
cgetc.o \
|
2002-11-20 01:31:56 +00:00
|
|
|
checkst.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
conio.o \
|
|
|
|
cputc.o \
|
|
|
|
crt0.o \
|
2004-10-26 19:28:26 +00:00
|
|
|
get_tv.o \
|
2002-11-05 10:48:20 +00:00
|
|
|
kbhit.o \
|
2002-11-20 01:31:56 +00:00
|
|
|
kbsout.o \
|
|
|
|
kchkin.o \
|
|
|
|
kckout.o \
|
|
|
|
kclose.o \
|
2002-11-19 23:02:47 +00:00
|
|
|
kernal.o \
|
2002-11-20 01:31:56 +00:00
|
|
|
kopen.o \
|
2002-12-12 18:44:28 +00:00
|
|
|
kplot.o \
|
2002-11-19 23:02:47 +00:00
|
|
|
krdtim.o \
|
|
|
|
kreadst.o \
|
|
|
|
ksetlfs.o \
|
|
|
|
ksetnam.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2002-12-19 20:29:27 +00:00
|
|
|
randomize.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
revers.o \
|
|
|
|
sysuname.o
|
2003-02-06 15:35:30 +00:00
|
|
|
|
2005-08-28 21:06:23 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS =
|
|
|
|
|
|
|
|
JOYS = pet-ptvjoy.joy
|
|
|
|
|
|
|
|
TGIS =
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2005-08-28 21:06:23 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
|
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2005-08-28 21:06:23 +00:00
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
|
2003-02-06 15:35:30 +00:00
|
|
|
|
|
|
|
zap: clean
|
2005-08-28 21:06:23 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(TGIS)
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
|