VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-23 18:08:24 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-23 19:05:47 +0200
commit52ec6faec3d20f23656f9ce603a72c7d2546bd33 (patch)
tree8f5e86d2264559d01a8bc93d114d17342b81c320 /src/Makefile
parentf27b37b73f12bdebbc5bd8e3144c0ce44b91e5da (diff)
downloadVeraCrypt-52ec6faec3d20f23656f9ce603a72c7d2546bd33.tar.gz
VeraCrypt-52ec6faec3d20f23656f9ce603a72c7d2546bd33.zip
Linux/MacOSX: use yasm instead of nasm for compiling all assembly files.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile
index c1c4f02f..af83d874 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -38,14 +38,13 @@ export BUILD_INC := $(BASE_DIR)/Build/Include
export AR ?= ar
export CC ?= gcc
export CXX ?= g++
-export AS := nasm
-export YASM := yasm
+export AS := yasm
export RANLIB ?= ranlib
export CFLAGS := -Wall
export CXXFLAGS := -Wall -Wno-unused-parameter
C_CXX_FLAGS := -MMD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I$(BASE_DIR) -I$(BASE_DIR)/Crypto
-export ASFLAGS := -Ox -D __GNUC__
+export ASFLAGS := -D __GNUC__
export LFLAGS :=
export PKG_CONFIG_PATH ?= /usr/local/lib/pkgconfig
@@ -136,10 +135,10 @@ ARCH = $(shell uname -m)
ifneq (,$(filter i386 i486 i586 i686 x86,$(ARCH)))
CPU_ARCH = x86
- ASFLAGS += -f elf32
+ ASFLAGS += -f elf32 -D __BITS__=32
else ifneq (,$(filter x86_64 x86-64 amd64 x64,$(ARCH)))
CPU_ARCH = x64
- ASFLAGS += -f elf64
+ ASFLAGS += -f elf64 -D __BITS__=64
endif
ifeq "$(origin NOASM)" "command line"
@@ -251,9 +250,9 @@ ifeq "$(shell uname -s)" "Darwin"
CXXFLAGS += -mssse3 -msse4.1
endif
- AS := $(BASE_DIR)/Build/Tools/MacOSX/nasm
- YASM := $(BASE_DIR)/Build/Tools/MacOSX/yasm
- ASFLAGS += --prefix _
+ AS := $(BASE_DIR)/Build/Tools/MacOSX/yasm
+ export ASFLAGS32 := -D __GNUC__ -D __BITS__=32 --prefix _ -f macho32
+ export ASFLAGS64 := -D __GNUC__ -D __BITS__=64 --prefix _ -f macho64
ifeq "$(TC_BUILD_CONFIG)" "Release"