]> git.sur5r.net Git - cc65/commitdiff
Convert dynamically loadable drivers into statically linkable drivers and add them...
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 29 Oct 2012 20:26:26 +0000 (20:26 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 29 Oct 2012 20:26:26 +0000 (20:26 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5887 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 files changed:
libsrc/Makefile
libsrc/apple2/Makefile
libsrc/apple2enh/Makefile
libsrc/atari/Makefile
libsrc/atmos/Makefile
libsrc/c128/Makefile
libsrc/c16/Makefile
libsrc/c64/Makefile
libsrc/cbm510/Makefile
libsrc/cbm610/Makefile
libsrc/lynx/Makefile
libsrc/nes/Makefile
libsrc/pet/Makefile
libsrc/plus4/Makefile
libsrc/vic20/Makefile

index 328b853c58324fd3a271d9882d1ece25bf5f7de2..101cca163d55afd6beef5ee6d91a6a048dc86f97 100644 (file)
@@ -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; \
index 9f14a081c97e325c30a9d640a2f10f2b8cb63669..3792529e63abe54671a05599e7940ff654c2ce24 100644 (file)
@@ -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)
index 02c6abd6824848ab2a7ac5e569d1a203033214c0..630e24fdc3b897fd5bdaf4bf9aab7859ef611790 100644 (file)
@@ -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)
index b81b78abfa2134dbc2d712dd30b574f7fdc6516a..30e9b181a3894c1bdf957d024bda501afdf162b8 100644 (file)
@@ -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)
-
index e38da12618e2bf6afcc82517c808abb3f0201c5c..cdd3f84f3ce82edb1510023cf3f67980d44fa816 100644 (file)
@@ -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)
-
-
index b5b2a8a2a72c790f1b9263986a663ffa112c10da..aa531e4d6230e515c89ccc4c2fe232aa77527e01 100644 (file)
@@ -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)
-
-
index 4019154a6ae45deff5d080e596104596de698fe3..4b7666410c199485363eee9beaf695ecb4c5c6c2 100644 (file)
@@ -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)
-
index 5d4b16aedaa26792a62a704920806d5bb052ed2c..8fb9526cd1c4716aaa56f0cdc498950b4e296def 100644 (file)
@@ -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)
-
index 06f0d02f10d21a99c5228390de38467bb1793b3b..1930bacae99ecee46f5e9987e7071de381444fb2 100644 (file)
@@ -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)
index 4f2491da02d1fba4f10bafcdfc4e71466efc3ee2..05b447a6ff859ae7309a5957223e515edb3e793d 100644 (file)
@@ -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)
-
index 68f8c9bddde9373a3fa8930035cbc106a0b55007..e0fa6a8f51b86fb1774931b654d407b05e8d525c 100644 (file)
@@ -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)
-
index dfbc3d04e7137dfa09db7e9448ee24b2b7530c21..9e8eef13280536019c2ebfe2c6faa861e751c505 100644 (file)
@@ -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)
-
-
-
index 8ecf018c1fe48e32c56cde5033df1cdb43f2d246..9216b79f29ffef015e7fc202919927e463aeac8f 100644 (file)
@@ -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)
-
-
index 4dc01c96bcd63244efecbbbfbeb9bf33e3d4e7a3..3e1c4211bba1246587f28a35ed4b4e836f6a2a4d 100644 (file)
@@ -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)
-
index 023f27a8fd1a760fdbff01ec838e4937c1150e71..c124833e2bf6757335845a80558576897daee68c 100644 (file)
@@ -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)
-
-