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 = c128
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2002-12-02 06:14:46 +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) $<
|
|
|
|
|
2002-12-02 06:14:46 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-02 06:14:46 +00:00
|
|
|
|
2002-12-20 23:30:14 +00:00
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-20 23:30:14 +00:00
|
|
|
|
2004-03-29 17:27:48 +00:00
|
|
|
%.mou: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-03-29 17:27:48 +00:00
|
|
|
|
2003-12-13 11:02:48 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2003-12-13 11:02:48 +00:00
|
|
|
|
2002-12-02 06:14:46 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-02 06:14:46 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2003-02-13 21:12:11 +00:00
|
|
|
OBJS = _scrsize.o \
|
|
|
|
break.o \
|
2003-02-13 21:29:12 +00:00
|
|
|
c64mode.o \
|
2003-02-13 21:12:11 +00:00
|
|
|
cgetc.o \
|
|
|
|
clrscr.o \
|
|
|
|
conio.o \
|
|
|
|
crt0.o \
|
|
|
|
color.o \
|
|
|
|
cputc.o \
|
2010-02-14 23:12:54 +00:00
|
|
|
devnum.o \
|
2003-02-13 21:29:12 +00:00
|
|
|
fast.o \
|
2003-02-13 21:12:11 +00:00
|
|
|
get_tv.o \
|
|
|
|
joy_stddrv.o \
|
|
|
|
kbhit.o \
|
|
|
|
kernal.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2004-03-29 17:27:48 +00:00
|
|
|
mcbdefault.o \
|
2009-09-11 16:51:21 +00:00
|
|
|
mouse_stddrv.o \
|
2003-02-13 21:12:11 +00:00
|
|
|
randomize.o \
|
|
|
|
revers.o \
|
2003-02-13 21:29:12 +00:00
|
|
|
slow.o \
|
2009-07-27 18:44:37 +00:00
|
|
|
systime.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
sysuname.o \
|
2003-02-13 21:12:11 +00:00
|
|
|
tgi_mode_table.o \
|
2009-09-07 13:21:04 +00:00
|
|
|
toggle_videomode.o \
|
|
|
|
videomode.o
|
2000-11-23 19:05:32 +00:00
|
|
|
|
2002-12-02 06:14:46 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
2010-02-04 18:28:56 +00:00
|
|
|
EMDS = c128-georam.emd \
|
|
|
|
c128-ram.emd \
|
|
|
|
c128-ram2.emd \
|
|
|
|
c128-ramcart.emd \
|
|
|
|
c128-reu.emd \
|
|
|
|
c128-vdc.emd
|
2002-12-02 06:14:46 +00:00
|
|
|
|
2010-02-04 18:28:56 +00:00
|
|
|
JOYS = c128-ptvjoy.joy \
|
|
|
|
c128-stdjoy.joy
|
2002-12-20 23:30:14 +00:00
|
|
|
|
2010-02-04 18:28:56 +00:00
|
|
|
MOUS = c128-1351.mou \
|
|
|
|
c128-joymouse.mou \
|
|
|
|
c128-potmouse.mou
|
2004-03-29 17:27:48 +00:00
|
|
|
|
2010-02-04 18:28:56 +00:00
|
|
|
SERS = c128-swlink.ser
|
2003-12-13 11:02:48 +00:00
|
|
|
|
2010-02-04 18:28:56 +00:00
|
|
|
TGIS = c128-640-200-2.tgi \
|
|
|
|
c128-640-480-2.tgi
|
2002-12-20 23:30:14 +00:00
|
|
|
|
2002-12-02 06:14:46 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2004-03-29 17:27:48 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|
2002-12-02 06:14:46 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2004-03-29 17:27:48 +00:00
|
|
|
@$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
2003-12-13 11:02:48 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2004-03-29 17:27:48 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|
2003-02-06 15:35:30 +00:00
|
|
|
|
2003-12-26 21:44:52 +00:00
|
|
|
|