From b65d522203d1d8aae29ca15be8867d2a5def3055 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 21 Nov 2008 20:24:53 +0100 Subject: [PATCH] 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.) --- build/Makebottom | 4 ++-- build/Maketop | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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)),) -- 2.39.2