summaryrefslogtreecommitdiff
path: root/makefiles/gmake/compiler.mk
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-02-28 13:24:57 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-02-28 13:24:57 +0100
commita46766a37068d7f0454c201dffa50166ac059916 (patch)
tree91115b03091d6c3f66165bbffdbb42e0888a69ee /makefiles/gmake/compiler.mk
parente908837858aa028dfde68c225bd04aeb9bb57e85 (diff)
downloadwolfbones-a46766a37068d7f0454c201dffa50166ac059916.tar.gz
wolfbones-a46766a37068d7f0454c201dffa50166ac059916.tar.bz2
thread flags for linux/gcc
Diffstat (limited to 'makefiles/gmake/compiler.mk')
-rw-r--r--makefiles/gmake/compiler.mk24
1 files changed, 19 insertions, 5 deletions
diff --git a/makefiles/gmake/compiler.mk b/makefiles/gmake/compiler.mk
index a84e74d..c0f6799 100644
--- a/makefiles/gmake/compiler.mk
+++ b/makefiles/gmake/compiler.mk
@@ -38,7 +38,7 @@ GCC_MINOR_VERSION = $(shell $(TOPDIR)/makefiles/gmake/guess_env --gcc-minor-vers
# compilation flags and compilers
COMMON_COMPILE_FLAGS = \
- -g -D_REENTRANT -pthread \
+ -g \
-fstrict-aliasing \
-pedantic -Wall -Werror \
-Wunused -Wno-import \
@@ -192,11 +192,25 @@ endif
# end of spro section
-CFLAGS = $(COMPILE_FLAGS) $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS)
-CCPPFLAGS = $(CCPP_COMPILE_FLAGS) $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS)
+# set flags for threading support using POSIX threads. This is completly different
+# between compiler/platforms
+ifeq "$(COMPILER)" "gcc"
+ifeq "$(PLATFORM)" "LINUX"
+PTHREADS_CFLAGS = -D_REENTRANT -pthread
+PTHREADS_LDFLAGS =
+PTHREADS_LIBS =
+else
+PTHREADS_CFLAGS =
+PTHREADS_LDFLAGS =
+PTHREADS_LIBS =
+endif
+endif
+
+CFLAGS = $(COMPILE_FLAGS) $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS) $(PTHREADS_CFLAGS)
+CCPPFLAGS = $(CCPP_COMPILE_FLAGS) $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS) ($PTHREADS_CFLAGS)
-LDFLAGS = -pthread $(INCLUDE_LDFLAGS)
-LIBS = $(INCLUDE_LIBS)
+LDFLAGS = $(INCLUDE_LDFLAGS) $(PTHREADS_LDFLAGS)
+LIBS = $(INCLUDE_LIBS) $(PTHREADS_LIBS)
LINK = $(CC)
CCPP_LINK = $(CCPP)