From: Martin Mares Date: Fri, 21 Nov 2008 19:24:53 +0000 (+0100) Subject: Shared library building features from Ego. X-Git-Tag: holmes-import~145 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b65d522203d1d8aae29ca15be8867d2a5def3055;p=libucw.git Shared library building features from Ego. (1) SO_RUNDIR can be used to choose the place in the run tree where the .so should be installed. (2) lib-flags is used, so shared libs can directly depend on other shared libs if needed. (This is useful for building shared libs that do not use pkgconfig themselves -- e.g., Perl/Python modules.) --- diff --git a/build/Makebottom b/build/Makebottom index 8565d02c..76a3331b 100644 --- a/build/Makebottom +++ b/build/Makebottom @@ -63,8 +63,8 @@ endif %.so: $(M)LD $@ - $(Q)$(CC) $(LSHARED) $(LDFLAGS) -o $@ $^ - $(Q)$(call symlink-alias,$@,run/lib,$(*F)$(SONAME_INFIX).so$(SONAME_SUFFIX)) + $(Q)$(CC) $(LSHARED) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(BUILDSYS)/lib-flags $^) $(LIBS) + $(Q)$(call symlink-alias,$@,run/$(SO_RUNDIR),$(*F)$(SONAME_INFIX).so$(SONAME_SUFFIX)) $(o)/%.pc: $(s)/%.pc $(o)/%.$(LS) $(M)PC $< diff --git a/build/Maketop b/build/Maketop index cdaae4f6..5027cfce 100644 --- a/build/Maketop +++ b/build/Maketop @@ -39,6 +39,7 @@ SOEXT=bundle else SOEXT=so endif +SO_RUNDIR=lib # Whenever "make -s" (silent) is run, turn on verbose mode (paradoxical, but gives the right result) ifneq ($(findstring s,$(MAKEFLAGS)),)