summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-05-29 02:06:56 +0200
committerBjörn Jacke <bj@sernet.de>2010-05-30 16:25:28 +0200
commita1b44f4335f41a0c11505f1552d9173ca0b469f4 (patch)
tree5fb2cd57953b01c2c68b48226c75385704c93f4c /source3
parent30c74cfa4995af57d8ec3f0f9d3f515e0b285beb (diff)
downloadsamba-a1b44f4335f41a0c11505f1552d9173ca0b469f4.tar.gz
samba-a1b44f4335f41a0c11505f1552d9173ca0b469f4.tar.bz2
samba-a1b44f4335f41a0c11505f1552d9173ca0b469f4.zip
s3: set pthread cflags in a more portable fashion
this avoids one place of a GNU make dependency. Portable make sucks a bit as it has no way of defining variables for a limited set of targets only. Manual duplication of target rules is the only way to achieve what we need. If someone actually knows a trick how to do this without target duplication, let me know.
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in37
1 files changed, 33 insertions, 4 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index dffb408c07..f411eeef8a 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1406,7 +1406,6 @@ wins : SHOWFLAGS @WINBIND_WINS_NSS@
modules:: SHOWFLAGS $(MODULES)
-$(LIBSMBCLIENT_THREAD_OBJ) ../nsswitch/wins.o ../nsswitch/winbind_nss_linux.o: EXTRA_FLAGS := $(PTHREAD_CFLAGS)
#####################################################################
## Perl IDL Compiler
@@ -1466,11 +1465,11 @@ MAKEDIR = || exec false; \
exec false; fi || exec false
# Run a static checker.
-CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(EXTRA_FLAGS) $(PICFLAG) -c $< -o $@
+CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) -c $< -o $@
# Compile a source file.
-COMPILE_CC = $(CC) $(CFLAGS) $(EXTRA_FLAGS) $(PICFLAG) -c $< -o $@
+COMPILE_CC = $(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@
# Compile a source file with the installation paths defined.
-COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(EXTRA_FLAGS) $(PICFLAG) -c $< -o $@
+COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(PICFLAG) -c $< -o $@
COMPILE = $(COMPILE_CC)
@@ -1521,6 +1520,36 @@ dynconfig.o: dynconfig.c Makefile
echo "$(COMPILE_CC_PATH)" 1>&2;\
$(COMPILE_CC_PATH) >/dev/null 2>&1
+### Start section of object files that require PTHREAD_CFLAGS
+../nsswitch/wins.o: ../nsswitch/wins.c
+ @echo Compiling $*.c
+ @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
+ echo "The following command failed:" 1>&2;\
+ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
+ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
+
+../nsswitch/winbind_nss_linux.o: ../nsswitch/winbind_nss_linux.c
+ @echo Compiling $*.c
+ @$(COMPILE_CC) $(PTHREAD_CFLAGS) && exit 0;\
+ echo "The following command failed:" 1>&2;\
+ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
+ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
+
+libsmb/libsmb_thread_impl.o: libsmb/libsmb_thread_impl.c
+ @echo Compiling $*.c
+ @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
+ echo "The following command failed:" 1>&2;\
+ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
+ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
+
+libsmb/libsmb_thread_posix.o: libsmb/libsmb_thread_posix.c
+ @echo Compiling $*.c
+ @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
+ echo "The following command failed:" 1>&2;\
+ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
+ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
+### End section of object files that require PTHREAD_CFLAGS
+
localedir.o: localedir.c Makefile
@echo Compiling $*.c
@$(COMPILE_CC_PATH) && exit 0;\