]> git.sur5r.net Git - cc65/commitdiff
The cc65 library build system is designed to call sub-makes in direct sub-directories...
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 30 Jan 2012 21:19:09 +0000 (21:19 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 30 Jan 2012 21:19:09 +0000 (21:19 +0000)
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

15 files changed:
libsrc/Makefile
libsrc/geos-cbm/Makefile
libsrc/geos-cbm/common/Makefile
libsrc/geos-cbm/conio/Makefile
libsrc/geos-cbm/devel/Makefile
libsrc/geos-cbm/disk/Makefile
libsrc/geos-cbm/dlgbox/Makefile
libsrc/geos-cbm/file/Makefile
libsrc/geos-cbm/graph/Makefile
libsrc/geos-cbm/memory/Makefile
libsrc/geos-cbm/menuicon/Makefile
libsrc/geos-cbm/mousesprite/Makefile
libsrc/geos-cbm/process/Makefile
libsrc/geos-cbm/runtime/Makefile
libsrc/geos-cbm/system/Makefile

index 9f70e77979a6544fec5fd9d844b9bf661799475b..a3dbc684daecb53f57d5134001b685e9cc70bd86 100644 (file)
@@ -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; \
index d07619a2e6519cc4f4de353f211ccbb27f0fb96a..68e10aa480bb16307ee87dcb1b6318286af11739 100644 (file)
@@ -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)
index ff1ae7648e7b67587ac99fccea1aa309721ca8aa..eeb88ff126b9d6a2422bc1d68e3ca7aa7530263f 100644 (file)
@@ -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
index 67f9e7528cf6a860ec7772fc12aaa0f4db8ccb5d..ce71b0bef1bde93cc1dee4de52cea12fcaae508e 100644 (file)
@@ -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
index b2d9bb19799b37392c3e2c5a3f9c38cf728bf926..256553b5ab141d81d867c822ba28b765aab5f95c 100644 (file)
@@ -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
index dd08aeb6f1d9100550ac57e2777abbcd4f79d033..f1d3f329c7f865c8a75980e36992ad98c74bf817 100644 (file)
@@ -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
index 15cd497eaa39037e8a97e74777bd3e0ee401510a..00663c1ca22779e4f61c5ad13114bb647bb59adc 100644 (file)
@@ -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
index 3bc506698582fb2cebcb7656f4eae94bf3bf9a4c..a62f19878c818215ee6487b7c9a39ddc303dd577 100644 (file)
@@ -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
index f69213c41fb2b4a4d0bd8edbbb31e5dcd788ae9a..9973a06fe092d12338b68f887afb320cf5b0b0e3 100644 (file)
@@ -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
index e2af2fab32b78b96611dae669ee33ae9b295585c..ea55bc2adfaa61e75e1faa99848f1dee4ebb2765 100644 (file)
@@ -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
index cb5d6f475d022a6c27196f9752f10fa8e192ae56..9460a7ce77725ab3bcdd5a70344b7645182912c1 100644 (file)
@@ -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
index 23cfbb3bf8d59227ae66e79558548b6d27592ba5..f76ea33be9ea43ec128c627d82097c9fa58bd899 100644 (file)
@@ -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
index e5e7a5b80e381deb9e0bd6e67d57c42f233b930f..e214f01c8eeb46b7bc0f0c62211f8d36137d7b4d 100644 (file)
@@ -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
index 143e044a01c71bfe3eeede67bb767bddcc987383..bcbcbb01c7951f4eb4ae82dbcb5780eb6bb5aa5b 100644 (file)
@@ -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
index 789b70ac6f5f4c60b141ecf2ba7e1c842eec50ef..e479f77887ab6872461aebf7c79c4c0d092125f4 100644 (file)
@@ -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