summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-21 21:32:53 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-21 21:32:53 +0200
commit82bcf967b79321706cd19c759ea54c4465fe0d96 (patch)
treef232350d09fe7f9c520b236191679b283894888e /source4
parent2914b0ca04355f6f175b603a1de6030b20ce0830 (diff)
downloadsamba-82bcf967b79321706cd19c759ea54c4465fe0d96.tar.gz
samba-82bcf967b79321706cd19c759ea54c4465fe0d96.tar.xz
samba-82bcf967b79321706cd19c759ea54c4465fe0d96.zip
Move CFLAGS overrides for SWIG modules to Makefile.
(This used to be commit 58665a8a8e4b10435aebbf2c95b6a8e50db232d6)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/config.mk2
-rw-r--r--source4/auth/credentials/config.mk2
-rw-r--r--source4/build/smb_build/input.pm2
-rw-r--r--source4/lib/events/config.mk2
-rw-r--r--source4/lib/ldb/python.mk2
-rw-r--r--source4/lib/registry/config.mk2
-rw-r--r--source4/lib/tdb/python.mk3
-rw-r--r--source4/libcli/config.mk5
-rw-r--r--source4/libcli/security/config.mk2
-rw-r--r--source4/librpc/config.mk2
-rw-r--r--source4/param/config.mk2
-rw-r--r--source4/scripting/python/config.mk2
12 files changed, 26 insertions, 2 deletions
diff --git a/source4/auth/config.mk b/source4/auth/config.mk
index 01626530760..78a267ced17 100644
--- a/source4/auth/config.mk
+++ b/source4/auth/config.mk
@@ -44,3 +44,5 @@ SWIG_FILE = auth.i
$(eval $(call python_py_module_template,auth.py,$(authsrcdir)/auth.py))
swig_auth_OBJ_FILES = $(authsrcdir)/auth_wrap.o
+
+$(swig_auth_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/auth/credentials/config.mk b/source4/auth/credentials/config.mk
index fc01f7eddc6..18cf460179e 100644
--- a/source4/auth/credentials/config.mk
+++ b/source4/auth/credentials/config.mk
@@ -20,3 +20,5 @@ SWIG_FILE = credentials.i
$(eval $(call python_py_module_template,credentials.py,$(authsrcdir)/credentials/credentials.py))
swig_credentials_OBJ_FILES = $(authsrcdir)/credentials/credentials_wrap.o
+
+$(swig_credentials_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index 75a02ca8c25..c4c8f0de135 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -146,8 +146,6 @@ sub check_python($$$)
$dirname = "" if $dirname eq "./";
$python->{LIBRARY_REALNAME} = "_$basename.\$(SHLIBEXT)";
- push (@{$python->{CFLAGS}}, "\$(CFLAG_NO_UNUSED_MACROS)");
- push (@{$python->{CFLAGS}}, "\$(CFLAG_NO_CAST_QUAL)");
$python->{INIT_FUNCTION} = "{ (char *)\"_$basename\", init_$basename }";
} else {
my $basename = $python->{NAME};
diff --git a/source4/lib/events/config.mk b/source4/lib/events/config.mk
index e4b5f40571f..3e5a5e2a2f8 100644
--- a/source4/lib/events/config.mk
+++ b/source4/lib/events/config.mk
@@ -58,3 +58,5 @@ PRIVATE_DEPENDENCIES = LIBEVENTS LIBSAMBA-HOSTCONFIG
swig_events_OBJ_FILES = $(libeventssrcdir)/events_wrap.o
$(eval $(call python_py_module_template,events.py,$(libeventssrcdir)/events.py))
+
+$(swig_events_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/lib/ldb/python.mk b/source4/lib/ldb/python.mk
index aeafb830d65..77af5d6183f 100644
--- a/source4/lib/ldb/python.mk
+++ b/source4/lib/ldb/python.mk
@@ -6,3 +6,5 @@ SWIG_FILE = ldb.i
swig_ldb_OBJ_FILES = lib/ldb/ldb_wrap.o
$(eval $(call python_py_module_template,ldb.py,lib/ldb/ldb.py))
+
+$(swig_ldb_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk
index bb939be0c5f..077d96ab30b 100644
--- a/source4/lib/registry/config.mk
+++ b/source4/lib/registry/config.mk
@@ -111,3 +111,5 @@ SWIG_FILE = registry.i
swig_registry_OBJ_FILES = $(libregistrysrcdir)/registry_wrap.o
$(eval $(call python_py_module_template,registry.py,lib/registry/registry.py))
+
+$(swig_registry_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/lib/tdb/python.mk b/source4/lib/tdb/python.mk
index 51074c85766..1be237186ff 100644
--- a/source4/lib/tdb/python.mk
+++ b/source4/lib/tdb/python.mk
@@ -5,3 +5,6 @@ PUBLIC_DEPENDENCIES = LIBTDB DYNCONFIG
swig_tdb_OBJ_FILES = lib/tdb/tdb_wrap.o
$(eval $(call python_py_module_template,tdb.py,lib/tdb/tdb.py))
+
+$(swig_tdb_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
+
diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk
index d7e4e143c07..54a5e48e730 100644
--- a/source4/libcli/config.mk
+++ b/source4/libcli/config.mk
@@ -82,6 +82,8 @@ python_libcli_nbt_OBJ_FILES = $(libclisrcdir)/swig/libcli_nbt_wrap.o
$(eval $(call python_py_module_template,libcli_nbt.py,$(libclisrcdir)/swig/libcli_nbt.py))
+$(python_libcli_nbt_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
+
[PYTHON::python_libcli_smb]
SWIG_FILE = swig/libcli_smb.i
PUBLIC_DEPENDENCIES = LIBCLI_SMB DYNCONFIG LIBSAMBA-HOSTCONFIG
@@ -90,6 +92,9 @@ python_libcli_smb_OBJ_FILES = $(libclisrcdir)/swig/libcli_smb_wrap.o
$(eval $(call python_py_module_template,libcli_smb.py,$(libclisrcdir)/swig/libcli_smb.py))
+$(python_libcli_smb_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
+
+
[SUBSYSTEM::LIBCLI_DGRAM]
PUBLIC_DEPENDENCIES = LIBCLI_NBT LIBNDR LIBCLI_RESOLVE LIBCLI_NETLOGON
diff --git a/source4/libcli/security/config.mk b/source4/libcli/security/config.mk
index 9f704e9592e..4d467340592 100644
--- a/source4/libcli/security/config.mk
+++ b/source4/libcli/security/config.mk
@@ -14,3 +14,5 @@ PRIVATE_DEPENDENCIES = LIBSECURITY
swig_security_OBJ_FILES = $(libclisrcdir)/security/security_wrap.o
$(eval $(call python_py_module_template,security.py,$(libclisrcdir)/security/security.py))
+
+$(swig_security_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 5ef64d6b75f..fc11946beba 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -729,6 +729,8 @@ swig_dcerpc_OBJ_FILES = $(dcerpcsrcdir)/dcerpc_wrap.o
$(eval $(call python_py_module_template,dcerpc.py,$(dcerpcsrcdir)/dcerpc.py))
+$(swig_dcerpc_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
+
[PYTHON::python_echo]
PRIVATE_DEPENDENCIES = RPC_NDR_ECHO PYTALLOC param swig_credentials
diff --git a/source4/param/config.mk b/source4/param/config.mk
index 74b19d3d1d6..5d14d225445 100644
--- a/source4/param/config.mk
+++ b/source4/param/config.mk
@@ -64,3 +64,5 @@ PRIVATE_DEPENDENCIES = LIBSAMBA-HOSTCONFIG
param_OBJ_FILES = $(paramsrcdir)/param_wrap.o
$(eval $(call python_py_module_template,param.py,$(paramsrcdir)/param.py))
+
+$(param_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index 1fa273e99d3..cc94abb702f 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -21,6 +21,8 @@ SWIG_FILE = misc.i
python_misc_OBJ_FILES = $(pyscriptsrcdir)/misc_wrap.o
+$(python_misc_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
+
_PY_FILES = $(shell find $(pyscriptsrcdir) -name "*.py")
$(foreach pyfile, $(_PY_FILES),$(eval $(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(pyfile)),$(pyfile))))