summaryrefslogtreecommitdiff
path: root/source4/build/make
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-03-08 17:02:40 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-03-08 17:02:40 +0100
commitfb6fdfce37a91021c346a52bd7d55a5ee576580a (patch)
treed57686ebd5a3217a83560e6f7c38d30d511203e7 /source4/build/make
parent2bf39edc9d0abf3306bd25b9c40d88aceb029be7 (diff)
downloadsamba-fb6fdfce37a91021c346a52bd7d55a5ee576580a.tar.gz
samba-fb6fdfce37a91021c346a52bd7d55a5ee576580a.tar.bz2
samba-fb6fdfce37a91021c346a52bd7d55a5ee576580a.zip
Fix the build.
(This used to be commit f2e49744717eb46bbfafeea9e2eb412a38a142e7)
Diffstat (limited to 'source4/build/make')
-rw-r--r--source4/build/make/rules.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk
index d7482fe45c..3c195e2903 100644
--- a/source4/build/make/rules.mk
+++ b/source4/build/make/rules.mk
@@ -136,6 +136,24 @@ $(1): $(2) ;
endef
+# Shared library
+# Arguments: Target, dependencies, link flags, soname
+define shared_library_template
+$(1): $(2)
+ @echo Linking $$@
+ @mkdir -p $$(@D)
+ @$$(SHLD) $$(LDFLAGS) $$(SHLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) \
+ $(3) \
+ $$(if $$(SONAMEFLAG), $$(SONAMEFLAG)$(4))
+
+ifneq ($(notdir $(1)), $(notdir $(4)))
+$(4): $(1)
+ @echo "Creating symbolic link for $(4)"
+ @ln -fs $(notdir $(4)) $(1)
+endif
+
+endef
+
# Shared alias
# Arguments: Target, subsystem name, alias name
define shared_module_alias_template