From 75dc65c217f2d67224433ab51b75536006760f75 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Wed, 8 Feb 2012 14:30:07 +0000 Subject: [PATCH] Prepared infrastructure for a shared loadable generic mouse driver based the GEOS API. git-svn-id: svn://svn.cc65.org/cc65/trunk@5496 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos-cbm/Makefile | 2 +- libsrc/geos-cbm/drivers/Makefile | 5 +-- libsrc/geos-common/Makefile | 36 +++++++++++++++++-- libsrc/geos-common/drivers/Makefile | 10 ++++++ .../drivers/fio_module.s | 0 .../mouse.s => drivers/geos-stdmou.s} | 0 .../drivers/mcbdefault.s | 0 .../drivers/mouse_stddrv.s | 0 libsrc/geos-common/mousesprite/Makefile | 3 +- 9 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 libsrc/geos-common/drivers/Makefile rename libsrc/{geos-cbm => geos-common}/drivers/fio_module.s (100%) rename libsrc/geos-common/{mousesprite/mouse.s => drivers/geos-stdmou.s} (100%) rename libsrc/{geos-cbm => geos-common}/drivers/mcbdefault.s (100%) rename libsrc/{geos-cbm => geos-common}/drivers/mouse_stddrv.s (100%) diff --git a/libsrc/geos-cbm/Makefile b/libsrc/geos-cbm/Makefile index d5a649d8c..c2a2720b5 100644 --- a/libsrc/geos-cbm/Makefile +++ b/libsrc/geos-cbm/Makefile @@ -57,7 +57,7 @@ EMDS = geos-vdc.emd JOYS = geos-stdjoy.joy -MOUS = #geos-stdmou.mou +MOUS = SERS = diff --git a/libsrc/geos-cbm/drivers/Makefile b/libsrc/geos-cbm/drivers/Makefile index 1e3d5d446..96af4145b 100644 --- a/libsrc/geos-cbm/drivers/Makefile +++ b/libsrc/geos-cbm/drivers/Makefile @@ -5,9 +5,6 @@ #-------------------------------------------------------------------------- # Object files -S_OBJS += fio_module.o \ - joy_stddrv.o \ - mcbdefault.o \ - mouse_stddrv.o \ +S_OBJS += joy_stddrv.o \ tgi_colors.o \ tgi_stddrv.o diff --git a/libsrc/geos-common/Makefile b/libsrc/geos-common/Makefile index 99e8fa94c..70dd09a23 100644 --- a/libsrc/geos-common/Makefile +++ b/libsrc/geos-common/Makefile @@ -26,6 +26,21 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +%.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 $^ + +%.tgi: %.o ../runtime/zeropage.o + @$(LD) -o $@ -t module $^ + #-------------------------------------------------------------------------- # Directories @@ -42,6 +57,19 @@ DIRS = common \ runtime \ system +#-------------------------------------------------------------------------- +# Drivers + +EMDS = + +JOYS = + +MOUS = #geos-stdmou.mou + +SERS = + +TGIS = + #-------------------------------------------------------------------------- # Directives @@ -54,9 +82,13 @@ vpath %.s $(DIRS) .PHONY: all clean zap -all: $(C_OBJS) $(S_OBJS) +all: $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS) +../runtime/zeropage.o: + $(MAKE) -C $(dir $@) $(notdir $@) + clean: - @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) + @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o) zap: clean + @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS) diff --git a/libsrc/geos-common/drivers/Makefile b/libsrc/geos-common/drivers/Makefile new file mode 100644 index 000000000..a706e22ba --- /dev/null +++ b/libsrc/geos-common/drivers/Makefile @@ -0,0 +1,10 @@ +# +# makefile for CC65 runtime library +# + +#-------------------------------------------------------------------------- +# Object files + +S_OBJS += fio_module.o \ + mcbdefault.o \ + mouse_stddrv.o diff --git a/libsrc/geos-cbm/drivers/fio_module.s b/libsrc/geos-common/drivers/fio_module.s similarity index 100% rename from libsrc/geos-cbm/drivers/fio_module.s rename to libsrc/geos-common/drivers/fio_module.s diff --git a/libsrc/geos-common/mousesprite/mouse.s b/libsrc/geos-common/drivers/geos-stdmou.s similarity index 100% rename from libsrc/geos-common/mousesprite/mouse.s rename to libsrc/geos-common/drivers/geos-stdmou.s diff --git a/libsrc/geos-cbm/drivers/mcbdefault.s b/libsrc/geos-common/drivers/mcbdefault.s similarity index 100% rename from libsrc/geos-cbm/drivers/mcbdefault.s rename to libsrc/geos-common/drivers/mcbdefault.s diff --git a/libsrc/geos-cbm/drivers/mouse_stddrv.s b/libsrc/geos-common/drivers/mouse_stddrv.s similarity index 100% rename from libsrc/geos-cbm/drivers/mouse_stddrv.s rename to libsrc/geos-common/drivers/mouse_stddrv.s diff --git a/libsrc/geos-common/mousesprite/Makefile b/libsrc/geos-common/mousesprite/Makefile index f76ea33be..054546e64 100644 --- a/libsrc/geos-common/mousesprite/Makefile +++ b/libsrc/geos-common/mousesprite/Makefile @@ -17,5 +17,4 @@ S_OBJS += startmousemode.o \ inittextprompt.o \ promptoff.o \ prompton.o \ - getnextchar.o \ - mouse.o + getnextchar.o -- 2.39.5