2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .obj .s .c
|
|
|
|
|
2002-08-07 19:28:39 +00:00
|
|
|
# Defines for executables. AR is used within this makefile, the others are
|
|
|
|
# passed to the submakes and contain paths relative to the subdirectories
|
|
|
|
# handled by the make subprocesses.
|
2000-05-28 13:40:48 +00:00
|
|
|
AR = ../src/ar65/ar65
|
2002-08-07 19:28:39 +00:00
|
|
|
AS = ../../src/ca65/ca65
|
2002-07-07 11:12:16 +00:00
|
|
|
CC = ../../src/cc65/cc65
|
|
|
|
LD = ../../src/ld65/ld65
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2000-10-10 19:54:45 +00:00
|
|
|
# List of all targets
|
2003-10-10 16:44:20 +00:00
|
|
|
ALLTARGETS = apple2 \
|
2004-03-13 23:25:35 +00:00
|
|
|
apple2enh \
|
2009-11-10 21:53:55 +00:00
|
|
|
atari \
|
|
|
|
atmos \
|
2003-10-10 16:44:20 +00:00
|
|
|
c16 \
|
2009-11-10 21:53:55 +00:00
|
|
|
c128 \
|
|
|
|
c64 \
|
|
|
|
cbm510 \
|
|
|
|
cbm610 \
|
|
|
|
geos \
|
2004-10-08 18:11:29 +00:00
|
|
|
lynx \
|
2003-10-10 16:44:20 +00:00
|
|
|
nes \
|
2009-11-10 21:53:55 +00:00
|
|
|
pet \
|
|
|
|
plus4 \
|
2003-10-10 16:44:20 +00:00
|
|
|
supervision \
|
|
|
|
vic20
|
2000-10-10 19:54:45 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all
|
2000-10-10 19:54:45 +00:00
|
|
|
all:
|
|
|
|
for tgt in $(ALLTARGETS); do \
|
2002-11-29 14:42:12 +00:00
|
|
|
$(MAKE) clean "$$tgt"lib || exit 1; \
|
2000-10-10 19:54:45 +00:00
|
|
|
done
|
2002-07-07 11:17:27 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Apple ][
|
2002-08-08 12:16:52 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
apple2lib:
|
2006-04-06 19:51:37 +00:00
|
|
|
for i in apple2 common runtime conio dbg em joystick mouse serial tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=apple2 -C $$i || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
$(AR) a apple2.lib $$i/*.o;\
|
|
|
|
done
|
2006-08-18 16:40:45 +00:00
|
|
|
cp apple2/apple2-auxmem.emd a2.auxmem.emd
|
2003-12-22 21:37:36 +00:00
|
|
|
cp apple2/apple2-stdjoy.joy a2.stdjoy.joy
|
2006-04-06 19:51:37 +00:00
|
|
|
cp apple2/apple2-stdmou.mou a2.stdmou.mou
|
2005-09-08 21:03:46 +00:00
|
|
|
cp apple2/apple2-ssc.ser a2.ssc.ser
|
2008-03-16 09:37:22 +00:00
|
|
|
cp apple2/apple2-280-192-8.tgi a2.hi.tgi
|
|
|
|
cp apple2/apple2-40-48-16.tgi a2.lo.tgi
|
2009-09-22 10:22:29 +00:00
|
|
|
if [ -d apple2/extra ]; then \
|
|
|
|
for i in apple2/extra/*.o; do \
|
|
|
|
cp $$i apple2-`basename $$i`; \
|
|
|
|
done \
|
|
|
|
fi \
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2004-03-13 23:25:35 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
2009-09-22 21:43:57 +00:00
|
|
|
# enhanced Apple //e
|
2004-03-13 23:25:35 +00:00
|
|
|
|
|
|
|
apple2enhlib:
|
2006-04-06 19:51:37 +00:00
|
|
|
for i in apple2enh common runtime conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=apple2enh -C $$i || exit 1; \
|
2004-03-13 23:25:35 +00:00
|
|
|
$(AR) a apple2enh.lib $$i/*.o;\
|
|
|
|
done
|
2006-08-18 16:40:45 +00:00
|
|
|
cp apple2enh/apple2-auxmem.emd a2e.auxmem.emd
|
2005-03-26 17:23:14 +00:00
|
|
|
cp apple2enh/apple2-stdjoy.joy a2e.stdjoy.joy
|
2006-04-06 19:51:37 +00:00
|
|
|
cp apple2enh/apple2-stdmou.mou a2e.stdmou.mou
|
2005-09-08 21:03:46 +00:00
|
|
|
cp apple2enh/apple2-ssc.ser a2e.ssc.ser
|
2008-03-16 09:37:22 +00:00
|
|
|
cp apple2enh/apple2-280-192-8.tgi a2e.hi.tgi
|
|
|
|
cp apple2enh/apple2-40-48-16.tgi a2e.lo.tgi
|
2009-09-22 21:43:57 +00:00
|
|
|
if [ -d apple2enh/extra ]; then \
|
|
|
|
for i in apple2enh/extra/*.o; do \
|
|
|
|
cp $$i apple2enh-`basename $$i`; \
|
|
|
|
done \
|
|
|
|
fi \
|
2004-03-13 23:25:35 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Atari
|
|
|
|
|
|
|
|
atarilib:
|
2003-10-01 20:59:06 +00:00
|
|
|
for i in atari common runtime conio dbg em joystick tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=atari -C $$i || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
$(AR) a atari.lib $$i/*.o;\
|
|
|
|
done
|
2004-05-11 21:38:41 +00:00
|
|
|
cp atari/atari-stdjoy.joy ataristd.joy
|
2009-04-11 18:10:44 +00:00
|
|
|
cp atari/atari-multijoy.joy atarimj8.joy
|
2009-11-10 21:53:55 +00:00
|
|
|
cp atari/atari-10.tgi atari10.tgi
|
|
|
|
cp atari/atari-10p2.tgi atr10p2.tgi
|
|
|
|
cp atari/atari-11.tgi atari11.tgi
|
|
|
|
cp atari/atari-14.tgi atari14.tgi
|
|
|
|
cp atari/atari-15.tgi atari15.tgi
|
|
|
|
cp atari/atari-15p2.tgi atr15p2.tgi
|
|
|
|
cp atari/atari-3.tgi atari3.tgi
|
|
|
|
cp atari/atari-4.tgi atari4.tgi
|
|
|
|
cp atari/atari-5.tgi atari5.tgi
|
|
|
|
cp atari/atari-6.tgi atari6.tgi
|
|
|
|
cp atari/atari-7.tgi atari7.tgi
|
|
|
|
cp atari/atari-8.tgi atari8.tgi
|
|
|
|
cp atari/atari-8p2.tgi atr8p2.tgi
|
|
|
|
cp atari/atari-9.tgi atari9.tgi
|
|
|
|
cp atari/atari-9p2.tgi atr9p2.tgi
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2002-06-03 20:23:15 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Oric Atmos
|
|
|
|
|
|
|
|
atmoslib:
|
2003-10-01 20:59:06 +00:00
|
|
|
for i in atmos common conio runtime em joystick tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=atmos -C $$i || exit 1; \
|
2002-06-03 20:23:15 +00:00
|
|
|
$(AR) a atmos.lib $$i/*.o;\
|
|
|
|
done
|
2009-12-21 21:14:21 +00:00
|
|
|
cp atmos/*.joy .
|
2004-06-03 21:28:56 +00:00
|
|
|
cp atmos/*.tgi .
|
2002-06-03 20:23:15 +00:00
|
|
|
|
2002-11-21 21:22:26 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# C16, C116
|
|
|
|
|
|
|
|
c16lib:
|
2003-10-01 20:59:06 +00:00
|
|
|
for i in c16 cbm common runtime conio dbg em joystick tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=c16 -C $$i || exit 1; \
|
2002-11-21 21:22:26 +00:00
|
|
|
$(AR) a c16.lib $$i/*.o;\
|
|
|
|
done
|
2002-12-21 09:10:15 +00:00
|
|
|
cp c16/*.joy .
|
2003-12-15 21:10:24 +00:00
|
|
|
cp c16/*.emd .
|
2002-11-22 00:53:10 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# C64
|
|
|
|
|
|
|
|
c64lib:
|
2004-03-23 21:56:13 +00:00
|
|
|
for i in c64 cbm common runtime conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=c64 -C $$i || exit 1; \
|
2002-11-29 14:42:12 +00:00
|
|
|
$(AR) a c64.lib $$i/*.o;\
|
2000-11-23 12:42:39 +00:00
|
|
|
done
|
2002-12-02 21:28:35 +00:00
|
|
|
cp c64/*.emd .
|
2002-12-20 21:41:40 +00:00
|
|
|
cp c64/*.joy .
|
2004-04-28 12:06:00 +00:00
|
|
|
cp c64/c64-1351.mou .
|
|
|
|
cp c64/c64-joymouse.mou c64-joy.mou
|
2008-08-05 20:54:35 +00:00
|
|
|
cp c64/c64-potmouse.mou c64-pot.mou
|
2003-08-15 21:17:36 +00:00
|
|
|
cp c64/*.ser .
|
2002-12-20 21:41:40 +00:00
|
|
|
cp c64/c64-320-200-2.tgi c64-hi.tgi
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# C128
|
|
|
|
|
|
|
|
c128lib:
|
2004-03-29 17:27:48 +00:00
|
|
|
for i in c128 cbm common runtime conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=c128 -C $$i || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
$(AR) a c128.lib $$i/*.o;\
|
2004-04-28 12:06:00 +00:00
|
|
|
done
|
2002-12-02 21:28:35 +00:00
|
|
|
cp c128/*.emd .
|
2002-12-20 23:30:14 +00:00
|
|
|
cp c128/*.joy .
|
2004-04-28 12:06:00 +00:00
|
|
|
cp c128/c128-1351.mou .
|
|
|
|
cp c128/c128-joymouse.mou c128-joy.mou
|
2008-08-05 20:54:35 +00:00
|
|
|
cp c128/c128-potmouse.mou c128-pot.mou
|
2003-12-13 11:02:48 +00:00
|
|
|
cp c128/*.ser .
|
2002-12-22 23:29:11 +00:00
|
|
|
cp c128/c128-640-200-2.tgi c128-vdc.tgi
|
2002-12-23 14:15:46 +00:00
|
|
|
cp c128/c128-640-480-2.tgi c128-vdc2.tgi
|
2004-04-28 12:06:00 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
2001-09-18 12:22:55 +00:00
|
|
|
# Commdore P500 / CBM 5x0
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2001-09-18 12:22:55 +00:00
|
|
|
cbm510lib:
|
2003-12-20 23:13:26 +00:00
|
|
|
for i in cbm510 cbm common runtime conio dbg em joystick serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=cbm510 -C $$i || exit 1; \
|
2001-09-18 12:22:55 +00:00
|
|
|
$(AR) a cbm510.lib $$i/*.o;\
|
2000-05-28 13:40:48 +00:00
|
|
|
done
|
2002-12-10 10:30:01 +00:00
|
|
|
cp cbm510/*.emd .
|
2003-12-27 16:11:14 +00:00
|
|
|
cp cbm510/cbm510-stdjoy.joy cbm510-std.joy
|
2003-12-26 21:43:18 +00:00
|
|
|
cp cbm510/cbm510-stdser.ser cbm510-std.ser
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2001-09-13 21:47:10 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
2001-09-18 12:22:55 +00:00
|
|
|
# PET-II series
|
2001-09-13 21:47:10 +00:00
|
|
|
|
2001-09-18 12:22:55 +00:00
|
|
|
cbm610lib:
|
2003-12-20 23:13:26 +00:00
|
|
|
for i in cbm610 cbm common runtime conio dbg em joystick serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=cbm610 -C $$i || exit 1; \
|
2001-09-18 12:22:55 +00:00
|
|
|
$(AR) a cbm610.lib $$i/*.o;\
|
2001-09-13 21:47:10 +00:00
|
|
|
done
|
2002-12-10 10:30:01 +00:00
|
|
|
cp cbm610/*.emd .
|
2003-12-20 23:38:42 +00:00
|
|
|
cp cbm610/cbm610-stdser.ser cbm610-std.ser
|
2001-09-14 21:11:39 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# GEOS on the C64/128
|
|
|
|
|
|
|
|
geoslib:
|
2001-08-15 16:09:35 +00:00
|
|
|
CC=../$(CC) \
|
2001-07-14 14:41:30 +00:00
|
|
|
AS=../$(AS) \
|
|
|
|
AR=../$(AR) \
|
2009-11-10 21:53:55 +00:00
|
|
|
LD=../$(LD) \
|
2002-04-21 14:19:16 +00:00
|
|
|
AFLAGS="-t geos -I../../../asminc" \
|
2003-08-03 12:04:59 +00:00
|
|
|
CFLAGS="-Osir -g -T -t geos --forget-inc-paths -I. -I../../../include" \
|
2001-07-14 14:41:30 +00:00
|
|
|
$(MAKE) -C geos || exit 1
|
2003-10-01 20:59:06 +00:00
|
|
|
for i in em joystick tgi conio common runtime zlib; do \
|
2001-03-13 07:56:56 +00:00
|
|
|
CC=$(CC) \
|
|
|
|
AS=$(AS) \
|
2002-12-02 06:10:41 +00:00
|
|
|
LD=$(LD) \
|
2001-07-03 20:24:28 +00:00
|
|
|
AR=$(AR) \
|
2002-04-21 14:19:16 +00:00
|
|
|
AFLAGS="-t geos -I../../asminc" \
|
2003-08-03 12:04:59 +00:00
|
|
|
CFLAGS="-Osir -g -T -t geos --forget-inc-paths -I. -I../../include" \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=geos -C $$i || exit 1; \
|
2001-07-14 14:55:08 +00:00
|
|
|
for objfile in $$i/*.o; do \
|
|
|
|
if [ -f geos/$$objfile ]; then \
|
2002-12-02 06:10:41 +00:00
|
|
|
$(AR) a geos.lib geos/$$objfile; \
|
|
|
|
else \
|
|
|
|
$(AR) a geos.lib $$objfile; \
|
|
|
|
fi; \
|
2001-07-14 14:55:08 +00:00
|
|
|
done \
|
2000-05-28 13:40:48 +00:00
|
|
|
done
|
2002-12-25 18:42:42 +00:00
|
|
|
cp geos/devel/*.emd .
|
2002-12-25 19:43:34 +00:00
|
|
|
cp geos/devel/*.joy .
|
2002-12-31 15:35:55 +00:00
|
|
|
cp geos/devel/geos-tgi.tgi geos-tgi.tgi
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2004-10-08 18:11:29 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Lynx
|
|
|
|
|
|
|
|
lynxlib:
|
2009-09-20 14:22:04 +00:00
|
|
|
for i in lynx common conio runtime em joystick serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=lynx -C $$i || exit 1; \
|
2004-10-08 18:11:29 +00:00
|
|
|
$(AR) a lynx.lib $$i/*.o;\
|
|
|
|
done
|
2004-10-14 16:50:50 +00:00
|
|
|
cp lynx/*.joy .
|
|
|
|
cp lynx/*.tgi .
|
2009-09-20 14:22:04 +00:00
|
|
|
cp lynx/*.ser .
|
2004-10-26 21:21:06 +00:00
|
|
|
|
2003-04-14 21:28:51 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# NES
|
|
|
|
|
|
|
|
neslib:
|
2003-10-01 20:59:06 +00:00
|
|
|
for i in nes common runtime conio em joystick tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=nes -C $$i || exit 1; \
|
2003-04-14 21:28:51 +00:00
|
|
|
$(AR) a nes.lib $$i/*.o;\
|
|
|
|
done
|
2004-10-26 21:21:06 +00:00
|
|
|
cp nes/*.joy .
|
2003-04-14 21:28:51 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# CBM PET machines
|
|
|
|
|
|
|
|
petlib:
|
2003-10-01 20:59:06 +00:00
|
|
|
for i in pet cbm common runtime conio dbg em joystick tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=pet -C $$i || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
$(AR) a pet.lib $$i/*.o;\
|
|
|
|
done
|
2005-08-28 22:11:58 +00:00
|
|
|
cp pet/*.joy .
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2002-11-21 21:22:26 +00:00
|
|
|
# Commodore Plus/4
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
plus4lib:
|
2003-12-14 17:42:41 +00:00
|
|
|
for i in plus4 cbm common runtime conio dbg em joystick serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=plus4 -C $$i || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
$(AR) a plus4.lib $$i/*.o;\
|
|
|
|
done
|
2002-12-21 08:53:39 +00:00
|
|
|
cp plus4/*.joy .
|
2003-12-14 17:42:41 +00:00
|
|
|
cp plus4/*.ser .
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-10-10 16:44:20 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Supervision
|
|
|
|
|
|
|
|
supervisionlib:
|
|
|
|
for i in supervision common runtime; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=supervision -C $$i || exit 1; \
|
2003-10-10 16:44:20 +00:00
|
|
|
$(AR) a supervision.lib $$i/*.o;\
|
|
|
|
done
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Vic20
|
|
|
|
|
|
|
|
vic20lib:
|
|
|
|
for i in vic20 cbm common runtime conio dbg em joystick tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=vic20 -C $$i || exit 1; \
|
2003-10-10 16:44:20 +00:00
|
|
|
$(AR) a vic20.lib $$i/*.o;\
|
|
|
|
done
|
|
|
|
cp vic20/*.joy .
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Dummy targets
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2004-03-23 21:56:13 +00:00
|
|
|
@for i in cbm common conio dbg em joystick mouse runtime serial tgi zlib $(ALLTARGETS); do\
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) -C $$i clean; \
|
2000-05-28 13:40:48 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: zap
|
|
|
|
zap: clean
|
2004-03-23 21:56:13 +00:00
|
|
|
@for i in cbm common conio dbg em joystick mouse runtime tgi zlib $(ALLTARGETS); do\
|
2003-05-02 09:03:47 +00:00
|
|
|
$(MAKE) -C $$i zap; \
|
2003-02-06 15:35:30 +00:00
|
|
|
done
|
2004-07-09 19:46:30 +00:00
|
|
|
@$(RM) *.o *.emd *.joy *.lib *.tgi *.ser *.mou
|
2003-02-06 15:35:30 +00:00
|
|
|
|
|
|
|
|
2003-05-02 09:21:35 +00:00
|
|
|
|