]> git.sur5r.net Git - cc65/commitdiff
Allow modules in geos-common to override modules with the same name in the
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 5 Feb 2012 23:42:02 +0000 (23:42 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 5 Feb 2012 23:42:02 +0000 (23:42 +0000)
standard directories.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5475 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/Makefile

index 79f720eecd6e936d96274041c453b5ae41cfab98..68ffe964f888b15f51c904d1e47f38a02151bb6c 100644 (file)
@@ -251,16 +251,26 @@ cbm610lib:
 
 .PHONY:        geos-cbmlib
 geos-cbmlib:
-       for i in runtime geos-cbm geos-common common conio em joystick tgi zlib; do \
+       for i in geos-cbm geos-common; do \
            $(MAKE) SYS=geos-cbm -C $$i || exit 1; \
            $(AR) a geos-cbm.lib $$i/*.o || exit 1; \
        done
+       for i in runtime common conio em joystick tgi zlib; do \
+           $(MAKE) SYS=geos-cbm -C $$i || exit 1; \
+           for objfile in $$i/*.o; do \
+               if [ -f geos-common/`basename $$objfile` ]; then \
+                   $(AR) a geos-cbm.lib geos-common/`basename $$objfile`; \
+               else \
+                   $(AR) a geos-cbm-lib $$objfile; \
+               fi; \
+           done \
+       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; \
+               cp $$i geos-cbm-`basename $$i` || exit 1; \
            done \
        fi