summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-31 01:54:53 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-31 01:54:53 +0000
commite84412066595cc6bec6565fbbf1a5ea6936c11d3 (patch)
treea628d3e147d838d2d23398c236d34d643b6330d2 /GNUmakefile
parentab81a0ed8b889d6e50225792f4b3b62f0217d182 (diff)
downloadcryptopp-e84412066595cc6bec6565fbbf1a5ea6936c11d3.tar.gz
enable SSE2 intrinsics on GCC 3.3 or later
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@121 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 679f20e..15fe037 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -9,6 +9,12 @@ CXXFLAGS = -g
ARFLAGS = -cr # ar needs the dash on OpenBSD
RANLIB = ranlib
UNAME = $(shell uname)
+ISX86 = $(shell uname -m | grep -c "i.86")
+GCC33ORLATER = $(shell gcc -v 2>&1 | grep -c "gcc version \(3.[3-9]\|[4-9]\)")
+
+ifeq ($(ISX86) $(GCC33ORLATER),1 1)
+CXXFLAGS += -msse2
+endif
ifeq ($(UNAME),) # for DJGPP, where uname doesn't exist
CXXFLAGS += -mbnu210