]> git.sur5r.net Git - cc65/commitdiff
Replaced whole bunch for Makefiles with a single generic Makefile.
authorOliver Schmidt <ol.sc@web.de>
Sat, 4 May 2013 20:15:30 +0000 (22:15 +0200)
committerOliver Schmidt <ol.sc@web.de>
Sat, 4 May 2013 20:15:30 +0000 (22:15 +0200)
- No complex shell logic.
- "Source file shadowing" for all targets via vpath.
- Dependency handling.
- True incremental build.
- Don't write into source directories.
- Easy cleanup by just removing 'wrk'.

24 files changed:
libsrc/Makefile
libsrc/apple2/joy_stat_stddrv.s
libsrc/apple2/mouse_stat_stddrv.s
libsrc/apple2/tgi_stat_stddrv.s
libsrc/atari/joy_stat_stddrv.s
libsrc/atari/tgi_stat_stddrv.s
libsrc/atmos/joy_stat_stddrv.s
libsrc/atmos/tgi_stat_stddrv.s
libsrc/c128/joy_stat_stddrv.s
libsrc/c128/mouse_stat_stddrv.s
libsrc/c128/tgi_stat_stddrv.s
libsrc/c16/joy_stat_stddrv.s
libsrc/c64/joy_stat_stddrv.s
libsrc/c64/mouse_stat_stddrv.s
libsrc/c64/tgi_stat_stddrv.s
libsrc/cbm510/joy_stat_stddrv.s
libsrc/dbg/dbg.c
libsrc/lynx/joy_stat_stddrv.s
libsrc/lynx/tgi_stat_stddrv.s
libsrc/nes/joy_stat_stddrv.s
libsrc/nes/tgi_stat_stddrv.s
libsrc/pet/joy_stat_stddrv.s
libsrc/plus4/joy_stat_stddrv.s
libsrc/vic20/joy_stat_stddrv.s

index 101cca163d55afd6beef5ee6d91a6a048dc86f97..36b88ff8f333b41e05c795de63a7c4d069b8d1a6 100644 (file)
-# -*- make -*-
-#
-# Makefile for CC65 Libraries
-#
-
-.SUFFIXES: .o .obj .s .c
-
-# Defines for executables. AR is used within this makefile, the others are
-# passed to the submakes and contain paths relative to the subdirectories
-# handled by the make subprocesses.
-AR = ../src/ar65/ar65
-AS = ../../src/ca65/ca65
-CC = ../../src/cc65/cc65
-CO = ../../src/co65/co65
-LD = ../../src/ld65/ld65
-
-# List of shared directories
-SHAREDDIRS =   cbm             \
-               common          \
-               geos-common     \
-               conio           \
-               dbg             \
-               em              \
-               joystick        \
-               mouse           \
-               runtime         \
-               serial          \
-               tgi             \
-               zlib
-
-# List of all targets
-ALLTARGETS =   apple2          \
-               apple2enh       \
-               atari           \
-               atmos           \
-               c128            \
-               c16             \
-               c64             \
-               cbm510          \
-               cbm610          \
-               geos-apple      \
-               geos-cbm        \
-               lynx            \
-               nes             \
-               pet             \
-               plus4           \
-               supervision     \
-               vic20
-
-#-----------------------------------------------------------------------------
-
-.PHONY:        all
-all:
-       for tgt in $(ALLTARGETS); do                    \
-           $(MAKE) mostly-clean "$$tgt"lib || exit 1;  \
-       done
-
-#-----------------------------------------------------------------------------
-# Apple ][
-
-.PHONY:        apple2lib
-apple2lib:
-       for i in runtime apple2 common conio dbg em joystick mouse serial tgi zlib; do \
-           $(MAKE) SYS=apple2 -C $$i || exit 1; \
-           $(AR) a apple2.lib $$i/*.o || exit 1; \
-       done
-       cp apple2/apple2-auxmem.emd a2.auxmem.emd
-       cp apple2/apple2-stdjoy.joy a2.stdjoy.joy
-       cp apple2/apple2-stdmou.mou a2.stdmou.mou
-       cp apple2/apple2-ssc.ser a2.ssc.ser
-       cp apple2/apple2-280-192-8.tgi a2.hi.tgi
-       cp apple2/apple2-40-48-16.tgi a2.lo.tgi
-       if [ -d apple2/extra ]; then \
-           for i in apple2/extra/*.o; do \
-               cp $$i apple2-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# enhanced Apple //e
-
-.PHONY:        apple2enhlib
-apple2enhlib:
-       for i in runtime apple2enh common conio dbg em joystick mouse serial tgi zlib; do \
-           $(MAKE) SYS=apple2enh -C $$i || exit 1; \
-           $(AR) a apple2enh.lib $$i/*.o || exit 1; \
-       done
-       cp apple2enh/apple2-auxmem.emd a2e.auxmem.emd
-       cp apple2enh/apple2-stdjoy.joy a2e.stdjoy.joy
-       cp apple2enh/apple2-stdmou.mou a2e.stdmou.mou
-       cp apple2enh/apple2-ssc.ser a2e.ssc.ser
-       cp apple2enh/apple2-280-192-8.tgi a2e.hi.tgi
-       cp apple2enh/apple2-40-48-16.tgi a2e.lo.tgi
-       if [ -d apple2enh/extra ]; then \
-           for i in apple2enh/extra/*.o; do \
-               cp $$i apple2enh-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Atari
-
-.PHONY:        atarilib
-atarilib:
-       for i in runtime atari common conio dbg em joystick tgi zlib; do \
-           $(MAKE) SYS=atari -C $$i || exit 1; \
-           $(AR) a atari.lib $$i/*.o || exit 1; \
-       done
-       cp atari/atari-130xe.emd atr130xe.emd
-       cp atari/atari-stdjoy.joy ataristd.joy
-       cp atari/atari-multijoy.joy atarimj8.joy
-       cp atari/atari-10.tgi atari10.tgi
-       cp atari/atari-10p2.tgi atr10p2.tgi
-       cp atari/atari-11.tgi atari11.tgi
-       cp atari/atari-14.tgi atari14.tgi
-       cp atari/atari-15.tgi atari15.tgi
-       cp atari/atari-15p2.tgi atr15p2.tgi
-       cp atari/atari-3.tgi atari3.tgi
-       cp atari/atari-4.tgi atari4.tgi
-       cp atari/atari-5.tgi atari5.tgi
-       cp atari/atari-6.tgi atari6.tgi
-       cp atari/atari-7.tgi atari7.tgi
-       cp atari/atari-8.tgi atari8.tgi
-       cp atari/atari-8p2.tgi atr8p2.tgi
-       cp atari/atari-9.tgi atari9.tgi
-       cp atari/atari-9p2.tgi atr9p2.tgi
-       if [ -d atari/extra ]; then \
-           for i in atari/extra/*.o; do \
-               cp $$i atari-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Oric Atmos
-
-.PHONY:        atmoslib
-atmoslib:
-       for i in runtime atmos common conio dbg em joystick tgi zlib; do \
-           $(MAKE) SYS=atmos -C $$i || exit 1; \
-           $(AR) a atmos.lib $$i/*.o || exit 1; \
-       done
-       cp atmos/*.joy .
-       cp atmos/*.ser .
-       cp atmos/*.tgi .
-       if [ -d atmos/extra ]; then \
-           for i in atmos/extra/*.o; do \
-               cp $$i atmos-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# C16, C116
-
-.PHONY:        c16lib
-c16lib:
-       for i in runtime c16 cbm common conio dbg em joystick mouse tgi zlib; do \
-           $(MAKE) SYS=c16 -C $$i || exit 1; \
-           $(AR) a c16.lib $$i/*.o || exit 1; \
-       done
-       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; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# C64
-
-.PHONY:        c64lib
-c64lib:
-       for i in runtime c64 cbm common conio dbg em joystick mouse serial tgi zlib; do \
-           $(MAKE) SYS=c64 -C $$i || exit 1; \
-           $(AR) a c64.lib $$i/*.o || exit 1; \
-       done
-       cp c64/*.emd .
-       cp c64/*.joy .
-       cp c64/c64-1351.mou .
-       cp c64/c64-joymouse.mou c64-joy.mou
-       cp c64/c64-potmouse.mou c64-pot.mou
-       cp c64/*.ser .
-       cp c64/c64-320-200-2.tgi c64-hi.tgi
-       if [ -d c64/extra ]; then \
-           for i in c64/extra/*.o; do \
-               cp $$i c64-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# C128
-
-.PHONY:        c128lib
-c128lib:
-       for i in runtime c128 cbm common conio dbg em joystick mouse serial tgi zlib; do \
-           $(MAKE) SYS=c128 -C $$i || exit 1; \
-           $(AR) a c128.lib $$i/*.o || exit 1; \
-       done
-       cp c128/*.emd .
-       cp c128/*.joy .
-       cp c128/c128-1351.mou .
-       cp c128/c128-joymouse.mou c128-joy.mou
-       cp c128/c128-potmouse.mou c128-pot.mou
-       cp c128/*.ser .
-       cp c128/c128-640-200-2.tgi c128-vdc.tgi
-       cp c128/c128-640-480-2.tgi c128-vdc2.tgi
-       if [ -d cbm/extra ]; then \
-           for i in cbm/extra/*.o; do \
-               cp $$i cbm-`basename $$i` || exit 1; \
-           done \
-       fi
-       if [ -d c128/extra ]; then \
-           for i in c128/extra/*.o; do \
-               cp $$i c128-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Commodore P500 / CBM 5x0
-
-.PHONY:        cbm510lib
-cbm510lib:
-       for i in runtime cbm510 cbm common conio dbg em joystick mouse serial tgi zlib; do \
-           $(MAKE) SYS=cbm510 -C $$i || exit 1; \
-           $(AR) a cbm510.lib $$i/*.o || exit 1; \
-       done
-       cp cbm510/*.emd .
-       cp cbm510/cbm510-stdjoy.joy cbm510-std.joy
-       cp cbm510/cbm510-stdser.ser cbm510-std.ser
-       if [ -d cbm510/extra ]; then \
-           for i in cbm510/extra/*.o; do \
-               cp $$i cbm510-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# PET-II series
-
-.PHONY:        cbm610lib
-cbm610lib:
-       for i in runtime cbm610 cbm common conio dbg em joystick serial tgi zlib; do \
-           $(MAKE) SYS=cbm610 -C $$i || exit 1; \
-           $(AR) a cbm610.lib $$i/*.o || exit 1; \
-       done
-       cp cbm610/*.emd .
-       cp cbm610/cbm610-stdser.ser cbm610-std.ser
-       if [ -d cbm610/extra ]; then \
-           for i in cbm610/extra/*.o; do \
-               cp $$i cbm610-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# GEOS on the Apple
-
-.PHONY:        geos-applelib
-geos-applelib:
-       for i in geos-apple geos-common; do \
-           $(MAKE) SYS=geos-apple -C $$i || exit 1; \
-           TARGET_OBJS="$$TARGET_OBJS`(cd $$i && printf '%s|' *.o)`"; \
-           $(AR) a geos-apple.lib $$i/*.o || exit 1; \
-       done; \
-       TARGET_OBJS="$${TARGET_OBJS%?}"; \
-       for i in runtime common conio em joystick tgi zlib; do \
-           $(MAKE) SYS=geos-apple -C $$i || exit 1; \
-           SHARED_OBJS=`ls $$i/*.o | grep -vwE "$$TARGET_OBJS"`; \
-           $(AR) a geos-apple.lib $$SHARED_OBJS || exit 1; \
-       done
-       if [ -d geos-apple/extra ]; then \
-           for i in geos-apple/extra/*.o; do \
-               cp $$i geos-apple-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# GEOS on the C64/128
-
-.PHONY:        geos-cbmlib
-geos-cbmlib:
-       for i in geos-cbm geos-common; do \
-           $(MAKE) SYS=geos-cbm -C $$i || exit 1; \
-           TARGET_OBJS="$$TARGET_OBJS`(cd $$i && printf '%s|' *.o)`"; \
-           $(AR) a geos-cbm.lib $$i/*.o || exit 1; \
-       done; \
-       TARGET_OBJS="$${TARGET_OBJS%?}"; \
-       for i in runtime common conio em joystick tgi zlib; do \
-           $(MAKE) SYS=geos-cbm -C $$i || exit 1; \
-           SHARED_OBJS=`ls $$i/*.o | grep -vwE "$$TARGET_OBJS"`; \
-           $(AR) a geos-cbm.lib $$SHARED_OBJS || exit 1; \
-       done
-       cp geos-cbm/*.emd .
-       cp geos-cbm/*.joy .
-       cp geos-cbm/*.tgi .
-       if [ -d geos-cbm/extra ]; then \
-           for i in geos-cbm/extra/*.o; do \
-               cp $$i geos-cbm-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Lynx
-
-.PHONY:        lynxlib
-lynxlib:
-       for i in runtime lynx common conio em joystick serial tgi zlib; do \
-           $(MAKE) SYS=lynx -C $$i || exit 1; \
-           $(AR) a lynx.lib $$i/*.o || exit 1; \
-       done
-       cp lynx/*.joy .
-       cp lynx/*.ser .
-       cp lynx/*.tgi .
-       if [ -d lynx/extra ]; then \
-           for i in lynx/extra/*.o; do \
-               cp $$i lynx-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# NES
-
-.PHONY: neslib
-neslib:
-       for i in runtime nes common conio em joystick tgi zlib; do \
-           $(MAKE) SYS=nes -C $$i || exit 1; \
-           $(AR) a nes.lib $$i/*.o || exit 1; \
-       done
-       cp nes/*.joy .
-       cp nes/*.tgi .
-       if [ -d nes/extra ]; then \
-           for i in nes/extra/*.o; do \
-               cp $$i nes-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# CBM PET machines
-
-.PHONY:        petlib
-petlib:
-       for i in runtime pet cbm common conio dbg em joystick tgi zlib; do \
-           $(MAKE) SYS=pet -C $$i || exit 1; \
-           $(AR) a pet.lib $$i/*.o || exit 1; \
-       done
-       cp pet/*.joy .
-       if [ -d pet/extra ]; then \
-           for i in pet/extra/*.o; do \
-               cp $$i pet-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Commodore Plus/4
-
-.PHONY:        plus4lib
-plus4lib:
-       for i in runtime plus4 cbm common conio dbg em joystick mouse serial tgi zlib; do \
-           $(MAKE) SYS=plus4 -C $$i || exit 1; \
-           $(AR) a plus4.lib $$i/*.o || exit 1; \
-       done
-       cp plus4/*.joy .
-       cp plus4/*.ser .
-       if [ -d plus4/extra ]; then \
-           for i in plus4/extra/*.o; do \
-               cp $$i plus4-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Supervision
-
-.PHONY: supervisionlib
-supervisionlib:
-       for i in runtime supervision common; do \
-           $(MAKE) SYS=supervision -C $$i || exit 1; \
-           $(AR) a supervision.lib $$i/*.o || exit 1; \
-       done
-       if [ -d supervision/extra ]; then \
-           for i in supervision/extra/*.o; do \
-               cp $$i supervision-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Vic20
-
-.PHONY:        vic20lib
-vic20lib:
-       for i in runtime vic20 cbm common conio dbg em joystick mouse tgi zlib; do \
-           $(MAKE) SYS=vic20 -C $$i || exit 1; \
-           $(AR) a vic20.lib $$i/*.o || exit 1; \
-       done
-       cp vic20/*.joy .
-       if [ -d vic20/extra ]; then \
-           for i in vic20/extra/*.o; do \
-               cp $$i vic20-`basename $$i` || exit 1; \
-           done \
-       fi
-
-#-----------------------------------------------------------------------------
-# Dummy targets
-
-.PHONY: mostly-clean
-mostly-clean:
-       @for i in $(SHAREDDIRS); do \
-          $(MAKE) --no-print-directory -C $$i clean || exit 1; \
-       done
-
-.PHONY: clean
-clean: mostly-clean
-       @for i in $(ALLTARGETS); do \
-          $(MAKE) -C $$i $@ || exit 1; \
-       done
-
-.PHONY: zap
-zap:
-       @for i in $(SHAREDDIRS) $(ALLTARGETS); do \
-          $(MAKE) -C $$i $@ || exit 1; \
-       done
-       @$(RM) *.lib *.o *.emd *.joy *.mou *.ser *.tgi
+CBMS = c128   \
+       c16    \
+       c64    \
+       cbm510 \
+       cbm610 \
+       pet    \
+       plus4  \
+       vic20
+
+GEOS = geos-apple \
+       geos-cbm
+
+TARGETS = $(CBMS)   \
+          $(GEOS)   \
+          apple2    \
+          apple2enh \
+          atari     \
+          atmos     \
+          lynx      \
+          nes       \
+          supervision
+
+DRVTYPES = emd \
+           joy \
+           mou \
+           ser \
+           tgi
+
+# Every target requires its individual vpath setting but the vpath directive
+# acts globally. Therefore each target is built in a separate make instance.
+
+ifeq ($(words $(MAKECMDGOALS)),1)
+  ifeq ($(MAKECMDGOALS),$(filter $(MAKECMDGOALS),$(TARGETS)))
+    TARGET = $(MAKECMDGOALS)
+  endif
+endif
+
+.SUFFIXES:
+
+.PHONY: all $(TARGETS) mostlyclean clean
+
+ifndef TARGET
+
+all: $(TARGETS)
+
+$(TARGETS):
+       @$(MAKE) --no-print-directory $@
+
+mostlyclean:
+       $(RM) -r ../wrk
+
+clean: mostlyclean
+       $(RM) -r ../lib $(addprefix ../,$(DRVTYPES))
+
+else # TARGET
+
+CFLAGS += -t $(TARGET) -Osir --create-dep $(@:.o=.d)
+
+EXTZP = cbm510 \
+        cbm610 \
+        lynx
+
+MKINC = $(GEOS) \
+        atari   \
+        nes
+
+GEOSDIRS = common      \
+           conio       \
+           disk        \
+           dlgbox      \
+           file        \
+           graph       \
+           memory      \
+           menuicon    \
+           mousesprite \
+           process     \
+           runtime     \
+           system
+
+ifeq ($(TARGET),apple2enh)
+  OBJPFX = a2
+  DRVPFX = a2e
+  DIRS = apple2
+else
+  DIRS = $(TARGET)
+endif
+
+ifeq ($(TARGET),$(filter $(TARGET),$(CBMS)))
+  DIRS += cbm
+endif
+
+ifeq ($(TARGET),$(filter $(TARGET),$(GEOS)))
+  DIRS += $(addprefix $(TARGET)/,  $(GEOSDIRS))
+  DIRS += $(addprefix geos-common/,$(GEOSDIRS))
+endif
+
+DIRS += common   \
+        conio    \
+        dbg      \
+        em       \
+        joystick \
+        mouse    \
+        runtime  \
+        serial   \
+        tgi      \
+        zlib
+
+vpath %.s $(DIRS)
+vpath %.c $(DIRS)
+
+OBJS := $(patsubst %.s,%.o,$(foreach dir,$(DIRS),$(wildcard $(dir)/*.s)))
+OBJS += $(patsubst %.c,%.o,$(foreach dir,$(DIRS),$(wildcard $(dir)/*.c)))
+
+OBJS := $(addprefix ../wrk/$(TARGET)/,$(sort $(notdir $(OBJS))))
+
+DEPS = $(OBJS:.o=.d)
+
+ZPOBJ = ../wrk/$(TARGET)/zeropage.o
+ifeq ($(TARGET),$(filter $(TARGET),$(EXTZP)))
+  ZPOBJ += ../wrk/$(TARGET)/extzp.o
+endif
+
+ifeq ($(TARGET),$(filter $(TARGET),$(MKINC)))
+  include $(TARGET)/Makefile.inc
+endif
+
+##########
+
+define DRVTYPE_template
+
+$1_SRCDIR = $$(firstword $$(DIRS))/$1
+$1_OBJDIR = ../wrk/$$(TARGET)/$1
+$1_DRVDIR = ../$1
+
+$1_OBJPAT = $$($1_OBJDIR)/$$(OBJPFX)%.o
+$1_DRVPAT = $$($1_DRVDIR)/$$(DRVPFX)%.$1
+$1_STCPAT = ../wrk/$$(TARGET)/$$(DRVPFX)%-$1.o
+
+$1_OBJS := $$(patsubst $$($1_SRCDIR)/%.s,$$($1_OBJDIR)/%.o,$$(wildcard $$($1_SRCDIR)/*.s))
+
+$1_DRVS = $$(patsubst $$($1_OBJPAT),$$($1_DRVPAT),$$($1_OBJS))
+
+$1_STCS = $$(patsubst $$($1_DRVPAT),$$($1_STCPAT),$$($1_DRVS))
+
+$$($1_OBJS): | $$($1_OBJDIR)
+
+$$($1_OBJDIR):
+       mkdir -p $$@
+
+$$($1_DRVPAT): $$($1_OBJPAT) $$(ZPOBJ) | $$($1_DRVDIR)
+       $$(LD) -o $$@ -t module $$^
+
+$$($1_DRVDIR):
+       mkdir $$@
+
+$(TARGET): $$($1_DRVS)
+
+$$($1_STCPAT): $$($1_DRVPAT)
+       $$(CO) -o $$(@:.o=.s) --code-label _$$(subst -,_,$$(subst .,_,$$(<F))) $$<
+       $$(CC) -c -t $$(TARGET) -o $$@ $$(@:.o=.s)
+
+OBJS += $$($1_STCS)
+
+DEPS += $$($1_OBJS:.o=.d)
+
+endef
+
+##########
+
+$(foreach drvtype,$(DRVTYPES),$(eval $(call DRVTYPE_template,$(drvtype))))
+
+ifdef CC65_HOME
+  AR = $(CC65_HOME)/bin/ar65
+  CC = $(CC65_HOME)/bin/cl65
+  CO = $(CC65_HOME)/bin/co65
+  LD = $(CC65_HOME)/bin/ld65
+else
+  AR = ../bin/ar65
+  CC = ../bin/cl65
+  CO = ../bin/co65
+  LD = ../bin/ld65
+endif
+
+../wrk/$(TARGET)/%.o: %.s | ../wrk/$(TARGET)
+       $(CC) -c $(CFLAGS) -o $@ $<
+
+../wrk/$(TARGET)/%.o: %.c | ../wrk/$(TARGET)
+       $(CC) -c $(CFLAGS) -o $@ $<
+
+../wrk/$(TARGET):
+       mkdir -p $@
+
+../lib/$(TARGET).lib: $(OBJS) | ../lib
+       $(AR) a $@ $?
+
+../lib:
+       mkdir $@
+
+$(TARGET): ../lib/$(TARGET).lib
+
+-include $(DEPS)
+
+endif # TARGET
index d6b416e0fae6341af9e39b7fec1266818d8ef939..bf6b0f53ca0f2902ecaf5789a8ff283ee426a16a 100644 (file)
@@ -7,8 +7,16 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _apple2_stdjoy
+        .ifdef __APPLE2ENH__
+        .import        _a2e_stdjoy_joy
+        .else
+        .import        _a2_stdjoy_joy
+        .endif
 
 .rodata
 
-_joy_static_stddrv := _apple2_stdjoy
+        .ifdef __APPLE2ENH__
+_joy_static_stddrv := _a2e_stdjoy_joy
+        .else
+_joy_static_stddrv := _a2_stdjoy_joy
+        .endif
index 86884d8b8779ba469a941c69098bc56fafad7658..4ca1e7f0455c33b8dbea722496412b10520488c1 100644 (file)
@@ -7,8 +7,16 @@
 ;
 
         .export        _mouse_static_stddrv
-        .import        _apple2_stdmou
+        .ifdef __APPLE2ENH__
+        .import        _a2e_stdmou_mou
+        .else
+        .import        _a2_stdmou_mou
+        .endif
 
 .rodata
 
-_mouse_static_stddrv := _apple2_stdmou
+        .ifdef __APPLE2ENH__
+_mouse_static_stddrv := _a2e_stdmou_mou
+        .else
+_mouse_static_stddrv := _a2_stdmou_mou
+        .endif
index ea887a59e3db61ba225f93c819007f1a0944a0c3..e9affe3b3f0f4ed293ed622bc8aa9d743207a510 100644 (file)
@@ -7,8 +7,16 @@
 ;
 
         .export        _tgi_static_stddrv
-        .import        _apple2_280_192_8
+        .ifdef __APPLE2ENH__
+        .import        _a2e_hi_tgi
+        .else
+        .import        _a2_hi_tgi
+        .endif
 
 .rodata
 
-_tgi_static_stddrv := _apple2_280_192_8
+        .ifdef __APPLE2ENH__
+_tgi_static_stddrv := _a2e_hi_tgi
+        .else
+_tgi_static_stddrv := _a2_hi_tgi
+        .endif
index f51950477f6e2262991b19cbc706a6d8e81ab770..2eca6d6b4bc1188aad9383412d0ee485e80d1162 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _atari_stdjoy
+        .import        _ataristd_joy
 
 .rodata
 
-_joy_static_stddrv := _atari_stdjoy
+_joy_static_stddrv := _ataristd_joy
index fb328f02f4d61dde64816ead8895114b5f3648cc..015eb631808927259ec6ef4358fad4b1a43e001d 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _tgi_static_stddrv
-        .import        _atari_8
+        .import        _atari8_tgi
 
 .rodata
 
-_tgi_static_stddrv := _atari_8
+_tgi_static_stddrv := _atari8_tgi
index fd0f7e1f696c2c1be595848160330c75f845201d..c94405c3c0c2d1c28a7c59ad2bb151ff3a82d0fc 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _atmos_pase
+        .import        _atmos_pase_joy
 
 .rodata
 
-_joy_static_stddrv := _atmos_pase
+_joy_static_stddrv := _atmos_pase_joy
index 892b14dd6eafaeb360039abdb8a140504610b768..89aef440f661bab4c43cd54045ecf406614b6bc4 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _tgi_static_stddrv
-        .import        _atmos_240_200_2
+        .import        _atmos_240_200_2_tgi
 
 .rodata
 
-_tgi_static_stddrv := _atmos_240_200_2
+_tgi_static_stddrv := _atmos_240_200_2_tgi
index 72a6117fe8530f2e74107b6883a31e6ff4cf4869..6a70a8fd2d4058398ba57bae1dea26f2e0c9e153 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _c128_stdjoy
+        .import        _c128_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _c128_stdjoy
+_joy_static_stddrv := _c128_stdjoy_joy
index f1c79e01ed2b354e2d69b7da54fac80b8c0db357..24f40a54f5a99835d4a8210372160c58b5089051 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _mouse_static_stddrv
-        .import        _c128_1351
+        .import        _c128_1351_mou
 
 .rodata
 
-_mouse_static_stddrv := _c128_1351
+_mouse_static_stddrv := _c128_1351_mou
index a26bc68dd4cb3650b8f30fa47a34cd4d38ade7b9..e6c2874d3e8be90d17a6960a78a25e4efea11014 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _tgi_static_stddrv
-        .import        _c128_640_200_2
+        .import        _c128_vdc_tgi
 
 .rodata
 
-_tgi_static_stddrv := _c128_640_200_2
+_tgi_static_stddrv := _c128_vdc_tgi
index d7b9fb89d201dac191a775a874fea9970a582eb9..68d67403d581b894ac73257b64815e25cefdf3d1 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _c16_stdjoy
+        .import        _c16_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _c16_stdjoy
+_joy_static_stddrv := _c16_stdjoy_joy
index c56de745ce0b464823b090ebb9d513eb6cf3a315..7de5c7a1f70daaacd6d37641061d0fdc77bfa99e 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _c64_stdjoy
+        .import        _c64_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _c64_stdjoy
+_joy_static_stddrv := _c64_stdjoy_joy
index eb1d3729e5a1b5f89d599f1cdd302bb0fe539994..61e3121affc5ab6450de2276980514eb23850b8e 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _mouse_static_stddrv
-        .import        _c64_1351
+        .import        _c64_1351_mou
 
 .rodata
 
-_mouse_static_stddrv := _c64_1351
+_mouse_static_stddrv := _c64_1351_mou
index cf52829cf354cd83b994cbe1967543721179e015..1ef9b326753ff0525ef2bae7e3c95c14853c6bee 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _tgi_static_stddrv
-        .import        _c64_320_200_2
+        .import        _c64_hi_tgi
 
 .rodata
 
-_tgi_static_stddrv := _c64_320_200_2
+_tgi_static_stddrv := _c64_hi_tgi
index 5001cb434d19f84af8c99aa19121c1e0f9c03d74..476ca65ad327eccc45085d7077fe89fa6220e43f 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _cbm510_stdjoy
+        .import        _cbm510_std_joy
 
 .rodata
 
-_joy_static_stddrv := _cbm510_stdjoy
+_joy_static_stddrv := _cbm510_std_joy
index c2ddb194bf3f235da67394817a1093ee65ca61ea..8090d73ddeb6465bce439b4f36d0f70c0be4e71c 100644 (file)
@@ -80,6 +80,12 @@ static char GetKeyUpdate (void);
 #    endif
 #  endif
 #endif
+#ifndef COLOR_BLACK
+#  define COLOR_BLACK   0
+#endif
+#ifndef COLOR_WHITE
+#  define COLOR_WHITE   1
+#endif
 
 /* Screen definitions */
 #if defined(__CBM610__)
@@ -98,10 +104,39 @@ static char GetKeyUpdate (void);
 #endif
 
 /* Replacement key definitions */
-#if defined(__APPLE2__)
+#if defined(__APPLE2__) || defined(__LYNX__) || defined(__SUPERVISION__)
 #  define CH_DEL        ('H' - 'A' + 1)         /* Ctrl+H */
 #endif
 
+/* Replacement char definitions */
+#ifndef CH_ULCORNER
+#  define CH_ULCORNER   '+'
+#endif
+#ifndef CH_URCORNER
+#  define CH_URCORNER   '+'
+#endif
+#ifndef CH_LLCORNER
+#  define CH_LLCORNER   '+'
+#endif
+#ifndef CH_LRCORNER
+#  define CH_LRCORNER   '+'
+#endif
+#ifndef CH_TTEE
+#  define CH_TTEE       '+'
+#endif
+#ifndef CH_LTEE
+#  define CH_LTEE       '+'
+#endif
+#ifndef CH_RTEE
+#  define CH_RTEE       '+'
+#endif
+#ifndef CH_BTEE
+#  define CH_BTEE       '+'
+#endif
+#ifndef CH_CROSS
+#  define CH_CROSS      '+'
+#endif
+
 /* Defines for opcodes */
 #define        OPC_BRK         0x00
 #define OPC_BPL                0x10
index 618ab2b0a1b0e2282b0e7929542d3a3567e593f5..19bf564ef1cb9fc885d33c1cd0c28aec567d4139 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _lynx_stdjoy
+        .import        _lynx_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _lynx_stdjoy
+_joy_static_stddrv := _lynx_stdjoy_joy
index 74b1604244fc33d2b2d479d7f02b4c2319611e06..a40af460eacf1cca9ed69303ead77466618a1598 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _tgi_static_stddrv
-        .import        _lynx_160_102_16
+        .import        _lynx_160_102_16_tgi
 
 .rodata
 
-_tgi_static_stddrv := _lynx_160_102_16
+_tgi_static_stddrv := _lynx_160_102_16_tgi
index 476e342073e14c64d017d28a2011086029ac1014..261dad8d1f7e6f57762f768ab4c3c5f6e07c8593 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _nes_stdjoy
+        .import        _nes_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _nes_stdjoy
+_joy_static_stddrv := _nes_stdjoy_joy
index 7982ec6f92866e7de4220c13f97774fe81c4389f..797d244946b890231bcb12254c24a3ff4fdbb6a7 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _tgi_static_stddrv
-        .import        _nes_64_56_2
+        .import        _nes_64_56_2_tgi
 
 .rodata
 
-_tgi_static_stddrv := _nes_64_56_2
+_tgi_static_stddrv := _nes_64_56_2_tgi
index f9b57adc5330999d320f7e0250b48a3e1c04bb1c..fb79aa4211e5ae6e8e54598cda8c7862a99e7619 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _pet_stdjoy
+        .import        _pet_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _pet_stdjoy
+_joy_static_stddrv := _pet_stdjoy_joy
index f2c31f9aa118ccd83e41e1f897d9f074cbff7b0f..d31f32354dbe777accf68554b11646768aed7677 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _plus4_stdjoy
+        .import        _plus4_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _plus4_stdjoy
+_joy_static_stddrv := _plus4_stdjoy_joy
index 31fb62f0a568065b48b3810ca72b3fc89ea4e641..12c2f62347839c5ceef76ecd87341152e37faf61 100644 (file)
@@ -7,8 +7,8 @@
 ;
 
         .export        _joy_static_stddrv
-        .import        _vic20_stdjoy
+        .import        _vic20_stdjoy_joy
 
 .rodata
 
-_joy_static_stddrv := _vic20_stdjoy
+_joy_static_stddrv := _vic20_stdjoy_joy