From 6e529a20a65c60c8979a85d4717d285f4fb298a9 Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 5 Feb 2012 23:42:02 +0000 Subject: [PATCH] Allow modules in geos-common to override modules with the same name in the standard directories. git-svn-id: svn://svn.cc65.org/cc65/trunk@5475 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index 79f720eec..68ffe964f 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -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 -- 2.39.5