From: ol.sc
Date: Mon, 30 Jan 2012 21:19:09 +0000 (+0000)
Subject: The cc65 library build system is designed to call sub-makes in direct sub-directories...
X-Git-Tag: V2.13.3~36
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0c69d4866cfef07f7ac4a9f448cd09ec5b359924;p=cc65
The cc65 library build system is designed to call sub-makes in direct sub-directories of 'libsrc' only (meaning that sub-sub-directories are not supported). The GEOSLib source files however are organized in sub-directories of the 'libsrc/geos-cbm'. This mismatch was up to now handled by replicating the cc65 library build system functionality to allow for individal sub-makes in each 'libsrc/geos-cbm' sub-directory. This is unnecessarily hard understand and causes additional maintainance effort.
Now the whole GEOSLib is built in a single make instance running in 'libsrc/geos-cbm' - which is just what the cc65 library build system can handle. The 'libsrc/geos-cbm' sub-directories still contain Makefiles. However those files only define the set of object files to create from their sub-directory and get included into the 'libsrc/geos-cbm' Makefile.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5429 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
diff --git a/libsrc/Makefile b/libsrc/Makefile
index 9f70e7797..a3dbc684d 100644
--- a/libsrc/Makefile
+++ b/libsrc/Makefile
@@ -250,31 +250,13 @@ cbm610lib:
.PHONY: geos-cbmlib
geos-cbmlib:
- CC=../$(CC) \
- AS=../$(AS) \
- AR=../$(AR) \
- LD=../$(LD) \
- AFLAGS="-t geos-cbm --forget-inc-paths -I../../../asminc" \
- CFLAGS="-Osir -g -T -t geos-cbm --forget-inc-paths -I. -I../../../include" \
- $(MAKE) -C geos-cbm
- for i in em joystick tgi conio common runtime zlib; do \
- CC=$(CC) \
- AS=$(AS) \
- LD=$(LD) \
- AFLAGS="-t geos-cbm --forget-inc-paths -I../../asminc" \
- CFLAGS="-Osir -g -T -t geos-cbm --forget-inc-paths -I. -I../../include" \
+ for i in runtime geos-cbm common conio em joystick tgi zlib; do \
$(MAKE) SYS=geos-cbm -C $$i || exit 1; \
- for objfile in $$i/*.o; do \
- if [ -f geos-cbm/$$objfile ]; then \
- $(AR) a geos-cbm.lib geos-cbm/$$objfile || exit 1; \
- else \
- $(AR) a geos-cbm.lib $$objfile || exit 1; \
- fi; \
- done \
+ $(AR) a geos-cbm.lib $$i/*.o || exit 1; \
done
- cp geos-cbm/devel/*.emd .
- cp geos-cbm/devel/*.joy .
- cp geos-cbm/devel/*.tgi .
+ 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; \
diff --git a/libsrc/geos-cbm/Makefile b/libsrc/geos-cbm/Makefile
index d07619a2e..68e10aa48 100644
--- a/libsrc/geos-cbm/Makefile
+++ b/libsrc/geos-cbm/Makefile
@@ -1,27 +1,95 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-# Maciej 'YTM/Elysium' Witkowiak
-OBJ_DIRS=common conio devel disk dlgbox file graph menuicon memory mousesprite process runtime system
+.SUFFIXES: .o .s .c
-all:
- @for i in $(OBJ_DIRS); do $(MAKE) -C $$i; done
- @for i in $(OBJ_DIRS); do $(AR) a ../geos-cbm.lib $$i/*.o; done
+#--------------------------------------------------------------------------
+# Programs and flags
-rebuild: zap all clean
+SYS = geos-cbm
+AS = ../../src/ca65/ca65
+CC = ../../src/cc65/cc65
+LD = ../../src/ld65/ld65
+
+AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
+CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
+
+#--------------------------------------------------------------------------
+# Rules
+
+%.o: %.c
+ @$(CC) -o $(notdir $(*).s) $(CFLAGS) $<
+ @$(AS) -o $@ $(AFLAGS) $(*).s
+
+%.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
+
+DIRS = common \
+ conio \
+ devel \
+ disk \
+ dlgbox \
+ file \
+ graph \
+ menuicon \
+ memory \
+ mousesprite \
+ process \
+ runtime \
+ system
+
+#--------------------------------------------------------------------------
+# Drivers
+
+EMDS = geos-vdc.emd
+
+JOYS = geos-stdjoy.joy
+
+MOUS = #geos-stdmou.mou
+
+SERS =
+
+TGIS = geos-tgi.tgi
+
+#--------------------------------------------------------------------------
+# Directives
+
+include $(addsuffix /Makefile, $(DIRS))
+vpath %.c $(DIRS)
+vpath %.s $(DIRS)
+
+#--------------------------------------------------------------------------
+# Targets
+
+.PHONY: all clean zap
+
+all: $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+
+../runtime/zeropage.o:
+ $(MAKE) -C $(dir $@) $(notdir $@)
-.PHONY: clean
clean:
- @for i in $(OBJ_DIRS); do \
- cd $$i; \
- $(MAKE) clean; \
- cd ..; \
- done
+ @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
-.PHONY: zap
zap: clean
- @$(RM) ../geos-cbm.lib
-
+ @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
diff --git a/libsrc/geos-cbm/common/Makefile b/libsrc/geos-cbm/common/Makefile
index ff1ae7648..eeb88ff12 100644
--- a/libsrc/geos-cbm/common/Makefile
+++ b/libsrc/geos-cbm/common/Makefile
@@ -1,19 +1,17 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-%.o: %.c
- @$(CC) $(CFLAGS) $<
- @$(AS) -g -o $@ $(AFLAGS) $(*).s
+#--------------------------------------------------------------------------
+# Object files
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
+C_OBJS += _afailed.o \
+ abort.o \
+ perror.o \
+ sleep.o
-C_OBJS = _afailed.o abort.o perror.o sleep.o
-S_OBJS = copydata.o memcpy.o memmove.o memset.o zerobss.o
-
-all: $(C_OBJS) $(S_OBJS)
-
-clean:
- @$(RM) core *.~ $(S_OBJS) $(C_OBJS:.o=.s) $(C_OBJS)
+S_OBJS += copydata.o \
+ memcpy.o \
+ memmove.o \
+ memset.o \
+ zerobss.o
diff --git a/libsrc/geos-cbm/conio/Makefile b/libsrc/geos-cbm/conio/Makefile
index 67f9e7528..ce71b0bef 100644
--- a/libsrc/geos-cbm/conio/Makefile
+++ b/libsrc/geos-cbm/conio/Makefile
@@ -1,17 +1,21 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
+#--------------------------------------------------------------------------
+# Object files
-
-S_OBJS = cclear.o chline.o cvline.o cgetc.o clrscr.o color.o\
- cputc.o cpputs.o cursor.o gotoxy.o kbhit.o revers.o\
- where.o _scrsize.o
-
-all: $(S_OBJS)
-
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += _scrsize.o \
+ cclear.o \
+ chline.o \
+ cvline.o \
+ cgetc.o \
+ clrscr.o \
+ color.o \
+ cputc.o \
+ cpputs.o \
+ cursor.o \
+ gotoxy.o \
+ kbhit.o \
+ revers.o \
+ where.o
diff --git a/libsrc/geos-cbm/devel/Makefile b/libsrc/geos-cbm/devel/Makefile
index b2d9bb197..256553b5a 100644
--- a/libsrc/geos-cbm/devel/Makefile
+++ b/libsrc/geos-cbm/devel/Makefile
@@ -1,57 +1,19 @@
-# -*- make -*-
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-%.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 $^
-
-S_OBJS = crt0.o \
- extzp.o \
- fio_module.o \
- joy_stddrv.o \
- mainargs.o \
- mcbdefault.o \
- mouse_stddrv.o \
- oserror.o \
- oserrlist.o \
- randomize.o \
- tgi_colors.o \
- tgi_stddrv.o
-
#--------------------------------------------------------------------------
-# Drivers
-
-EMDS = geos-vdc.emd
-
-JOYS = geos-stdjoy.joy
-
-MOUS = #geos-stdmou.mou
-
-SERS =
-
-TGIS = geos-tgi.tgi
-
-all: $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
-
-../../runtime/zeropage.o:
- $(MAKE) -C $(dir $@) $(notdir $@)
-
-clean:
- @$(RM) *.~ core $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+# Object files
+
+S_OBJS += crt0.o \
+ extzp.o \
+ fio_module.o \
+ joy_stddrv.o \
+ mainargs.o \
+ mcbdefault.o \
+ mouse_stddrv.o \
+ oserror.o \
+ oserrlist.o \
+ randomize.o \
+ tgi_colors.o \
+ tgi_stddrv.o
diff --git a/libsrc/geos-cbm/disk/Makefile b/libsrc/geos-cbm/disk/Makefile
index dd08aeb6f..f1d3f329c 100644
--- a/libsrc/geos-cbm/disk/Makefile
+++ b/libsrc/geos-cbm/disk/Makefile
@@ -1,21 +1,40 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
+#--------------------------------------------------------------------------
+# Object files
-
-S_OBJS = blkalloc.o calcblksfree.o changediskdevice.o chkdkgeos.o enterturbo.o exitturbo.o\
- findbambit.o freeblock.o getblock.o getdirhead.o getptrcurdknm.o newdisk.o\
- nxtblkalloc.o opendisk.o purgeturbo.o putblock.o putdirhead.o readblock.o\
- readbuff.o setnextfree.o setgeosdisk.o writeblock.o writebuff.o verwriteblock.o\
- gettrse.o setoserror.o\
- dio_openclose.o dio_cts.o dio_stc.o dio_read.o dio_write.o dio_writev.o\
- dio_params.o
-
-all: $(S_OBJS)
-
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += blkalloc.o \
+ calcblksfree.o \
+ changediskdevice.o \
+ chkdkgeos.o \
+ dio_openclose.o \
+ dio_cts.o \
+ dio_params.o \
+ dio_stc.o \
+ dio_read.o \
+ dio_write.o \
+ dio_writev.o \
+ enterturbo.o \
+ exitturbo.o \
+ findbambit.o \
+ freeblock.o \
+ getblock.o \
+ getdirhead.o \
+ getptrcurdknm.o \
+ gettrse.o \
+ newdisk.o \
+ nxtblkalloc.o \
+ opendisk.o \
+ purgeturbo.o \
+ putblock.o \
+ putdirhead.o \
+ readblock.o \
+ readbuff.o \
+ setnextfree.o \
+ setgeosdisk.o \
+ setoserror.o \
+ writeblock.o \
+ writebuff.o \
+ verwriteblock.o
diff --git a/libsrc/geos-cbm/dlgbox/Makefile b/libsrc/geos-cbm/dlgbox/Makefile
index 15cd497ea..00663c1ca 100644
--- a/libsrc/geos-cbm/dlgbox/Makefile
+++ b/libsrc/geos-cbm/dlgbox/Makefile
@@ -1,22 +1,17 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-#
-
-%.o: %.c
- @$(CC) $(CFLAGS) $<
- @$(AS) -g -o $@ $(AFLAGS) $(*).s
-
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-C_OBJS = messagebox.o
-S_OBJS = dodlgbox.o rstrfrmdialogue.o\
- dbget2lines.o dlgboxyesno.o dlgboxokcancel.o dlgboxok.o dlgboxgetstring.o\
- dlgboxfileselect.o
+#--------------------------------------------------------------------------
+# Object files
-all: $(C_OBJS) $(S_OBJS)
+C_OBJS += messagebox.o
-clean:
- @$(RM) core *.~ $(S_OBJS) $(C_OBJS:.o=.s) $(C_OBJS)
+S_OBJS += dodlgbox.o \
+ rstrfrmdialogue.o \
+ dbget2lines.o \
+ dlgboxyesno.o \
+ dlgboxokcancel.o \
+ dlgboxok.o \
+ dlgboxgetstring.o \
+ dlgboxfileselect.o
diff --git a/libsrc/geos-cbm/file/Makefile b/libsrc/geos-cbm/file/Makefile
index 3bc506698..a62f19878 100644
--- a/libsrc/geos-cbm/file/Makefile
+++ b/libsrc/geos-cbm/file/Makefile
@@ -1,21 +1,33 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
+#--------------------------------------------------------------------------
+# Object files
-
-S_OBJS = get1stdirentry.o getnxtdirentry.o\
- openrecordfile.o closerecordfile.o nextrecord.o previousrecord.o pointrecord.o\
- deleterecord.o insertrecord.o appendrecord.o readrecord.o writerecord.o\
- updaterecordfile.o\
- findfile.o followchain.o getfhdrinfo.o readfile.o savefile.o freefile.o\
- deletefile.o renamefile.o findftypes.o readbyte.o getfile.o\
- sysremove.o sysrename.o
-
-all: $(S_OBJS)
-
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += get1stdirentry.o \
+ getnxtdirentry.o \
+ openrecordfile.o \
+ closerecordfile.o \
+ nextrecord.o \
+ previousrecord.o \
+ pointrecord.o \
+ deleterecord.o \
+ insertrecord.o \
+ appendrecord.o \
+ readrecord.o \
+ writerecord.o \
+ updaterecordfile.o \
+ findfile.o \
+ followchain.o \
+ getfhdrinfo.o \
+ readfile.o \
+ savefile.o \
+ freefile.o \
+ deletefile.o \
+ renamefile.o \
+ findftypes.o \
+ readbyte.o \
+ getfile.o \
+ sysremove.o \
+ sysrename.o
diff --git a/libsrc/geos-cbm/graph/Makefile b/libsrc/geos-cbm/graph/Makefile
index f69213c41..9973a06fe 100644
--- a/libsrc/geos-cbm/graph/Makefile
+++ b/libsrc/geos-cbm/graph/Makefile
@@ -1,21 +1,35 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-#
-
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-
-
-S_OBJS = drawline.o drawpoint.o framerectangle.o hlineregs.o horizontalline.o\
- imprintrectangle.o invertline.o invertrectangle.o pointregs.o recoverline.o\
- recoverrectangle.o rectangle.o initdrawwindow.o setpattern.o testpoint.o verticalline.o\
- put_char.o putdecimal.o putstring.o usesystemfont.o\
- getcharwidth.o loadcharset.o bitmapup.o bitmapregs.o bitmapclip.o bitotherclip.o\
- graphicsstring.o getintcharint.o
-all: $(S_OBJS)
+#--------------------------------------------------------------------------
+# Object files
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += drawline.o \
+ drawpoint.o \
+ framerectangle.o \
+ hlineregs.o \
+ horizontalline.o \
+ imprintrectangle.o \
+ invertline.o \
+ invertrectangle.o \
+ pointregs.o \
+ recoverline.o \
+ recoverrectangle.o \
+ rectangle.o \
+ initdrawwindow.o \
+ setpattern.o \
+ testpoint.o \
+ verticalline.o \
+ put_char.o \
+ putdecimal.o \
+ putstring.o \
+ usesystemfont.o \
+ getcharwidth.o \
+ loadcharset.o \
+ bitmapup.o \
+ bitmapregs.o \
+ bitmapclip.o \
+ bitotherclip.o \
+ graphicsstring.o \
+ getintcharint.o
diff --git a/libsrc/geos-cbm/memory/Makefile b/libsrc/geos-cbm/memory/Makefile
index e2af2fab3..ea55bc2ad 100644
--- a/libsrc/geos-cbm/memory/Makefile
+++ b/libsrc/geos-cbm/memory/Makefile
@@ -1,18 +1,23 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-#
-
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-
-
-S_OBJS = crc.o doublepop.o reuregs.o clearram.o fillram.o initram.o movedata.o\
- stashram.o fetchram.o swapram.o verifyram.o\
- doublespop.o copystring.o cmpstring.o copyfstring.o cmpfstring.o
-all: $(S_OBJS)
+#--------------------------------------------------------------------------
+# Object files
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += crc.o \
+ doublepop.o \
+ reuregs.o \
+ clearram.o \
+ fillram.o \
+ initram.o \
+ movedata.o \
+ stashram.o \
+ fetchram.o \
+ swapram.o \
+ verifyram.o \
+ doublespop.o \
+ copystring.o \
+ cmpstring.o \
+ copyfstring.o \
+ cmpfstring.o
diff --git a/libsrc/geos-cbm/menuicon/Makefile b/libsrc/geos-cbm/menuicon/Makefile
index cb5d6f475..9460a7ce7 100644
--- a/libsrc/geos-cbm/menuicon/Makefile
+++ b/libsrc/geos-cbm/menuicon/Makefile
@@ -1,17 +1,14 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-#
-
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-
-
-S_OBJS = domenu.o dopreviousmenu.o redomenu.o recovermenu.o recoverallmenus.o\
- gotofirstmenu.o doicons.o
-all: $(S_OBJS)
+#--------------------------------------------------------------------------
+# Object files
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += domenu.o \
+ dopreviousmenu.o \
+ redomenu.o \
+ recovermenu.o \
+ recoverallmenus.o \
+ gotofirstmenu.o \
+ doicons.o
diff --git a/libsrc/geos-cbm/mousesprite/Makefile b/libsrc/geos-cbm/mousesprite/Makefile
index 23cfbb3bf..f76ea33be 100644
--- a/libsrc/geos-cbm/mousesprite/Makefile
+++ b/libsrc/geos-cbm/mousesprite/Makefile
@@ -1,20 +1,21 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-#
-
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-
-
-S_OBJS = startmousemode.o clearmousemode.o mouseup.o mouseoff.o\
- drawsprite.o possprite.o enablsprite.o disablsprite.o\
- ismseinregion.o inittextprompt.o promptoff.o prompton.o\
- getnextchar.o\
- mouse.o
-all: $(S_OBJS)
+#--------------------------------------------------------------------------
+# Object files
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += startmousemode.o \
+ clearmousemode.o \
+ mouseup.o \
+ mouseoff.o \
+ drawsprite.o \
+ possprite.o \
+ enablsprite.o \
+ disablsprite.o \
+ ismseinregion.o \
+ inittextprompt.o \
+ promptoff.o \
+ prompton.o \
+ getnextchar.o \
+ mouse.o
diff --git a/libsrc/geos-cbm/process/Makefile b/libsrc/geos-cbm/process/Makefile
index e5e7a5b80..e214f01c8 100644
--- a/libsrc/geos-cbm/process/Makefile
+++ b/libsrc/geos-cbm/process/Makefile
@@ -1,16 +1,11 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-#
-
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-
-
-S_OBJS = processinitrestartenable.o processblock.o processfreeze.o processsleep.o
-all: $(S_OBJS)
+#--------------------------------------------------------------------------
+# Object files
-clean:
- @$(RM) *.~ $(S_OBJS) core
+S_OBJS += processinitrestartenable.o \
+ processblock.o \
+ processfreeze.o \
+ processsleep.o
diff --git a/libsrc/geos-cbm/runtime/Makefile b/libsrc/geos-cbm/runtime/Makefile
index 143e044a0..bcbcbb01c 100644
--- a/libsrc/geos-cbm/runtime/Makefile
+++ b/libsrc/geos-cbm/runtime/Makefile
@@ -1,19 +1,8 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-%.o: %.c
- @$(CC) $(CFLAGS) $<
- @$(AS) -g -o $@ $(AFLAGS) $(*).s
+#--------------------------------------------------------------------------
+# Object files
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-
-C_OBJS =
-S_OBJS = call.o
-
-all: $(C_OBJS) $(S_OBJS)
-
-clean:
- @$(RM) core *.~ $(S_OBJS) $(C_OBJS:.o=.s) $(C_OBJS)
+S_OBJS += call.o
diff --git a/libsrc/geos-cbm/system/Makefile b/libsrc/geos-cbm/system/Makefile
index 789b70ac6..e479f7788 100644
--- a/libsrc/geos-cbm/system/Makefile
+++ b/libsrc/geos-cbm/system/Makefile
@@ -1,33 +1,22 @@
#
-# Makefile for GEOS lib
-# for cc65
+# makefile for CC65 runtime library
#
-#
-
-%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
-
-%.o: %.c
- @$(CC) $(CFLAGS) $<
- @$(AS) -g -o $@ $(AFLAGS) $(*).s
-
-S_OBJS = ctype.o \
- callroutine.o \
- enterdesktop.o \
- firstinit.o \
- get_ostype.o \
- getrandom.o \
- getserialnumber.o \
- initdoneio.o \
- mainloop.o \
- panic.o \
- tobasic.o \
- setdevice.o \
- sysuname.o
-C_OBJS = systime.o
+#--------------------------------------------------------------------------
+# Object files
-all: $(C_OBJS) $(S_OBJS)
+C_OBJS += systime.o
-clean:
- @$(RM) *.~ $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) core
+S_OBJS += ctype.o \
+ callroutine.o \
+ enterdesktop.o \
+ firstinit.o \
+ get_ostype.o \
+ getrandom.o \
+ getserialnumber.o \
+ initdoneio.o \
+ mainloop.o \
+ panic.o \
+ tobasic.o \
+ setdevice.o \
+ sysuname.o