2011-05-02 19:29:05 +00:00
|
|
|
# -*- make -*-
|
2000-05-28 13:40:48 +00:00
|
|
|
#
|
2011-05-02 19:29:05 +00:00
|
|
|
# Makefile for CC65 Libraries
|
2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
.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
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
# List of shared directories
|
|
|
|
SHAREDDIRS = cbm \
|
|
|
|
common \
|
|
|
|
conio \
|
|
|
|
dbg \
|
|
|
|
em \
|
|
|
|
joystick \
|
|
|
|
mouse \
|
|
|
|
runtime \
|
|
|
|
serial \
|
|
|
|
tgi \
|
|
|
|
zlib
|
|
|
|
|
2000-10-10 19:54:45 +00:00
|
|
|
# List of all targets
|
2011-05-02 19:29:05 +00:00
|
|
|
ALLTARGETS = apple2 \
|
2004-03-13 23:25:35 +00:00
|
|
|
apple2enh \
|
2011-05-02 19:29:05 +00:00
|
|
|
atari \
|
|
|
|
atmos \
|
|
|
|
c128 \
|
|
|
|
c16 \
|
|
|
|
c64 \
|
|
|
|
cbm510 \
|
|
|
|
cbm610 \
|
|
|
|
geos \
|
2004-10-08 18:11:29 +00:00
|
|
|
lynx \
|
2011-05-02 19:29:05 +00:00
|
|
|
nes \
|
|
|
|
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:
|
2011-05-02 19:29:05 +00:00
|
|
|
for tgt in $(ALLTARGETS); do \
|
|
|
|
$(MAKE) mostly-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
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: apple2lib
|
2000-05-28 13:40:48 +00:00
|
|
|
apple2lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime apple2 common conio dbg em joystick mouse serial tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=apple2 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a apple2.lib $$i/*.o || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
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 \
|
2011-05-02 19:29:05 +00:00
|
|
|
cp $$i apple2-`basename $$i` || exit 1; \
|
2009-09-22 10:22:29 +00:00
|
|
|
done \
|
2011-05-02 19:29:05 +00:00
|
|
|
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
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: apple2enhlib
|
2004-03-13 23:25:35 +00:00
|
|
|
apple2enhlib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime apple2enh common conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=apple2enh -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a apple2enh.lib $$i/*.o || exit 1; \
|
2004-03-13 23:25:35 +00:00
|
|
|
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 \
|
2011-05-02 19:29:05 +00:00
|
|
|
cp $$i apple2enh-`basename $$i` || exit 1; \
|
2009-09-22 21:43:57 +00:00
|
|
|
done \
|
2011-05-02 19:29:05 +00:00
|
|
|
fi
|
2004-03-13 23:25:35 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Atari
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: atarilib
|
2000-05-28 13:40:48 +00:00
|
|
|
atarilib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime atari common conio dbg em joystick tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=atari -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a atari.lib $$i/*.o || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
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
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d atari/extra ]; then \
|
|
|
|
for i in atari/extra/*.o; do \
|
|
|
|
cp $$i atari-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2002-06-03 20:23:15 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Oric Atmos
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: atmoslib
|
2002-06-03 20:23:15 +00:00
|
|
|
atmoslib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime atmos common conio em joystick tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=atmos -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a atmos.lib $$i/*.o || exit 1; \
|
2002-06-03 20:23:15 +00:00
|
|
|
done
|
2009-12-21 21:14:21 +00:00
|
|
|
cp atmos/*.joy .
|
2004-06-03 21:28:56 +00:00
|
|
|
cp atmos/*.tgi .
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d atmos/extra ]; then \
|
|
|
|
for i in atmos/extra/*.o; do \
|
|
|
|
cp $$i atmos-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2002-06-03 20:23:15 +00:00
|
|
|
|
2002-11-21 21:22:26 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# C16, C116
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: c16lib
|
2002-11-21 21:22:26 +00:00
|
|
|
c16lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime c16 cbm common conio dbg em joystick mouse tgi zlib; do \
|
2009-11-10 21:53:55 +00:00
|
|
|
$(MAKE) SYS=c16 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a c16.lib $$i/*.o || exit 1; \
|
2002-11-21 21:22:26 +00:00
|
|
|
done
|
2002-12-21 09:10:15 +00:00
|
|
|
cp c16/*.joy .
|
2003-12-15 21:10:24 +00:00
|
|
|
cp c16/*.emd .
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d c16/extra ]; then \
|
|
|
|
for i in c16/extra/*.o; do \
|
|
|
|
cp $$i c16-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2002-11-22 00:53:10 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# C64
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: c64lib
|
2000-05-28 13:40:48 +00:00
|
|
|
c64lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime c64 cbm common conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=c64 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a c64.lib $$i/*.o || exit 1; \
|
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
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d c64/extra ]; then \
|
|
|
|
for i in c64/extra/*.o; do \
|
|
|
|
cp $$i c64-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# C128
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: c128lib
|
2000-05-28 13:40:48 +00:00
|
|
|
c128lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime c128 cbm common conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=c128 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a c128.lib $$i/*.o || exit 1; \
|
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
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d cbm/extra ]; then \
|
|
|
|
for i in cbm/extra/*.o; do \
|
|
|
|
cp $$i cbm-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
|
|
|
if [ -d c128/extra ]; then \
|
|
|
|
for i in c128/extra/*.o; do \
|
|
|
|
cp $$i c128-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2004-04-28 12:06:00 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
2011-05-02 19:29:05 +00:00
|
|
|
# Commodore P500 / CBM 5x0
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: cbm510lib
|
2001-09-18 12:22:55 +00:00
|
|
|
cbm510lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime cbm510 cbm common conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=cbm510 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a cbm510.lib $$i/*.o || exit 1; \
|
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
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d cbm510/extra ]; then \
|
|
|
|
for i in cbm510/extra/*.o; do \
|
|
|
|
cp $$i cbm510-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
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
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: cbm610lib
|
2001-09-18 12:22:55 +00:00
|
|
|
cbm610lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime cbm610 cbm common conio dbg em joystick serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=cbm610 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a cbm610.lib $$i/*.o || exit 1; \
|
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
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d cbm610/extra ]; then \
|
|
|
|
for i in cbm610/extra/*.o; do \
|
|
|
|
cp $$i cbm610-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2001-09-14 21:11:39 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# GEOS on the C64/128
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: geoslib
|
2000-05-28 13:40:48 +00:00
|
|
|
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) \
|
2011-05-02 19:29:05 +00:00
|
|
|
AFLAGS="-t geos --forget-inc-paths -I../../../asminc" \
|
2003-08-03 12:04:59 +00:00
|
|
|
CFLAGS="-Osir -g -T -t geos --forget-inc-paths -I. -I../../../include" \
|
2011-05-02 19:29:05 +00:00
|
|
|
$(MAKE) -C geos
|
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) \
|
2010-08-07 18:22:37 +00:00
|
|
|
AFLAGS="-t geos --forget-inc-paths -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 \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a geos.lib geos/$$objfile || exit 1; \
|
2002-12-02 06:10:41 +00:00
|
|
|
else \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a geos.lib $$objfile || exit 1; \
|
2002-12-02 06:10:41 +00:00
|
|
|
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 .
|
2011-05-02 19:29:05 +00:00
|
|
|
cp geos/devel/*.tgi .
|
|
|
|
if [ -d geos/extra ]; then \
|
|
|
|
for i in geos/extra/*.o; do \
|
|
|
|
cp $$i geos-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2004-10-08 18:11:29 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Lynx
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: lynxlib
|
2004-10-08 18:11:29 +00:00
|
|
|
lynxlib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime lynx common conio em joystick serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=lynx -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a lynx.lib $$i/*.o || exit 1; \
|
2004-10-08 18:11:29 +00:00
|
|
|
done
|
2004-10-14 16:50:50 +00:00
|
|
|
cp lynx/*.joy .
|
2009-09-20 14:22:04 +00:00
|
|
|
cp lynx/*.ser .
|
2011-05-02 19:29:05 +00:00
|
|
|
cp lynx/*.tgi .
|
|
|
|
if [ -d lynx/extra ]; then \
|
|
|
|
for i in lynx/extra/*.o; do \
|
|
|
|
cp $$i lynx-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2004-10-26 21:21:06 +00:00
|
|
|
|
2003-04-14 21:28:51 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# NES
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: neslib
|
2003-04-14 21:28:51 +00:00
|
|
|
neslib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime nes common conio em joystick tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=nes -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a nes.lib $$i/*.o || exit 1; \
|
2003-04-14 21:28:51 +00:00
|
|
|
done
|
2004-10-26 21:21:06 +00:00
|
|
|
cp nes/*.joy .
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d nes/extra ]; then \
|
|
|
|
for i in nes/extra/*.o; do \
|
|
|
|
cp $$i nes-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2003-04-14 21:28:51 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# CBM PET machines
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: petlib
|
2000-05-28 13:40:48 +00:00
|
|
|
petlib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime pet cbm common conio dbg em joystick tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=pet -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a pet.lib $$i/*.o || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
done
|
2005-08-28 22:11:58 +00:00
|
|
|
cp pet/*.joy .
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d pet/extra ]; then \
|
|
|
|
for i in pet/extra/*.o; do \
|
|
|
|
cp $$i pet-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
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
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: plus4lib
|
2000-05-28 13:40:48 +00:00
|
|
|
plus4lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime plus4 cbm common conio dbg em joystick mouse serial tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=plus4 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a plus4.lib $$i/*.o || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
done
|
2002-12-21 08:53:39 +00:00
|
|
|
cp plus4/*.joy .
|
2003-12-14 17:42:41 +00:00
|
|
|
cp plus4/*.ser .
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d plus4/extra ]; then \
|
|
|
|
for i in plus4/extra/*.o; do \
|
|
|
|
cp $$i plus4-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-10-10 16:44:20 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Supervision
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: supervisionlib
|
2003-10-10 16:44:20 +00:00
|
|
|
supervisionlib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime supervision common; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=supervision -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a supervision.lib $$i/*.o || exit 1; \
|
2003-10-10 16:44:20 +00:00
|
|
|
done
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d supervision/extra ]; then \
|
|
|
|
for i in supervision/extra/*.o; do \
|
|
|
|
cp $$i supervision-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2003-10-10 16:44:20 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Vic20
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: vic20lib
|
2003-10-10 16:44:20 +00:00
|
|
|
vic20lib:
|
2011-05-02 19:29:05 +00:00
|
|
|
for i in runtime vic20 cbm common conio dbg em joystick mouse tgi zlib; do \
|
2004-10-26 21:21:06 +00:00
|
|
|
$(MAKE) SYS=vic20 -C $$i || exit 1; \
|
2010-06-25 22:16:43 +00:00
|
|
|
$(AR) a vic20.lib $$i/*.o || exit 1; \
|
2003-10-10 16:44:20 +00:00
|
|
|
done
|
|
|
|
cp vic20/*.joy .
|
2011-05-02 19:29:05 +00:00
|
|
|
if [ -d vic20/extra ]; then \
|
|
|
|
for i in vic20/extra/*.o; do \
|
|
|
|
cp $$i vic20-`basename $$i` || exit 1; \
|
|
|
|
done \
|
|
|
|
fi
|
2003-10-10 16:44:20 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Dummy targets
|
|
|
|
|
2011-05-02 19:29:05 +00:00
|
|
|
.PHONY: mostly-clean
|
|
|
|
mostly-clean:
|
|
|
|
@for i in $(SHAREDDIRS); do \
|
|
|
|
$(MAKE) --no-print-directory -C $$i clean || exit 1; \
|
|
|
|
done
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
.PHONY: clean
|
2011-05-02 19:29:05 +00:00
|
|
|
clean: mostly-clean
|
|
|
|
@for i in $(ALLTARGETS); do \
|
|
|
|
$(MAKE) -C $$i $@ || exit 1; \
|
2000-05-28 13:40:48 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: zap
|
2011-05-02 19:29:05 +00:00
|
|
|
zap:
|
|
|
|
@for i in $(SHAREDDIRS) $(ALLTARGETS); do \
|
|
|
|
$(MAKE) -C $$i $@ || exit 1; \
|
2003-02-06 15:35:30 +00:00
|
|
|
done
|
2011-05-02 19:29:05 +00:00
|
|
|
@$(RM) *.lib *.o *.emd *.joy *.mou *.ser *.tgi
|