2002-11-21 21:22:26 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library (C16)
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 19:28:26 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = c16
|
|
|
|
|
|
|
|
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. -I../../asminc
|
2004-10-26 19:28:26 +00:00
|
|
|
CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
|
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2002-11-21 21:22:26 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-12-15 21:10:24 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2002-12-21 09:32:14 +00:00
|
|
|
OBJS = _scrsize.o \
|
|
|
|
break.o \
|
2002-11-21 21:22:26 +00:00
|
|
|
cgetc.o \
|
2002-12-21 09:32:14 +00:00
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
conio.o \
|
|
|
|
cputc.o \
|
|
|
|
crt0.o \
|
2010-02-14 23:12:54 +00:00
|
|
|
devnum.o \
|
2002-12-03 22:19:21 +00:00
|
|
|
get_tv.o \
|
2002-12-21 09:32:14 +00:00
|
|
|
joy_stddrv.o \
|
|
|
|
kbhit.o \
|
2003-12-21 13:13:26 +00:00
|
|
|
kclose.o \
|
2002-11-21 21:22:26 +00:00
|
|
|
kernal.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2002-11-21 21:22:26 +00:00
|
|
|
randomize.o \
|
2003-08-12 17:24:02 +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-12-21 08:53:39 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
2002-11-21 21:22:26 +00:00
|
|
|
|
2003-12-15 21:10:24 +00:00
|
|
|
EMDS = c16-ram.emd
|
2002-12-21 08:53:39 +00:00
|
|
|
|
2002-12-21 09:10:15 +00:00
|
|
|
JOYS = c16-stdjoy.joy
|
2002-12-21 08:53:39 +00:00
|
|
|
|
2003-12-15 21:10:24 +00:00
|
|
|
SERS =
|
|
|
|
|
2002-12-21 08:53:39 +00:00
|
|
|
TGIS =
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2003-12-15 21:10:24 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2002-12-21 08:53:39 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2002-11-21 21:22:26 +00:00
|
|
|
|
|
|
|
clean:
|
2003-12-15 21:10:24 +00:00
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
2002-12-21 08:53:39 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2003-12-15 21:10:24 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
|
2002-11-21 21:22:26 +00:00
|
|
|
|