summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-06-14 04:06:35 +0100
committerPeter Powell <petpow@saberuk.com>2013-07-04 17:51:33 +0100
commit0b4a12dc5f1e4472cec1fc32773b399e1a93125a (patch)
treed41c61fd21536a380b3128aba53436c16d81cb4b
parentb37dfc93412f17bb83fc180312850f678d0c30f8 (diff)
Add IFNEQ Makefile template macro.
- Use template macro for ICC check. - Don't link against pthread on Darwin.
-rwxr-xr-xconfigure2
-rw-r--r--make/template/main.mk7
2 files changed, 7 insertions, 2 deletions
diff --git a/configure b/configure
index e54318112..c3d8c4110 100755
--- a/configure
+++ b/configure
@@ -960,6 +960,7 @@ EOF
s/\@IFDEF (\S+)/ifdef $1/g;
s/\@IFNDEF (\S+)/ifndef $1/g;
s/\@IFEQ (\S+) (\S+)/ifeq ($1,$2)/g;
+ s/\@IFNEQ (\S+) (\S+)/ifneq ($1,$2)/g;
s/\@ELSIFEQ (\S+) (\S+)/else ifeq ($1,$2)/g;
s/\@ELSE/else/g;
s/\@ENDIF/endif/g;
@@ -975,6 +976,7 @@ EOF
s/\@IFDEF (\S+)/.if defined($1)/g;
s/\@IFNDEF (\S+)/.if !defined($1)/g;
s/\@IFEQ (\S+) (\S+)/.if $1 == $2/g;
+ s/\@IFNEQ (\S+) (\S+)/.if $1 != $2/g;
s/\@ELSIFEQ (\S+) (\S+)/.elif $1 == $2/g;
s/\@ELSE/.else/g;
s/\@ENDIF/.endif/g;
diff --git a/make/template/main.mk b/make/template/main.mk
index 210e1a500..b24327e70 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -49,11 +49,14 @@ INSTMODE_DIR = 0755
INSTMODE_BIN = 0755
INSTMODE_LIB = 0644
-@IFEQ $(CC) icc
-@ELSE
+@IFNEQ $(CC) icc
CXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute
@ENDIF
+@IFNEQ $(SYSTEM) darwin
+ LDLIBS += -pthread
+@ENDIF
+
@IFEQ $(SYSTEM) linux
LDLIBS += -ldl -lrt
@ENDIF