summaryrefslogtreecommitdiff
path: root/Make.config
diff options
context:
space:
mode:
Diffstat (limited to 'Make.config')
-rw-r--r--Make.config22
1 files changed, 21 insertions, 1 deletions
diff --git a/Make.config b/Make.config
index cd5c6c6..a14fd18 100644
--- a/Make.config
+++ b/Make.config
@@ -6,10 +6,30 @@
CC = gcc
CFLAGS = -O2
-CXX = g++
+#CXX = g++
+
CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual
#CXXFLAGS = -g -ggdb -O0 -Wall -Woverloaded-virtual
+# no CXX given at all: force g++
+ifeq (x$(CXX)x,xx)
+ CXX=g++
+endif
+
+# CXX set to clang++: force clang
+ifeq ($(CXX),clang++)
+ CXX = clang
+endif
+
+# set CXXEXTRA and MAKEDEP according to compiler that is used
+ifeq ($(CXX),clang)
+ CXXEXTRA = -x c++ -Qunused-arguments
+ MAKEDEP = clang -x c++ -M -MM -Qunused-arguments
+else
+ CXXEXTRA =
+ MAKEDEP = g++ -MM -MG
+endif
+
#LDFLAGS = -g -ggdb -O0
LDCONFIG = ldconfig