From 1812a9f93a917f637d73663f388c30ebcadcb3f1 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Tue, 21 Apr 2009 20:56:32 +0000 Subject: Update the shared object building in the shared makesystem svn path=/trunk/tools/buildsystem/; revision=7203 --- makefiles/Makefile.top | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'makefiles/Makefile.top') diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top index e0f2e01..cbd8af2 100644 --- a/makefiles/Makefile.top +++ b/makefiles/Makefile.top @@ -175,7 +175,13 @@ TEST_BINARIES := $(foreach ITEM,$(TEST_ITEMS),$(bin_for_test)) # Determine the output filename ifeq ($(findstring lib,$(COMPONENT_TYPE)),lib) - OUTPUT := $(BUILDDIR)/lib$(COMPONENT)$(major-version)$(LIBEXT) + ifeq ($(findstring lib-shared,$(COMPONENT_TYPE)),lib-shared) + SHAREDLIBNAME := lib$(COMPONENT)$(LIBEXT) + SONAME := $(SHAREDLIBNAME).$(major-version) + OUTPUT := $(BUILDDIR)/$(SHAREDLIBNAME).$(COMPONENT_VERSION) + else + OUTPUT := $(BUILDDIR)/lib$(COMPONENT)$(major-version)$(LIBEXT) + endif else OUTPUT := $(BUILDDIR)/$(COMPONENT)$(EXEEXT) endif @@ -191,7 +197,8 @@ ifeq ($(COMPONENT_TYPE),lib-shared) POST_TARGETS := __postshared $(POST_TARGETS) __postshared: - $(Q)$(LN) $(LNFLAGS) -fs $(notdir $(OUTPUT)) $(OUTPUT).$(major-version) + $(Q)$(LN) $(LNFLAGS) -fs $(notdir $(OUTPUT)) $(BUILDDIR)/$(SONAME) + $(Q)$(LN) $(LNFLAGS) -fs $(notdir $(OUTPUT)) $(BUILDDIR)/$(SHAREDLIBNAME) endif # Default target @@ -262,16 +269,15 @@ define install_pkgconfig $(BUILDDIR)/$(1:.in=), \ $(Q)$(SED) -i -e 's#REQUIRED##' $(BUILDDIR)/$(1:.in=)) $(INSTALL) $(INSTALLFLAGS) -m 644 $(BUILDDIR)/$(1:.in=) \ - $2/$(1:.pc.in=)-$(major-version).pc + $2/$(1:.in=) endef # TODO: Is this scheme portable? define install_shared_lib - $(INSTALL) $(INSTALLFLAGS) -m 755 $1 $2/$(notdir $1).$(COMPONENT_VERSION) - $(LN) $(LNFLAGS) -fs $(notdir $1).$(COMPONENT_VERSION) \ - $2/$(notdir $1).$(major-version) - $(LN) $(LNFLAGS) -fs $(notdir $1).$(COMPONENT_VERSION) $2/$(notdir $1) + $(INSTALL) $(INSTALLFLAGS) -m 755 $1 $2/$(notdir $1) + $(LN) $(LNFLAGS) -fs $(notdir $1) $2/$(SONAME) + $(LN) $(LNFLAGS) -fs $(notdir $1) $2/$(SHAREDLIBNAME) endef # Install a file ($1) to the specified location ($2) -- cgit v1.2.3