2002-08-07 05:18:13 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 18:58:48 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = vic20
|
|
|
|
|
|
|
|
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 18:58:48 +00:00
|
|
|
CFLAGS=-Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
|
|
|
|
|
2002-12-20 23:23:06 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2002-08-07 05:18:13 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2002-12-20 23:23:06 +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 $@ $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2002-08-07 05:18:13 +00:00
|
|
|
OBJS = _scrsize.o \
|
|
|
|
break.o \
|
|
|
|
crt0.o \
|
|
|
|
cgetc.o \
|
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
conio.o \
|
|
|
|
cputc.o \
|
2010-02-14 23:12:54 +00:00
|
|
|
devnum.o \
|
2004-10-26 18:58:48 +00:00
|
|
|
get_tv.o \
|
2002-12-21 09:32:14 +00:00
|
|
|
joy_stddrv.o \
|
2002-08-07 05:18:13 +00:00
|
|
|
kbhit.o \
|
2002-11-19 23:02:47 +00:00
|
|
|
kernal.o \
|
2002-12-09 10:45:16 +00:00
|
|
|
kplot.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2002-11-05 10:48:20 +00:00
|
|
|
randomize.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
revers.o \
|
2003-08-20 11:59:27 +00:00
|
|
|
sysuname.o
|
2002-12-20 23:23:06 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS =
|
|
|
|
|
2005-08-28 21:01:59 +00:00
|
|
|
JOYS = vic20-stdjoy.joy vic20-ptvjoy.joy
|
2002-12-20 23:23:06 +00:00
|
|
|
|
|
|
|
TGIS =
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2002-12-20 23:23:06 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
|
2002-08-07 05:18:13 +00:00
|
|
|
|
2002-12-20 23:23:06 +00:00
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2002-08-07 05:18:13 +00:00
|
|
|
|
|
|
|
clean:
|
2003-08-20 11:59:27 +00:00
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
|
2002-08-07 05:18:13 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2003-08-20 11:59:27 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(TGIS)
|
2003-02-06 15:35:30 +00:00
|
|
|
|
2003-03-10 21:21:46 +00:00
|
|
|
|