VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile48
1 files changed, 37 insertions, 11 deletions
diff --git a/src/Makefile b/src/Makefile
index a2c6f834..81926eba 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -295,7 +295,7 @@ ifeq "$(shell uname -s)" "Darwin"
PLATFORM := MacOSX
APPNAME := VeraCrypt
- export VC_OSX_TARGET ?= 10.7
+ export VC_OSX_TARGET ?= 12
export VC_OSX_SDK ?= $(VC_OSX_TARGET)
#check to see if XCode 3 path exists.Otherwise, use XCode 4 path
@@ -323,11 +323,13 @@ ifeq "$(shell uname -s)" "Darwin"
endif
ifeq "$(CPU_ARCH)" "arm64"
- CPU_ARCH = x86
+ CPU_ARCH = arm64
endif
- CFLAGS += -msse2
- CXXFLAGS += -msse2
+ ifneq "$(CPU_ARCH)" "arm64"
+ CFLAGS += -msse2
+ CXXFLAGS += -msse2
+ endif
ifeq "$(origin SSSE3)" "command line"
CFLAGS += -mssse3
@@ -339,7 +341,7 @@ ifeq "$(shell uname -s)" "Darwin"
CXXFLAGS += -mssse3 -msse4.1
endif
- AS := $(BASE_DIR)/Build/Tools/MacOSX/yasm
+ AS ?= $(BASE_DIR)/Build/Tools/MacOSX/yasm
export ASFLAGS32 := -D __GNUC__ -D __YASM__ -D __BITS__=32 --prefix=_ -f macho32
export ASFLAGS64 := -D __GNUC__ -D __YASM__ -D __BITS__=64 --prefix=_ -f macho64
@@ -350,8 +352,20 @@ ifeq "$(shell uname -s)" "Darwin"
S := $(C_CXX_FLAGS)
C_CXX_FLAGS = $(subst -MMD,,$(S))
- C_CXX_FLAGS += -gfull -arch x86_64
- LFLAGS += -Wl,-dead_strip -arch x86_64
+ # only build local arch in development builds
+ ifeq "$(LOCAL_DEVELOPMENT_BUILD)" "true"
+ ifeq "$(CPU_ARCH)" "arm64"
+ C_CXX_FLAGS += -gfull -arch $(CPU_ARCH)
+ LFLAGS += -Wl,-dead_strip -arch $(CPU_ARCH)
+ else
+ C_CXX_FLAGS += -gfull -arch x86_64
+ LFLAGS += -Wl,-dead_strip -arch x86_64
+ endif
+ else
+ # leave previous logic as is
+ C_CXX_FLAGS += -gfull -arch x86_64
+ LFLAGS += -Wl,-dead_strip -arch x86_64
+ endif
WX_CONFIGURE_FLAGS += --without-libpng --disable-gif --disable-pcx --disable-tga --disable-iff --disable-gif --disable-svg
@@ -361,10 +375,22 @@ ifeq "$(shell uname -s)" "Darwin"
LFLAGS += -arch i386
WX_CONFIGURE_FLAGS += --enable-universal_binary=i386,x86_64
else
- CXXFLAGS += -std=c++11
- C_CXX_FLAGS += -arch arm64
- LFLAGS += -arch arm64
- WX_CONFIGURE_FLAGS += --enable-universal_binary=arm64,x86_64
+ CXXFLAGS += -std=c++11
+ ifeq "$(LOCAL_DEVELOPMENT_BUILD)" "true"
+ ifeq "$(CPU_ARCH)" "arm64"
+ C_CXX_FLAGS += -arch arm64
+ LFLAGS += -arch arm64
+ else
+ C_CXX_FLAGS += -arch x86_64
+ LFLAGS += -arch x86_64
+ endif
+ WX_CONFIGURE_FLAGS += --disable-universal_binary
+ else
+ # leave previous logic as is
+ C_CXX_FLAGS += -arch arm64
+ LFLAGS += -arch arm64
+ WX_CONFIGURE_FLAGS += --enable-universal_binary=arm64,x86_64
+ endif
endif
WXCONFIG_CFLAGS += -gfull