summaryrefslogtreecommitdiff
path: root/source4/build/make
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-26 16:36:24 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-26 16:36:24 +0100
commit5874c53eba3d195d4d9017c1b884e9413221f91e (patch)
treef1f9d0b451e23df5c00d298962f5cc519f772aaa /source4/build/make
parentef15b28d244dcaaa38a07055c3a88f6199173611 (diff)
downloadsamba-5874c53eba3d195d4d9017c1b884e9413221f91e.tar.gz
samba-5874c53eba3d195d4d9017c1b884e9413221f91e.tar.bz2
samba-5874c53eba3d195d4d9017c1b884e9413221f91e.zip
Support building .so versions of the modules.
(This used to be commit 673fb9c1855f9d61d4d311bcd5e3fea0210fe6ed)
Diffstat (limited to 'source4/build/make')
-rw-r--r--source4/build/make/python.mk28
1 files changed, 23 insertions, 5 deletions
diff --git a/source4/build/make/python.mk b/source4/build/make/python.mk
index 6f54cd6a44..bd0926717d 100644
--- a/source4/build/make/python.mk
+++ b/source4/build/make/python.mk
@@ -1,13 +1,9 @@
pythonbuilddir = $(builddir)/bin/python
# Install Python
-# Arguments: Module path, source location
+# Arguments: Module path
define python_module_template
-$$(pythonbuilddir)/$(1): $(2) ;
- mkdir -p $$(@D)
- cp $$< $$@
-
installpython:: $$(pythonbuilddir)/$(1) ;
cp $$< $$(DESTDIR)$$(PYTHONDIR)/$(1)
@@ -18,6 +14,28 @@ pythonmods:: $$(pythonbuilddir)/$(1) ;
endef
+define python_py_module_template
+
+$$(pythonbuilddir)/$(1): $(2) ;
+ mkdir -p $$(@D)
+ cp $$< $$@
+
+$(call python_module_template,$(1))
+
+endef
+
+# Python C module
+# Arguments: Module path, object files
+define python_c_module_template
+
+$$(pythonbuilddir)/$(1): $(2) ;
+ @echo Linking $$@
+ @mkdir -p $$(@D)
+ @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
+
+$(call python_module_template,$(1))
+endef
+
# Swig extensions
swig:: pythonmods