summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.top
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2009-04-21 20:56:32 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2009-04-21 20:56:32 +0000
commit1812a9f93a917f637d73663f388c30ebcadcb3f1 (patch)
tree65a40be602f4c573b95041976f5fc2cb12d13d25 /makefiles/Makefile.top
parentf8e8cb03e0aa03c2653d5c6dc288cb9c1789d6be (diff)
downloadbuildsystem-1812a9f93a917f637d73663f388c30ebcadcb3f1.tar.gz
buildsystem-1812a9f93a917f637d73663f388c30ebcadcb3f1.tar.bz2
Update the shared object building in the shared makesystem
svn path=/trunk/tools/buildsystem/; revision=7203
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)