summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-10-22 21:08:07 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-10-22 21:08:07 +0000
commit1f11fad6014558afb0fb7fb7ec7c9ab4098e70f8 (patch)
treecf7fe4d955b0b49976ffe658a1bd239300bc76ea /GNUmakefile
parenta5a576cb8226f822a06f3e46c2dc1dd0ac7a16fd (diff)
downloadcryptopp-1f11fad6014558afb0fb7fb7ec7c9ab4098e70f8.tar.gz
use CXX instead of gcc directly
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@138 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 6534afb..bbdfb2b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -10,9 +10,14 @@ ARFLAGS = -cr # ar needs the dash on OpenBSD
RANLIB = ranlib
UNAME = $(shell uname)
ISX86 = $(shell uname -m | grep -c "i.86\|x86_64")
-GCC33ORLATER = $(shell gcc -v 2>&1 | grep -c "gcc version \(3.[3-9]\|[4-9]\)")
ISMINGW = $(shell uname | grep -c "MINGW32")
+ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
+CXX = g++
+endif
+
+GCC33ORLATER = $(shell $(CXX) -v 2>&1 | grep -c "gcc version \(3.[3-9]\|[4-9]\)")
+
ifeq ($(ISX86) $(GCC33ORLATER) $(ISMINGW),1 1 0) # MINGW32 is missing the memalign function
CXXFLAGS += -msse2
endif
@@ -31,7 +36,7 @@ ifeq ($(UNAME),Darwin)
AR = libtool
ARFLAGS = -static -o
CXXFLAGS += -D__pic__
-IS_GCC2 = $(shell c++ -v 2>&1 | grep -c gcc-932)
+IS_GCC2 = $(shell $(CXX) -v 2>&1 | grep -c gcc-932)
ifeq ($(IS_GCC2),1)
CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables
CXX = c++
@@ -44,10 +49,6 @@ ifeq ($(UNAME),SunOS)
LDLIBS += -lnsl -lsocket
endif
-ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
-CXX = g++
-endif
-
SRCS = $(wildcard *.cpp)
ifeq ($(SRCS),) # workaround wildcard function bug in GNU Make 3.77
SRCS = $(shell ls *.cpp)