From a3c940e3153881c61427a943e574bfae661ee5cf Mon Sep 17 00:00:00 2001
From: "ol.sc"
Date: Mon, 29 Oct 2012 20:26:26 +0000
Subject: [PATCH] Convert dynamically loadable drivers into statically linkable
drivers and add them to the target libraries.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5887 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
libsrc/Makefile | 7 +-
libsrc/apple2/Makefile | 173 ++++++++++++++++++++++---------------
libsrc/apple2enh/Makefile | 177 ++++++++++++++++++++++----------------
libsrc/atari/Makefile | 158 +++++++++++++++++++---------------
libsrc/atmos/Makefile | 94 +++++++++++++-------
libsrc/c128/Makefile | 86 +++++++++++-------
libsrc/c16/Makefile | 76 ++++++++++------
libsrc/c64/Makefile | 62 +++++++++----
libsrc/cbm510/Makefile | 99 ++++++++++++---------
libsrc/cbm610/Makefile | 97 +++++++++++++--------
libsrc/lynx/Makefile | 89 ++++++++++++-------
libsrc/nes/Makefile | 110 ++++++++++++++---------
libsrc/pet/Makefile | 87 +++++++++++--------
libsrc/plus4/Makefile | 117 ++++++++++++++-----------
libsrc/vic20/Makefile | 79 +++++++++--------
15 files changed, 920 insertions(+), 591 deletions(-)
diff --git a/libsrc/Makefile b/libsrc/Makefile
index 328b853c5..101cca163 100644
--- a/libsrc/Makefile
+++ b/libsrc/Makefile
@@ -11,6 +11,7 @@
AR = ../src/ar65/ar65
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
# List of shared directories
@@ -37,8 +38,8 @@ ALLTARGETS = apple2 \
c64 \
cbm510 \
cbm610 \
- geos-apple \
- geos-cbm \
+ geos-apple \
+ geos-cbm \
lynx \
nes \
pet \
@@ -156,8 +157,8 @@ c16lib:
$(MAKE) SYS=c16 -C $$i || exit 1; \
$(AR) a c16.lib $$i/*.o || exit 1; \
done
- cp c16/*.joy .
cp c16/*.emd .
+ cp c16/*.joy .
if [ -d c16/extra ]; then \
for i in c16/extra/*.o; do \
cp $$i c16-`basename $$i` || exit 1; \
diff --git a/libsrc/apple2/Makefile b/libsrc/apple2/Makefile
index 9f14a081c..3792529e6 100644
--- a/libsrc/apple2/Makefile
+++ b/libsrc/apple2/Makefile
@@ -11,6 +11,7 @@ SYS = apple2
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -26,6 +27,26 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-mou.o: %.mou
+ @$(CO) -o $(*)-mou.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -44,77 +65,82 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-C_OBJS= closedir.o \
- opendir.o \
- readdir.o \
+C_OBJS= closedir.o \
+ opendir.o \
+ readdir.o \
rewinddir.o
-S_OBJS= _scrsize.o \
- break.o \
- cclear.o \
- cgetc.o \
- chline.o \
- close.o \
- clrscr.o \
- color.o \
- cout.o \
- cputc.o \
- crt0.o \
- ctype.o \
- curdevice.o \
- cvline.o \
- devicedir.o \
- dioclose.o \
- diocommon.o \
- dioopen.o \
- dioread.o \
- diosectcount.o \
- diosectsize.o \
- diowrite.o \
- dosdetect.o \
- exec.o \
- exehdr.o \
- filedes.o \
- filename.o \
- get_ostype.o \
- getdevice.o \
- gotoxy.o \
- gotoy.o \
- home.o \
- initcwd.o \
- iobuf.o \
- isdevice.o \
- joy_stddrv.o \
- kbhit.o \
- mainargs.o \
- mcbdefault.o \
- mli.o \
- mouse_stddrv.o \
- open.o \
- oserrlist.o \
- oserror.o \
- randomize.o \
- rdkey.o \
- read.o \
- reboot.o \
- revers.o \
- rwcommon.o \
- syschdir.o \
- sysmkdir.o \
- sysremove.o \
- sysrename.o \
- sysrmdir.o \
- systime.o \
- sysuname.o \
- tgi_colors.o \
- tgi_stddrv.o \
- toascii.o \
- vtabz.o \
- wherex.o \
- wherey.o \
- write.o
-
-S_EXTRA_OBJS= \
+S_OBJS= _scrsize.o \
+ break.o \
+ cclear.o \
+ cgetc.o \
+ chline.o \
+ close.o \
+ clrscr.o \
+ color.o \
+ cout.o \
+ cputc.o \
+ crt0.o \
+ ctype.o \
+ curdevice.o \
+ cvline.o \
+ devicedir.o \
+ dioclose.o \
+ diocommon.o \
+ dioopen.o \
+ dioread.o \
+ diosectcount.o \
+ diosectsize.o \
+ diowrite.o \
+ dosdetect.o \
+ exec.o \
+ exehdr.o \
+ filedes.o \
+ filename.o \
+ get_ostype.o \
+ getdevice.o \
+ gotoxy.o \
+ gotoy.o \
+ home.o \
+ initcwd.o \
+ iobuf.o \
+ isdevice.o \
+ joy_stddrv.o \
+ kbhit.o \
+ mainargs.o \
+ mcbdefault.o \
+ mli.o \
+ mouse_stddrv.o \
+ open.o \
+ oserrlist.o \
+ oserror.o \
+ randomize.o \
+ rdkey.o \
+ read.o \
+ reboot.o \
+ revers.o \
+ rwcommon.o \
+ syschdir.o \
+ sysmkdir.o \
+ sysremove.o \
+ sysrename.o \
+ sysrmdir.o \
+ systime.o \
+ sysuname.o \
+ tgi_colors.o \
+ tgi_stddrv.o \
+ toascii.o \
+ vtabz.o \
+ wherex.o \
+ wherey.o \
+ write.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(MOUS:.mou=-mou.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
+
+S_EXTRA_OBJS= \
extra/iobuf-0800.o
#--------------------------------------------------------------------------
@@ -135,13 +161,18 @@ TGIS = apple2-280-192-8.tgi apple2-40-48-16.tgi
.PHONY: all clean zap
-all: $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+all: $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(S_EXTRA_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)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
diff --git a/libsrc/apple2enh/Makefile b/libsrc/apple2enh/Makefile
index 02c6abd68..630e24fdc 100644
--- a/libsrc/apple2enh/Makefile
+++ b/libsrc/apple2enh/Makefile
@@ -11,6 +11,7 @@ SYS = apple2enh
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../apple2 -I../../asminc
@@ -29,6 +30,26 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I ../apple2 -I ../../include
extra/%.o: ../apple2/extra/%.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-mou.o: %.mou
+ @$(CO) -o $(*)-mou.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -47,79 +68,84 @@ extra/%.o: ../apple2/extra/%.s
#--------------------------------------------------------------------------
# Object files
-C_OBJS= closedir.o \
- opendir.o \
- readdir.o \
+C_OBJS= closedir.o \
+ opendir.o \
+ readdir.o \
rewinddir.o
-S_OBJS= _scrsize.o \
- break.o \
- cclear.o \
- cgetc.o \
- chline.o \
- close.o \
- clrscr.o \
- color.o \
- cout.o \
- cputc.o \
- crt0.o \
- ctype.o \
- curdevice.o \
- cvline.o \
- devicedir.o \
- dioclose.o \
- diocommon.o \
- dioopen.o \
- dioread.o \
- diosectcount.o \
- diosectsize.o \
- diowrite.o \
- dosdetect.o \
- exec.o \
- exehdr.o \
- filedes.o \
- filename.o \
- get_ostype.o \
- getdevice.o \
- gotoxy.o \
- gotoy.o \
- home.o \
- initcwd.o \
- iobuf.o \
- isdevice.o \
- joy_stddrv.o \
- kbhit.o \
- mainargs.o \
- mcbdefault.o \
- mli.o \
- mouse_stddrv.o \
- open.o \
- oserrlist.o \
- oserror.o \
- randomize.o \
- rdkey.o \
- read.o \
- reboot.o \
- revers.o \
- rwcommon.o \
- syschdir.o \
- sysmkdir.o \
- sysremove.o \
- sysrename.o \
- sysrmdir.o \
- systime.o \
- sysuname.o \
- textframe.o \
- tgi_colors.o \
- tgi_stddrv.o \
- toascii.o \
- videomode.o \
- vtabz.o \
- wherex.o \
- wherey.o \
- write.o
-
-S_EXTRA_OBJS= \
+S_OBJS= _scrsize.o \
+ break.o \
+ cclear.o \
+ cgetc.o \
+ chline.o \
+ close.o \
+ clrscr.o \
+ color.o \
+ cout.o \
+ cputc.o \
+ crt0.o \
+ ctype.o \
+ curdevice.o \
+ cvline.o \
+ devicedir.o \
+ dioclose.o \
+ diocommon.o \
+ dioopen.o \
+ dioread.o \
+ diosectcount.o \
+ diosectsize.o \
+ diowrite.o \
+ dosdetect.o \
+ exec.o \
+ exehdr.o \
+ filedes.o \
+ filename.o \
+ get_ostype.o \
+ getdevice.o \
+ gotoxy.o \
+ gotoy.o \
+ home.o \
+ initcwd.o \
+ iobuf.o \
+ isdevice.o \
+ joy_stddrv.o \
+ kbhit.o \
+ mainargs.o \
+ mcbdefault.o \
+ mli.o \
+ mouse_stddrv.o \
+ open.o \
+ oserrlist.o \
+ oserror.o \
+ randomize.o \
+ rdkey.o \
+ read.o \
+ reboot.o \
+ revers.o \
+ rwcommon.o \
+ syschdir.o \
+ sysmkdir.o \
+ sysremove.o \
+ sysrename.o \
+ sysrmdir.o \
+ systime.o \
+ sysuname.o \
+ textframe.o \
+ tgi_colors.o \
+ tgi_stddrv.o \
+ toascii.o \
+ videomode.o \
+ vtabz.o \
+ wherex.o \
+ wherey.o \
+ write.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(MOUS:.mou=-mou.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
+
+S_EXTRA_OBJS= \
extra/iobuf-0800.o
#--------------------------------------------------------------------------
@@ -140,13 +166,18 @@ TGIS = apple2-280-192-8.tgi apple2-40-48-16.tgi
.PHONY: all clean zap
-all: $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+all: $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(S_EXTRA_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(S_EXTRA_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)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
diff --git a/libsrc/atari/Makefile b/libsrc/atari/Makefile
index b81b78abf..30e9b181a 100644
--- a/libsrc/atari/Makefile
+++ b/libsrc/atari/Makefile
@@ -28,6 +28,7 @@ SYS = atari
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -36,14 +37,26 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $(ATARIDEFS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $(ATARIDEFS) $<
-%.emd: %.o ../runtime/zeropage.o
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
+%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
%.joy: %.o ../runtime/zeropage.o
@@ -56,71 +69,74 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- cclear.o \
- cgetc.o \
- chline.o \
- clock.o \
- close.o \
- clrscr.o \
- color.o \
- cputc.o \
- crt0.o \
- ctype.o \
- cvline.o \
- dio_cts.o \
- dio_stc.o \
- diopncls.o \
- dioqsize.o \
- dioread.o \
- diowrite.o \
- diowritev.o \
- do_oserr.o \
- dosdetect.o \
- fdtable.o \
- fdtab.o \
- fdtoiocb.o \
- getargs.o \
- getdefdev.o \
- getfd.o \
- gotox.o \
- gotoy.o \
- gotoxy.o \
- graphics.o \
- initcwd.o \
- inviocb.o \
- joy_stddrv.o \
- kbhit.o \
- lseek.o \
- mul40.o \
- open.o \
- oserrlist.o \
- oserror.o \
- ostype.o \
- posixdirent.o \
- randomize.o \
- read.o \
- revers.o \
- rwcommon.o \
- savevec.o \
- scroll.o \
- setcolor.o \
- siocall.o \
- syschdir.o \
- sysmkdir.o \
- sysremove.o \
- sysrmdir.o \
- systime.o \
- sysuname.o \
- tgi_colors.o \
- tgi_stddrv.o \
- toascii.o \
- tvtype.o \
- ucase_fn.o \
- wherex.o \
- wherey.o \
- write.o
+OBJS = _scrsize.o \
+ break.o \
+ cclear.o \
+ cgetc.o \
+ chline.o \
+ clock.o \
+ close.o \
+ clrscr.o \
+ color.o \
+ cputc.o \
+ crt0.o \
+ ctype.o \
+ cvline.o \
+ dio_cts.o \
+ dio_stc.o \
+ diopncls.o \
+ dioqsize.o \
+ dioread.o \
+ diowrite.o \
+ diowritev.o \
+ do_oserr.o \
+ dosdetect.o \
+ fdtable.o \
+ fdtab.o \
+ fdtoiocb.o \
+ getargs.o \
+ getdefdev.o \
+ getfd.o \
+ gotox.o \
+ gotoy.o \
+ gotoxy.o \
+ graphics.o \
+ initcwd.o \
+ inviocb.o \
+ joy_stddrv.o \
+ kbhit.o \
+ lseek.o \
+ mul40.o \
+ open.o \
+ oserrlist.o \
+ oserror.o \
+ ostype.o \
+ posixdirent.o \
+ randomize.o \
+ read.o \
+ revers.o \
+ rwcommon.o \
+ savevec.o \
+ scroll.o \
+ setcolor.o \
+ siocall.o \
+ syschdir.o \
+ sysmkdir.o \
+ sysremove.o \
+ sysrmdir.o \
+ systime.o \
+ sysuname.o \
+ tgi_colors.o \
+ tgi_stddrv.o \
+ toascii.o \
+ tvtype.o \
+ ucase_fn.o \
+ wherex.o \
+ wherey.o \
+ write.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
@@ -137,14 +153,16 @@ TGIS = atari-3.tgi atari-4.tgi atari-5.tgi atari-6.tgi atari-7.tgi atari-8.tgi \
#--------------------------------------------------------------------------
# Targets
-all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(OBJS) \
+ $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
+ $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
+ $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(TGIS)
-
diff --git a/libsrc/atmos/Makefile b/libsrc/atmos/Makefile
index e38da1261..cdd3f84f3 100644
--- a/libsrc/atmos/Makefile
+++ b/libsrc/atmos/Makefile
@@ -11,6 +11,7 @@ SYS = atmos
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,13 +20,33 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-mou.o: %.mou
+ @$(CO) -o $(*)-mou.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -44,34 +65,40 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- atmos_load.o \
- atmos_save.o \
- cclear.o \
- cgetc.o \
- chline.o \
- clock.o \
- clrscr.o \
- color.o \
- cputc.o \
- crt0.o \
- ctype.o \
- cvline.o \
- gotox.o \
- gotoxy.o \
- gotoy.o \
- kbhit.o \
- mainargs.o \
- oserrlist.o \
- oserror.o \
- revers.o \
- store_filename.o\
- systime.o \
- sysuname.o \
- tgi_colors.o \
- wherex.o \
- wherey.o \
- write.o
+OBJS = _scrsize.o \
+ atmos_load.o \
+ atmos_save.o \
+ cclear.o \
+ cgetc.o \
+ chline.o \
+ clock.o \
+ clrscr.o \
+ color.o \
+ cputc.o \
+ crt0.o \
+ ctype.o \
+ cvline.o \
+ gotox.o \
+ gotoxy.o \
+ gotoy.o \
+ kbhit.o \
+ mainargs.o \
+ oserrlist.o \
+ oserror.o \
+ revers.o \
+ store_filename.o \
+ systime.o \
+ sysuname.o \
+ tgi_colors.o \
+ wherex.o \
+ wherey.o \
+ write.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(MOUS:.mou=-mou.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
+
#--------------------------------------------------------------------------
# Drivers
@@ -97,9 +124,12 @@ all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(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)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
-
-
diff --git a/libsrc/c128/Makefile b/libsrc/c128/Makefile
index b5b2a8a2a..aa531e4d6 100644
--- a/libsrc/c128/Makefile
+++ b/libsrc/c128/Makefile
@@ -11,6 +11,7 @@ SYS = c128
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,13 +20,33 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-mou.o: %.mou
+ @$(CO) -o $(*)-mou.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -44,34 +65,39 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- c64mode.o \
- cgetc.o \
- clrscr.o \
- conio.o \
- crt0.o \
- color.o \
- cputc.o \
- devnum.o \
- fast.o \
- get_tv.o \
- joy_stddrv.o \
- kbhit.o \
- kernal.o \
+OBJS = _scrsize.o \
+ break.o \
+ c64mode.o \
+ cgetc.o \
+ clrscr.o \
+ conio.o \
+ crt0.o \
+ color.o \
+ cputc.o \
+ devnum.o \
+ fast.o \
+ get_tv.o \
+ joy_stddrv.o \
+ kbhit.o \
+ kernal.o \
mainargs.o \
- mcbdefault.o \
+ mcbdefault.o \
mouse_stddrv.o \
- randomize.o \
- revers.o \
- slow.o \
- status.o \
+ randomize.o \
+ revers.o \
+ slow.o \
+ status.o \
systime.o \
sysuname.o \
tgi_colors.o \
- tgi_stddrv.o \
- toggle_videomode.o \
- videomode.o
+ tgi_stddrv.o \
+ toggle_videomode.o \
+ videomode.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(MOUS:.mou=-mou.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -100,16 +126,18 @@ TGIS = c128-640-200-2.tgi \
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
-
+ @$(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)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
-
-
diff --git a/libsrc/c16/Makefile b/libsrc/c16/Makefile
index 4019154a6..4b7666410 100644
--- a/libsrc/c16/Makefile
+++ b/libsrc/c16/Makefile
@@ -11,6 +11,7 @@ SYS = c16
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I. -I../../asminc
@@ -19,22 +20,35 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
%.joy: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
-%.mou: %.o ../runtime/zeropage.o
- @$(LD) -o $@ -t module $^
-
%.ser: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -44,26 +58,31 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- cgetc.o \
- clrscr.o \
- color.o \
- conio.o \
- cputc.o \
- crt0.o \
- devnum.o \
- get_tv.o \
- joy_stddrv.o \
- kbhit.o \
- kclose.o \
- kernal.o \
- mainargs.o \
- randomize.o \
- revers.o \
- status.o \
- systime.o \
- sysuname.o
+OBJS = _scrsize.o \
+ break.o \
+ cgetc.o \
+ clrscr.o \
+ color.o \
+ conio.o \
+ cputc.o \
+ crt0.o \
+ devnum.o \
+ get_tv.o \
+ joy_stddrv.o \
+ kbhit.o \
+ kclose.o \
+ kernal.o \
+ mainargs.o \
+ randomize.o \
+ revers.o \
+ status.o \
+ systime.o \
+ sysuname.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
+
#--------------------------------------------------------------------------
# Drivers
@@ -81,14 +100,17 @@ TGIS =
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(OBJS) \
+ $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
+ $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
+ $(SERS:.ser=.o) $(SERS:.ser=-ser.s) \
+ $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
-
diff --git a/libsrc/c64/Makefile b/libsrc/c64/Makefile
index 5d4b16aed..8fb9526cd 100644
--- a/libsrc/c64/Makefile
+++ b/libsrc/c64/Makefile
@@ -11,6 +11,7 @@ SYS = c64
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,13 +20,33 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-mou.o: %.mou
+ @$(CO) -o $(*)-mou.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -44,19 +65,19 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- crt0.o \
- cgetc.o \
- clrscr.o \
- color.o \
- conio.o \
- cputc.o \
- devnum.o \
+OBJS = _scrsize.o \
+ break.o \
+ crt0.o \
+ cgetc.o \
+ clrscr.o \
+ color.o \
+ conio.o \
+ cputc.o \
+ devnum.o \
get_ostype.o \
get_tv.o \
- joy_stddrv.o \
- kbhit.o \
+ joy_stddrv.o \
+ kbhit.o \
kernal.o \
kplot.o \
mainargs.o \
@@ -68,7 +89,12 @@ OBJS = _scrsize.o \
systime.o \
sysuname.o \
tgi_colors.o \
- tgi_stddrv.o
+ tgi_stddrv.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(MOUS:.mou=-mou.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -101,14 +127,18 @@ TGIS = c64-320-200-2.tgi
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(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)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
-
diff --git a/libsrc/cbm510/Makefile b/libsrc/cbm510/Makefile
index 06f0d02f1..1930bacae 100644
--- a/libsrc/cbm510/Makefile
+++ b/libsrc/cbm510/Makefile
@@ -11,6 +11,7 @@ SYS = cbm510
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,22 +20,35 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o extzp.o
@$(LD) -o $@ -t module $^
%.joy: %.o ../runtime/zeropage.o extzp.o
@$(LD) -o $@ -t module $^
-%.mou: %.o ../runtime/zeropage.o extzp.o
- @$(LD) -o $@ -t module $^
-
%.ser: %.o ../runtime/zeropage.o extzp.o
@$(LD) -o $@ -t module $^
@@ -44,42 +58,39 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-%.o: %.c
- @$(CC) $(CFLAGS) $<
- @$(AS) -o $@ $(AFLAGS) $(*).s
-
-%.o: %.s
- @$(AS) -g -o $@ $(AFLAGS) $<
-
-OBJS = _scrsize.o \
- banking.o \
- break.o \
- cgetc.o \
- clrscr.o \
- color.o \
- cputc.o \
- crt0.o \
- devnum.o \
- extzp.o \
- kbhit.o \
- kclose.o \
- kernal.o \
- kiobase.o \
- kopen.o \
- krdtim.o \
- kreadst.o \
- kscnkey.o \
- kscreen.o \
- ksetnam.o \
- ksettim.o \
- kudtim.o \
- mainargs.o \
- peeksys.o \
- pokesys.o \
- randomize.o \
- revers.o \
- systime.o \
- sysuname.o
+OBJS = _scrsize.o \
+ banking.o \
+ break.o \
+ cgetc.o \
+ clrscr.o \
+ color.o \
+ cputc.o \
+ crt0.o \
+ devnum.o \
+ extzp.o \
+ kbhit.o \
+ kclose.o \
+ kernal.o \
+ kiobase.o \
+ kopen.o \
+ krdtim.o \
+ kreadst.o \
+ kscnkey.o \
+ kscreen.o \
+ ksetnam.o \
+ ksettim.o \
+ kudtim.o \
+ mainargs.o \
+ peeksys.o \
+ pokesys.o \
+ randomize.o \
+ revers.o \
+ systime.o \
+ sysuname.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -97,13 +108,17 @@ TGIS =
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(OBJS) \
+ $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
+ $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
+ $(SERS:.ser=.o) $(SERS:.ser=-ser.s) \
+ $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
diff --git a/libsrc/cbm610/Makefile b/libsrc/cbm610/Makefile
index 4f2491da0..05b447a6f 100644
--- a/libsrc/cbm610/Makefile
+++ b/libsrc/cbm610/Makefile
@@ -11,6 +11,7 @@ SYS = cbm610
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,22 +20,35 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o extzp.o
@$(LD) -o $@ -t module $^
%.joy: %.o ../runtime/zeropage.o extzp.o
@$(LD) -o $@ -t module $^
-%.mou: %.o ../runtime/zeropage.o extzp.o
- @$(LD) -o $@ -t module $^
-
%.ser: %.o ../runtime/zeropage.o extzp.o
@$(LD) -o $@ -t module $^
@@ -44,37 +58,41 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- banking.o \
- break.o \
- cgetc.o \
- clrscr.o \
- color.o \
- cputc.o \
- crt0.o \
- crtc.o \
- devnum.o \
- extzp.o \
- get_tv.o \
- kbhit.o \
- kclose.o \
- kernal.o \
- kiobase.o \
- kopen.o \
- krdtim.o \
- kreadst.o \
- kscnkey.o \
- kscreen.o \
- ksetnam.o \
- ksettim.o \
- kudtim.o \
- mainargs.o \
- peeksys.o \
- pokesys.o \
- randomize.o \
- revers.o \
- systime.o \
- sysuname.o
+OBJS = _scrsize.o \
+ banking.o \
+ break.o \
+ cgetc.o \
+ clrscr.o \
+ color.o \
+ cputc.o \
+ crt0.o \
+ crtc.o \
+ devnum.o \
+ extzp.o \
+ get_tv.o \
+ kbhit.o \
+ kclose.o \
+ kernal.o \
+ kiobase.o \
+ kopen.o \
+ krdtim.o \
+ kreadst.o \
+ kscnkey.o \
+ kscreen.o \
+ ksetnam.o \
+ ksettim.o \
+ kudtim.o \
+ mainargs.o \
+ peeksys.o \
+ pokesys.o \
+ randomize.o \
+ revers.o \
+ systime.o \
+ sysuname.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -92,14 +110,17 @@ TGIS =
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(OBJS) \
+ $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
+ $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
+ $(SERS:.ser=.o) $(SERS:.ser=-ser.s) \
+ $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
-
diff --git a/libsrc/lynx/Makefile b/libsrc/lynx/Makefile
index 68f8c9bdd..e0fa6a8f5 100644
--- a/libsrc/lynx/Makefile
+++ b/libsrc/lynx/Makefile
@@ -11,6 +11,7 @@ SYS = lynx
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -26,6 +27,26 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-mou.o: %.mou
+ @$(CO) -o $(*)-mou.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o extzp.o
@$(LD) -o $@ -t module $^
@@ -44,32 +65,38 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = bllhdr.o \
- bootldr.o \
- cgetc.o \
- clock.o \
- crt0.o \
- ctype.o \
- defdir.o \
- eeprom.o \
- eeprom46.o \
- eeprom66.o \
- eeprom86.o \
- exec.o \
- exehdr.o \
- extzp.o \
- kbhit.o \
- load.o \
- lseek.o \
- lynx-cart.o \
- mainargs.o \
- open.o \
- oserror.o \
- read.o \
- sysuname.o \
- tgi_colors.o \
- toascii.o \
- uploader.o
+OBJS = bllhdr.o \
+ bootldr.o \
+ cgetc.o \
+ clock.o \
+ crt0.o \
+ ctype.o \
+ defdir.o \
+ eeprom.o \
+ eeprom46.o \
+ eeprom66.o \
+ eeprom86.o \
+ exec.o \
+ exehdr.o \
+ extzp.o \
+ kbhit.o \
+ load.o \
+ lseek.o \
+ lynx-cart.o \
+ mainargs.o \
+ open.o \
+ oserror.o \
+ read.o \
+ sysuname.o \
+ tgi_colors.o \
+ toascii.o \
+ uploader.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(MOUS:.mou=-mou.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
+
#--------------------------------------------------------------------------
# Drivers
@@ -89,14 +116,18 @@ TGIS = lynx-160-102-16.tgi
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(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)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
-
diff --git a/libsrc/nes/Makefile b/libsrc/nes/Makefile
index dfbc3d04e..9e8eef132 100644
--- a/libsrc/nes/Makefile
+++ b/libsrc/nes/Makefile
@@ -11,6 +11,7 @@ SYS = nes
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,13 +20,33 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-mou.o: %.mou
+ @$(CO) -o $(*)-mou.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-mou.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -44,31 +65,36 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- cclear.o \
- chline.o \
- clock.o \
- clrscr.o \
- color.o \
- cputc.o \
- crt0.o \
- ctype.o \
- cvline.o \
- get_tv.o \
- gotox.o \
- gotoxy.o \
- gotoy.o \
- mainargs.o \
- ppu.o \
- ppubuf.o \
- randomize.o \
- revers.o \
- setcursor.o \
- sysuname.o \
- tgi_colors.o \
- waitvblank.o \
- wherex.o \
- wherey.o
+OBJS = _scrsize.o \
+ cclear.o \
+ chline.o \
+ clock.o \
+ clrscr.o \
+ color.o \
+ cputc.o \
+ crt0.o \
+ ctype.o \
+ cvline.o \
+ get_tv.o \
+ gotox.o \
+ gotoxy.o \
+ gotoy.o \
+ mainargs.o \
+ ppu.o \
+ ppubuf.o \
+ randomize.o \
+ revers.o \
+ setcursor.o \
+ sysuname.o \
+ tgi_colors.o \
+ waitvblank.o \
+ wherex.o \
+ wherey.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(MOUS:.mou=-mou.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -88,7 +114,7 @@ TGIS = nes-64-56-2.tgi
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/popa.o:
$(MAKE) -C $(dir $@) $(notdir $@)
@@ -96,23 +122,25 @@ all: $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
-nes-64-56-2.tgi: nes-64-56-2.o \
- ../runtime/popa.o \
- ../runtime/zeropage.o \
- clrscr.o \
- cputc.o \
- get_tv.o \
- gotoxy.o \
- ppu.o \
- ppubuf.o \
- setcursor.o
+nes-64-56-2.tgi: nes-64-56-2.o \
+ ../runtime/popa.o \
+ ../runtime/zeropage.o \
+ clrscr.o \
+ cputc.o \
+ get_tv.o \
+ gotoxy.o \
+ ppu.o \
+ ppubuf.o \
+ setcursor.o
@$(LD) -o $@ -t module $^
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(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)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
-
-
-
diff --git a/libsrc/pet/Makefile b/libsrc/pet/Makefile
index 8ecf018c1..9216b79f2 100644
--- a/libsrc/pet/Makefile
+++ b/libsrc/pet/Makefile
@@ -11,6 +11,7 @@ SYS = pet
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,23 +20,29 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
-%.emd: %.o ../runtime/zeropage.o
- @$(LD) -o $@ -t module $^
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
-%.joy: %.o ../runtime/zeropage.o
- @$(LD) -o $@ -t module $^
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
-%.mou: %.o ../runtime/zeropage.o
+%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
-%.ser: %.o ../runtime/zeropage.o
+%.joy: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
%.tgi: %.o ../runtime/zeropage.o
@@ -44,34 +51,37 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- cgetc.o \
- checkst.o \
- clrscr.o \
- color.o \
- conio.o \
- cputc.o \
- crt0.o \
- devnum.o \
- get_tv.o \
- kbhit.o \
- kbsout.o \
- kchkin.o \
- kckout.o \
- kclose.o \
- kernal.o \
- kopen.o \
- kplot.o \
- krdtim.o \
- kreadst.o \
- ksetlfs.o \
- ksetnam.o \
- mainargs.o \
- randomize.o \
- revers.o \
- status.o \
- sysuname.o
+OBJS = _scrsize.o \
+ break.o \
+ cgetc.o \
+ checkst.o \
+ clrscr.o \
+ color.o \
+ conio.o \
+ cputc.o \
+ crt0.o \
+ devnum.o \
+ get_tv.o \
+ kbhit.o \
+ kbsout.o \
+ kchkin.o \
+ kckout.o \
+ kclose.o \
+ kernal.o \
+ kopen.o \
+ kplot.o \
+ krdtim.o \
+ kreadst.o \
+ ksetlfs.o \
+ ksetnam.o \
+ mainargs.o \
+ randomize.o \
+ revers.o \
+ status.o \
+ sysuname.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -93,9 +103,10 @@ all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(OBJS) \
+ $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
+ $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
+ $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(TGIS)
-
-
diff --git a/libsrc/plus4/Makefile b/libsrc/plus4/Makefile
index 4dc01c96b..3e1c4211b 100644
--- a/libsrc/plus4/Makefile
+++ b/libsrc/plus4/Makefile
@@ -11,6 +11,7 @@ SYS = c16
AS = ../../src/ca65/ca65
CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
LD = ../../src/ld65/ld65
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
@@ -19,22 +20,35 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
+
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-ser.o: %.ser
+ @$(CO) -o $(*)-ser.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-ser.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
+
%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
%.joy: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
-%.mou: %.o ../runtime/zeropage.o
- @$(LD) -o $@ -t module $^
-
%.ser: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
@@ -44,47 +58,51 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- cgetc.o \
- clrscr.o \
- color.o \
- conio.o \
- cputc.o \
- crt0.o \
- devnum.o \
- get_tv.o \
- joy_stddrv.o \
- kacptr.o \
- kbasin.o \
- kbhit.o \
- kbsout.o \
- kchkin.o \
- kciout.o \
- kckout.o \
- kclall.o \
- kclose.o \
- kclrch.o \
- kiobase.o \
- klisten.o \
- kload.o \
- kopen.o \
- kplot.o \
- krdtim.o \
- kreadst.o \
- ksave.o \
- ksetlfs.o \
- ksetnam.o \
- ksettim.o \
- ktalk.o \
- kunlsn.o \
- kuntlk.o \
- mainargs.o \
- randomize.o \
- revers.o \
- status.o \
- systime.o \
- sysuname.o
+OBJS = _scrsize.o \
+ break.o \
+ cgetc.o \
+ clrscr.o \
+ color.o \
+ conio.o \
+ cputc.o \
+ crt0.o \
+ devnum.o \
+ get_tv.o \
+ joy_stddrv.o \
+ kacptr.o \
+ kbasin.o \
+ kbhit.o \
+ kbsout.o \
+ kchkin.o \
+ kciout.o \
+ kckout.o \
+ kclall.o \
+ kclose.o \
+ kclrch.o \
+ kiobase.o \
+ klisten.o \
+ kload.o \
+ kopen.o \
+ kplot.o \
+ krdtim.o \
+ kreadst.o \
+ ksave.o \
+ ksetlfs.o \
+ ksetnam.o \
+ ksettim.o \
+ ktalk.o \
+ kunlsn.o \
+ kuntlk.o \
+ mainargs.o \
+ randomize.o \
+ revers.o \
+ status.o \
+ systime.o \
+ sysuname.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(SERS:.ser=-ser.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -102,14 +120,17 @@ TGIS =
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(OBJS) \
+ $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
+ $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
+ $(SERS:.ser=.o) $(SERS:.ser=-ser.s) \
+ $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
-
diff --git a/libsrc/vic20/Makefile b/libsrc/vic20/Makefile
index 023f27a8f..c124833e2 100644
--- a/libsrc/vic20/Makefile
+++ b/libsrc/vic20/Makefile
@@ -7,11 +7,12 @@
#--------------------------------------------------------------------------
# Programs and flags
-SYS = vic20
+SYS = vic20
-AS = ../../src/ca65/ca65
-CC = ../../src/cc65/cc65
-LD = ../../src/ld65/ld65
+AS = ../../src/ca65/ca65
+CC = ../../src/cc65/cc65
+CO = ../../src/co65/co65
+LD = ../../src/ld65/ld65
AFLAGS=-t $(SYS) --forget-inc-paths -I../../asminc
CFLAGS=-Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
@@ -19,23 +20,29 @@ CFLAGS=-Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Rules
-%.o: %.c
+%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
-%.emd: %.o ../runtime/zeropage.o
- @$(LD) -o $@ -t module $^
+%-emd.o: %.emd
+ @$(CO) -o $(*)-emd.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-emd.s
-%.joy: %.o ../runtime/zeropage.o
- @$(LD) -o $@ -t module $^
+%-joy.o: %.joy
+ @$(CO) -o $(*)-joy.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-joy.s
+
+%-tgi.o: %.tgi
+ @$(CO) -o $(*)-tgi.s --code-name _$(subst -,_,$(*)) $<
+ @$(AS) -o $@ $(AFLAGS) $(*)-tgi.s
-%.mou: %.o ../runtime/zeropage.o
+%.emd: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
-%.ser: %.o ../runtime/zeropage.o
+%.joy: %.o ../runtime/zeropage.o
@$(LD) -o $@ -t module $^
%.tgi: %.o ../runtime/zeropage.o
@@ -44,25 +51,28 @@ CFLAGS=-Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- crt0.o \
- cgetc.o \
- clrscr.o \
- color.o \
- conio.o \
- cputc.o \
- devnum.o \
- get_tv.o \
- joy_stddrv.o \
- kbhit.o \
- kernal.o \
- kplot.o \
- mainargs.o \
- randomize.o \
- revers.o \
- status.o \
- sysuname.o
+OBJS = _scrsize.o \
+ break.o \
+ crt0.o \
+ cgetc.o \
+ clrscr.o \
+ color.o \
+ conio.o \
+ cputc.o \
+ devnum.o \
+ get_tv.o \
+ joy_stddrv.o \
+ kbhit.o \
+ kernal.o \
+ kplot.o \
+ mainargs.o \
+ randomize.o \
+ revers.o \
+ status.o \
+ sysuname.o \
+ $(EMDS:.emd=-emd.o) \
+ $(JOYS:.joy=-joy.o) \
+ $(TGIS:.tgi=-tgi.o)
#--------------------------------------------------------------------------
# Drivers
@@ -78,15 +88,16 @@ TGIS =
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
+all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(OBJS) \
+ $(EMDS:.emd=.o) $(EMDS:.emd=-emd.s) \
+ $(JOYS:.joy=.o) $(JOYS:.joy=-joy.s) \
+ $(TGIS:.tgi=.o) $(TGIS:.tgi=-tgi.s)
zap: clean
@$(RM) $(EMDS) $(JOYS) $(TGIS)
-
-
--
2.39.5