summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.top
diff options
context:
space:
mode:
Diffstat (limited to 'makefiles/Makefile.top')
-rw-r--r--makefiles/Makefile.top20
1 files changed, 13 insertions, 7 deletions
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)