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 = c64
|
|
|
|
|
|
|
|
AS = ../../src/ca65/ca65
|
|
|
|
CC = ../../src/cc65/cc65
|
2012-10-29 20:26:26 +00:00
|
|
|
CO = ../../src/co65/co65
|
2004-10-26 19:28:26 +00:00
|
|
|
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:15:03 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2012-10-29 20:26:26 +00:00
|
|
|
%.o: %.c
|
2000-05-28 13:40:48 +00:00
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2012-10-29 20:26:26 +00:00
|
|
|
%-emd.o: %.emd
|
2012-10-31 23:39:58 +00:00
|
|
|
@$(CO) -o $(*)-emd.s --code-label _$(subst -,_,$(*)) $<
|
2012-10-29 20:26:26 +00:00
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*)-emd.s
|
|
|
|
|
|
|
|
%-joy.o: %.joy
|
2012-10-31 23:39:58 +00:00
|
|
|
@$(CO) -o $(*)-joy.s --code-label _$(subst -,_,$(*)) $<
|
2012-10-29 20:26:26 +00:00
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*)-joy.s
|
|
|
|
|
|
|
|
%-mou.o: %.mou
|
2012-10-31 23:39:58 +00:00
|
|
|
@$(CO) -o $(*)-mou.s --code-label _$(subst -,_,$(*)) $<
|
2012-10-29 20:26:26 +00:00
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*)-mou.s
|
|
|
|
|
|
|
|
%-ser.o: %.ser
|
2012-10-31 23:39:58 +00:00
|
|
|
@$(CO) -o $(*)-ser.s --code-label _$(subst -,_,$(*)) $<
|
2012-10-29 20:26:26 +00:00
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*)-ser.s
|
|
|
|
|
|
|
|
%-tgi.o: %.tgi
|
2012-10-31 23:39:58 +00:00
|
|
|
@$(CO) -o $(*)-tgi.s --code-label _$(subst -,_,$(*)) $<
|
2012-10-29 20:26:26 +00:00
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
|
|
|
|
|
2002-11-29 14:41:21 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-11-29 14:41:21 +00:00
|
|
|
|
2002-12-20 21:41:40 +00:00
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-12-20 21:41:40 +00:00
|
|
|
|
2004-03-21 22:12:06 +00:00
|
|
|
%.mou: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2004-03-21 22:12:06 +00:00
|
|
|
|
2003-08-15 21:17:36 +00:00
|
|
|
%.ser: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2003-08-15 21:17:36 +00:00
|
|
|
|
2002-08-11 12:39:10 +00:00
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
2010-11-09 21:33:14 +00:00
|
|
|
@$(LD) -o $@ -t module $^
|
2002-07-07 11:12:16 +00:00
|
|
|
|
2002-12-02 06:15:03 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2012-10-29 20:26:26 +00:00
|
|
|
OBJS = _scrsize.o \
|
|
|
|
break.o \
|
|
|
|
crt0.o \
|
|
|
|
cgetc.o \
|
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
conio.o \
|
|
|
|
cputc.o \
|
|
|
|
devnum.o \
|
2003-08-12 17:42:03 +00:00
|
|
|
get_ostype.o \
|
2002-12-03 22:19:21 +00:00
|
|
|
get_tv.o \
|
2012-11-01 19:53:47 +00:00
|
|
|
joy_stat_stddrv.o \
|
2012-10-29 20:26:26 +00:00
|
|
|
joy_stddrv.o \
|
|
|
|
kbhit.o \
|
2002-11-19 23:02:47 +00:00
|
|
|
kernal.o \
|
2009-09-27 18:45:08 +00:00
|
|
|
kplot.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2004-03-21 22:12:06 +00:00
|
|
|
mcbdefault.o \
|
2012-11-01 19:53:47 +00:00
|
|
|
mouse_stat_stddrv.o \
|
2009-09-11 16:51:21 +00:00
|
|
|
mouse_stddrv.o \
|
2002-11-05 10:48:20 +00:00
|
|
|
randomize.o \
|
2002-12-19 20:29:27 +00:00
|
|
|
revers.o \
|
2012-09-30 18:20:15 +00:00
|
|
|
status.o \
|
2009-07-27 18:44:37 +00:00
|
|
|
systime.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
sysuname.o \
|
2011-04-25 17:11:23 +00:00
|
|
|
tgi_colors.o \
|
2012-11-01 19:53:47 +00:00
|
|
|
tgi_stat_stddrv.o \
|
2012-10-29 20:26:26 +00:00
|
|
|
tgi_stddrv.o \
|
|
|
|
$(EMDS:.emd=-emd.o) \
|
|
|
|
$(JOYS:.joy=-joy.o) \
|
|
|
|
$(MOUS:.mou=-mou.o) \
|
|
|
|
$(SERS:.ser=-ser.o) \
|
|
|
|
$(TGIS:.tgi=-tgi.o)
|
2000-11-23 19:05:32 +00:00
|
|
|
|
2002-12-02 06:15:03 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
2010-02-04 19:19:17 +00:00
|
|
|
EMDS = c64-c256k.emd \
|
2010-02-12 11:09:23 +00:00
|
|
|
c64-dqbb.emd \
|
2010-02-04 19:19:17 +00:00
|
|
|
c64-georam.emd \
|
2010-02-02 18:32:34 +00:00
|
|
|
c64-isepic.emd \
|
|
|
|
c64-ram.emd \
|
|
|
|
c64-ramcart.emd \
|
|
|
|
c64-reu.emd \
|
|
|
|
c64-vdc.emd \
|
|
|
|
dtv-himem.emd
|
|
|
|
|
|
|
|
JOYS = c64-hitjoy.joy \
|
|
|
|
c64-numpad.joy \
|
|
|
|
c64-ptvjoy.joy \
|
|
|
|
c64-stdjoy.joy
|
|
|
|
|
|
|
|
MOUS = c64-1351.mou \
|
|
|
|
c64-joymouse.mou \
|
|
|
|
c64-potmouse.mou
|
|
|
|
|
|
|
|
SERS = c64-swlink.ser
|
|
|
|
|
|
|
|
TGIS = c64-320-200-2.tgi
|
2002-07-07 11:12:16 +00:00
|
|
|
|
2002-08-11 12:39:10 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2012-10-29 20:26:26 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2002-08-11 12:39:10 +00:00
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
clean:
|
2012-10-29 20:26:26 +00:00
|
|
|
@$(RM) $(OBJS) \
|
|
|
|
$(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
|
|
|
|
$(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
|
|
|
|
$(MOUS:.mou=.o) $(MOUS:.mou=-mou.s) \
|
|
|
|
$(SERS:.ser=.o) $(SERS:.ser=-ser.s) \
|
|
|
|
$(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
|
2002-11-16 23:45:15 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2004-03-21 22:12:06 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|