VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-17 06:03:30 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-17 06:36:32 (GMT)
commit7695b8ada0be3013bb880e8e8db8c338e4515961 (patch)
tree2b7aa1e8f4a8f5db47130a6b58beec7dfb6f4119 /src/Makefile
parenta72c7bcd6a1f2f9043e169bf4262dfe3ca006c38 (diff)
downloadVeraCrypt-7695b8ada0be3013bb880e8e8db8c338e4515961.zip
VeraCrypt-7695b8ada0be3013bb880e8e8db8c338e4515961.tar.gz
Linux: Add parameter to Makefile for enabling SSSE3 and SSE4.1 support in compiler
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 4f0a655..0f7ac32 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,6 +20,8 @@
# RESOURCEDIR: Run-time resource directory
# VERBOSE: Enable verbose messages
# WXSTATIC: Use static wxWidgets library
+# SSSE3: Enable SSSE3 support in compiler
+# SSE41: Enable SSE4.1 support in compiler
#------ Targets ------
# all
@@ -161,12 +163,26 @@ ifeq "$(shell uname -s)" "Linux"
PLATFORM := Linux
C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX
+ CFLAGS += -msse2
+ CXXFLAGS += -msse2
+
GCC_GTEQ_440 := $(shell expr `gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40400)
+ GCC_GTEQ_430 := $(shell expr `gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40300)
ifeq "$(GCC_GTEQ_440)" "1"
CFLAGS += -maes
CXXFLAGS += -maes
endif
+ ifeq "$(GCC_GTEQ_430)" "1"
+ ifeq "$(origin SSSE3)" "command line"
+ CFLAGS += -mssse3 -msse4.1
+ endif
+
+ ifeq "$(origin SSE41)" "command line"
+ CXXFLAGS += -mssse3 -msse4.1
+ endif
+ endif
+
ifeq "$(TC_BUILD_CONFIG)" "Release"
C_CXX_FLAGS += -fdata-sections -ffunction-sections
LFLAGS += -Wl,--gc-sections