summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-18 02:34:33 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-18 02:34:33 +0000
commitdaec4644fb12b026eb5210827fe66cae3928635a (patch)
tree9732b0bb2e34535743af1bc3680de2ea8d013710 /GNUmakefile
parentecf8b8bd23401e833a901eb10ba06d0ab9482f88 (diff)
downloadcryptopp-daec4644fb12b026eb5210827fe66cae3928635a.tar.gz
update version number, port to Sun C++ 5.8
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@265 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile
index dd1e919..3dff775 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -11,9 +11,10 @@ ARFLAGS = -cr # ar needs the dash on OpenBSD
RANLIB = ranlib
CP = cp
MKDIR = mkdir
+EGREP = egrep
UNAME = $(shell uname)
-ISX86 = $(shell uname -m | egrep -c "i.86|x86")
-ISMINGW = $(shell uname | egrep -c "MINGW32")
+ISX86 = $(shell uname -m | $(EGREP) -c "i.86|x86|i86")
+ISMINGW = $(shell uname | $(EGREP) -c "MINGW32")
# Default prefix for make install
ifeq ($(PREFIX),)
@@ -26,8 +27,8 @@ endif
ifeq ($(ISX86),1)
-GCC33ORLATER = $(shell $(CXX) -v 2>&1 | egrep -c "gcc version (3.[3-9]|[4-9])")
-GAS210ORLATER = $(shell echo "" | $(AS) -v 2>&1 | egrep -c "GNU assembler version (2.[1-9][0-9]|[3-9])")
+GCC33ORLATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "gcc version (3.[3-9]|[4-9])")
+GAS210ORLATER = $(shell echo "" | $(AS) -v 2>&1 | $(EGREP) -c "GNU assembler version (2.[1-9][0-9]|[3-9])")
ifeq ($(GCC33ORLATER) $(ISMINGW),1 0) # MINGW32 is missing the memalign function
CXXFLAGS += -msse2
@@ -46,8 +47,10 @@ endif
ifeq ($(UNAME),) # for DJGPP, where uname doesn't exist
CXXFLAGS += -mbnu210
else
+ifneq ($(CXX),CC) # don't use -pipe with CC (Solaris native C++ compiler)
CXXFLAGS += -pipe
endif
+endif
ifeq ($(UNAME),Linux)
LDFLAGS += -pthread
@@ -58,7 +61,7 @@ AR = libtool
ARFLAGS = -static -o
CXX = c++
CXXFLAGS += -D__pic__
-IS_GCC2 = $(shell $(CXX) -v 2>&1 | egrep -c gcc-932)
+IS_GCC2 = $(shell $(CXX) -v 2>&1 | $(EGREP) -c gcc-932)
ifeq ($(IS_GCC2),1)
CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables
LDLIBS += -lstdc++
@@ -72,7 +75,7 @@ endif
SRCS = $(wildcard *.cpp)
ifeq ($(SRCS),) # workaround wildcard function bug in GNU Make 3.77
-SRCS = $(shell ls *.cpp)
+SRCS = $(shell echo *.cpp)
endif
OBJS = $(SRCS:.cpp=.o)