Change HAS_NASM to USE_NASM. The makefile does not etect it automatically

pull/392/head
Jeffrey Walton 2017-03-14 18:38:37 -04:00
parent d8570a3435
commit 354502d59d
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 7 additions and 7 deletions

View File

@ -55,7 +55,7 @@ HAS_SOLIB_VERSION := $(IS_LINUX)
IS_X32 ?= 0 IS_X32 ?= 0
# Set to 1 if you used NASM to build rdrand-{x86|x32|x64} # Set to 1 if you used NASM to build rdrand-{x86|x32|x64}
HAS_NASM ?= 0 USE_NASM ?= 0
# Fixup for X32 # Fixup for X32
ifeq ($(IS_X32),1) ifeq ($(IS_X32),1)
@ -470,7 +470,7 @@ endif
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems. # List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
OBJS := $(SRCS:.cpp=.o) OBJS := $(SRCS:.cpp=.o)
ifeq ($(HAS_NASM),1) ifeq ($(USE_NASM),1)
ifeq ($(IS_X64),1) ifeq ($(IS_X64),1)
OBJS += rdrand-x64.o OBJS += rdrand-x64.o
else ifeq ($(IS_X32),1) else ifeq ($(IS_X32),1)
@ -766,7 +766,7 @@ endif
endif endif
# Run rdrand-nasm.sh to create the object files # Run rdrand-nasm.sh to create the object files
ifeq ($(HAS_NASM),1) ifeq ($(USE_NASM),1)
rdrand.o: rdrand.h rdrand.cpp rdrand.S rdrand.o: rdrand.h rdrand.cpp rdrand.S
$(CXX) $(strip $(CXXFLAGS)) -DNASM_RDRAND_ASM_AVAILABLE=1 -DNASM_RDSEED_ASM_AVAILABLE=1 -c rdrand.cpp $(CXX) $(strip $(CXXFLAGS)) -DNASM_RDRAND_ASM_AVAILABLE=1 -DNASM_RDSEED_ASM_AVAILABLE=1 -c rdrand.cpp
rdrand-x86.o: ; rdrand-x86.o: ;

View File

@ -25,10 +25,10 @@
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
// For Linux, install NASM, run rdrand-nasm.asm, add the apppropriate // For Linux, NASM is optional. Run rdrand-nasm.sh, and then make
// object file to the Makefile's LIBOBJS (rdrand-x{86|32|64}.o). After // with "USE_NASM" like so: USE_NASM=1 make -j 4. The makefile
// that, define these. They are not enabled by default because they // will add the appropriate defines when building rdrand.cpp,
// are not easy to cut-in in the Makefile. // and add the appropriate object file during link.
#if 0 #if 0
#define NASM_RDRAND_ASM_AVAILABLE 1 #define NASM_RDRAND_ASM_AVAILABLE 1