2016-04-25 21:45:23 +00:00
|
|
|
# cryptest.nmake - written and placed in public domain by Jeffrey Walton.
|
|
|
|
# Copyright assigned to the Crypto++ project.
|
|
|
|
|
2016-09-18 03:21:34 +00:00
|
|
|
# This makefile is used for testing and building cryptlib.lib and cryptest.exe under nmake. Open a
|
|
|
|
# Visual Studio Developer Prompt and then run "nmake /f cryptest.nmake". The build procedure will
|
|
|
|
# reveal not-so-readily-apparent problems under Microsoft ARM and Metro UI apps.
|
2016-04-25 21:45:23 +00:00
|
|
|
|
|
|
|
# The makefile is not intended for production use, though it may be used as a starting point.
|
|
|
|
# For example, you can add switches like /MT and /MTd for dynamic runtime linking against
|
2016-09-18 03:21:34 +00:00
|
|
|
# the Microsoft C++ Runtime libraries. If you are building for Windows Phone or Windows Store, then
|
|
|
|
# you probably want to remove /D_MBCS. The resulting cryptlib.lib may be suitable as a starting
|
|
|
|
# point for a DLL project using Crypto++.
|
|
|
|
|
2016-10-10 02:42:31 +00:00
|
|
|
# You must also add /DCRYPTOPP_DEBUG or /DDEBUG if you want a debug build with the library's assert.
|
|
|
|
# The library moved from Posix NDEBUG and assert() to CRYPTOPP_ASSERT at 5.6.5 due to CVE-2016-7420.
|
|
|
|
# CRYPTOPP_ASSERT has the additional benefit of using DebugBreak(), and the program does not crash
|
|
|
|
# while you are debugging it like would happen with Posix assert().
|
2016-04-25 21:45:23 +00:00
|
|
|
|
|
|
|
# The list of LIB_SRCS and TEST_SRCS was generated under Linux with "make sources". The list of
|
|
|
|
# LIB_OBJS and TEST_OBJS was generated under Linux with "make sources | sed 's|.cpp|.obj|g'".
|
2016-09-18 21:55:23 +00:00
|
|
|
# The order of the firt three object files are significant. See C++ Static Initialization Order
|
|
|
|
# Fisaco on the Crypto++ wiki for details.
|
2016-04-25 21:45:23 +00:00
|
|
|
|
2016-04-28 05:36:41 +00:00
|
|
|
# You are free to add and remove files to the list. For example, you can remove rdrand.asm
|
|
|
|
# build it using NASM, and then include the NASM object file rdrand_x86.obj or rdrand_x64.obj.
|
2016-04-25 21:45:23 +00:00
|
|
|
|
2016-09-18 03:21:34 +00:00
|
|
|
###########################################################################################
|
2016-04-25 21:45:23 +00:00
|
|
|
|
2016-04-28 05:36:41 +00:00
|
|
|
# To test debug builds, use the following CXXFLAGS:
|
|
|
|
# - /DDEBUG /D_DEBUG /Oi /Oy- /Od
|
|
|
|
# To test release builds, use the following CXXFLAGS:
|
|
|
|
# - /DNDEBUG /D_NDEBUG /Oi /Oy /O2
|
2016-09-18 03:21:34 +00:00
|
|
|
# To test with static C++ runtime linking, use the following CXXFLAGS (default below):
|
|
|
|
# - /MT (release) or /MTd (debug)
|
2016-04-28 05:36:41 +00:00
|
|
|
# To test with dynamic C++ runtime linking, use the following CXXFLAGS:
|
|
|
|
# - /MD (release) or /MDd (debug)
|
2016-10-10 02:42:31 +00:00
|
|
|
# To test Desktop app, use the following CXXFLAGS:
|
2016-04-29 06:24:48 +00:00
|
|
|
# - /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
2016-04-28 05:36:41 +00:00
|
|
|
# To test Windows Store app, use the following CXXFLAGS:
|
|
|
|
# - /DWINAPI_FAMILY=WINAPI_FAMILY_APP
|
|
|
|
# To test Windows Phone, use the following CXXFLAGS:
|
|
|
|
# - /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
|
2016-05-01 02:48:14 +00:00
|
|
|
# To test Surface RT (ARM tablet), use the following CXXFLAGS:
|
2016-04-29 06:24:48 +00:00
|
|
|
# - /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
2016-04-28 05:36:41 +00:00
|
|
|
|
2016-09-18 03:21:34 +00:00
|
|
|
###########################################################################################
|
|
|
|
|
2017-08-17 16:33:43 +00:00
|
|
|
# If you use 'make sources' from Linux makefile, then add 'winpipes.cpp' to the list below.
|
2016-09-18 03:21:34 +00:00
|
|
|
|
Add interface to TweetNaCl library (#566)
TweetNaCl is a compact reimplementation of the NaCl library by Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen, Tanja Lange, Peter Schwabe and Sjaak Smetsers. The library is less than 20 KB in size and provides 25 of the NaCl library functions.
The compact library uses curve25519, XSalsa20, Poly1305 and SHA-512 as default primitives, and includes both x25519 key exchange and ed25519 signatures. The complete list of functions can be found in TweetNaCl: A crypto library in 100 tweets (20140917), Table 1, page 5.
Crypto++ retained the function names and signatures but switched to data types provided by <stdint.h> to promote interoperability with Crypto++ and avoid size problems on platforms like Cygwin. For example, NaCl typdef'd u64 as an unsigned long long, but Cygwin, MinGW and MSYS are LP64 systems (not LLP64 systems). In addition, Crypto++ was missing NaCl's signed 64-bit integer i64.
Crypto++ enforces the 0-key restriction due to small points. The TweetNaCl library allowed the 0-keys to small points. Also see RFC 7748, Elliptic Curves for Security, Section 6.
TweetNaCl is well written but not well optimized. It runs 2x to 3x slower than optimized routines from libsodium. However, the library is still 2x to 4x faster than the algorithms NaCl was designed to replace.
The Crypto++ wrapper for TweetNaCl requires OS features. That is, NO_OS_DEPENDENCE cannot be defined. It is due to TweetNaCl's internal function randombytes. Crypto++ used DefaultAutoSeededRNG within randombytes, so OS integration must be enabled. You can use another generator like RDRAND to avoid the restriction.
2018-01-18 03:02:09 +00:00
|
|
|
LIB_SRCS = cryptlib.cpp cpu.cpp integer.cpp 3way.cpp adler32.cpp algebra.cpp algparam.cpp arc4.cpp aria-simd.cpp aria.cpp ariatab.cpp asn.cpp authenc.cpp base32.cpp base64.cpp basecode.cpp bfinit.cpp blake2-simd.cpp blake2.cpp blowfish.cpp blumshub.cpp camellia.cpp cast.cpp casts.cpp cbcmac.cpp ccm.cpp chacha.cpp channels.cpp cmac.cpp crc-simd.cpp crc.cpp default.cpp des.cpp dessp.cpp dh.cpp dh2.cpp dll.cpp dsa.cpp eax.cpp ec2n.cpp eccrypto.cpp ecp.cpp elgamal.cpp emsa2.cpp eprecomp.cpp esign.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gcm-simd.cpp gcm.cpp gf256.cpp gf2_32.cpp gf2n.cpp gfpcrypt.cpp gost.cpp gzip.cpp hex.cpp hmac.cpp hrtimer.cpp ida.cpp idea.cpp iterhash.cpp kalyna.cpp kalynatab.cpp keccak.cpp luc.cpp mars.cpp marss.cpp md2.cpp md4.cpp md5.cpp misc.cpp modes.cpp mqueue.cpp mqv.cpp nbtheory.cpp neon-simd.cpp network.cpp oaep.cpp osrng.cpp padlkrng.cpp panama.cpp pkcspad.cpp poly1305.cpp polynomi.cpp pssr.cpp pubkey.cpp queue.cpp rabin.cpp randpool.cpp rc2.cpp rc5.cpp rc6.cpp rdrand.cpp rdtables.cpp rijndael-simd.cpp rijndael.cpp ripemd.cpp rng.cpp rsa.cpp rw.cpp safer.cpp salsa.cpp seal.cpp seed.cpp serpent.cpp sha-simd.cpp sha.cpp sha3.cpp shacal2-simd.cpp shacal2.cpp shark.cpp sharkbox.cpp simon.cpp simon-simd.cpp skipjack.cpp sm3.cpp sm4.cpp socketft.cpp sosemanuk.cpp speck.cpp speck-simd.cpp square.cpp squaretb.cpp sse-simd.cpp strciphr.cpp tea.cpp tftables.cpp threefish.cpp tiger.cpp tigertab.cpp trdlocal.cpp ttmac.cpp tweetnacl.cpp twofish.cpp vmac.cpp wait.cpp wake.cpp whrlpool.cpp winpipes.cpp xtr.cpp xtrcrypt.cpp zdeflate.cpp zinflate.cpp zlib.cpp
|
2016-09-18 03:21:34 +00:00
|
|
|
|
Add interface to TweetNaCl library (#566)
TweetNaCl is a compact reimplementation of the NaCl library by Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen, Tanja Lange, Peter Schwabe and Sjaak Smetsers. The library is less than 20 KB in size and provides 25 of the NaCl library functions.
The compact library uses curve25519, XSalsa20, Poly1305 and SHA-512 as default primitives, and includes both x25519 key exchange and ed25519 signatures. The complete list of functions can be found in TweetNaCl: A crypto library in 100 tweets (20140917), Table 1, page 5.
Crypto++ retained the function names and signatures but switched to data types provided by <stdint.h> to promote interoperability with Crypto++ and avoid size problems on platforms like Cygwin. For example, NaCl typdef'd u64 as an unsigned long long, but Cygwin, MinGW and MSYS are LP64 systems (not LLP64 systems). In addition, Crypto++ was missing NaCl's signed 64-bit integer i64.
Crypto++ enforces the 0-key restriction due to small points. The TweetNaCl library allowed the 0-keys to small points. Also see RFC 7748, Elliptic Curves for Security, Section 6.
TweetNaCl is well written but not well optimized. It runs 2x to 3x slower than optimized routines from libsodium. However, the library is still 2x to 4x faster than the algorithms NaCl was designed to replace.
The Crypto++ wrapper for TweetNaCl requires OS features. That is, NO_OS_DEPENDENCE cannot be defined. It is due to TweetNaCl's internal function randombytes. Crypto++ used DefaultAutoSeededRNG within randombytes, so OS integration must be enabled. You can use another generator like RDRAND to avoid the restriction.
2018-01-18 03:02:09 +00:00
|
|
|
LIB_OBJS = cryptlib.obj cpu.obj integer.obj 3way.obj adler32.obj algebra.obj algparam.obj arc4.obj aria-simd.obj aria.obj ariatab.obj asn.obj authenc.obj base32.obj base64.obj basecode.obj bfinit.obj blake2-simd.obj blake2.obj blowfish.obj blumshub.obj camellia.obj cast.obj casts.obj cbcmac.obj ccm.obj chacha.obj channels.obj cmac.obj crc-simd.obj crc.obj default.obj des.obj dessp.obj dh.obj dh2.obj dll.obj dsa.obj eax.obj ec2n.obj eccrypto.obj ecp.obj elgamal.obj emsa2.obj eprecomp.obj esign.obj files.obj filters.obj fips140.obj fipstest.obj gcm-simd.obj gcm.obj gf256.obj gf2_32.obj gf2n.obj gfpcrypt.obj gost.obj gzip.obj hex.obj hmac.obj hrtimer.obj ida.obj idea.obj iterhash.obj kalyna.obj kalynatab.obj keccak.obj luc.obj mars.obj marss.obj md2.obj md4.obj md5.obj misc.obj modes.obj mqueue.obj mqv.obj nbtheory.obj neon-simd.obj network.obj oaep.obj osrng.obj padlkrng.obj panama.obj pkcspad.obj poly1305.obj polynomi.obj pssr.obj pubkey.obj queue.obj rabin.obj randpool.obj rc2.obj rc5.obj rc6.obj rdrand.obj rdtables.obj rijndael-simd.obj rijndael.obj ripemd.obj rng.obj rsa.obj rw.obj safer.obj salsa.obj seal.obj seed.obj serpent.obj sha-simd.obj sha.obj sha3.obj shacal2-simd.obj shacal2.obj shark.obj sharkbox.obj simon.obj simon-simd.obj skipjack.obj sm3.obj sm4.obj socketft.obj sosemanuk.obj speck.obj speck-simd.obj square.obj squaretb.obj sse-simd.obj strciphr.obj tea.obj tftables.obj threefish.obj tiger.obj tigertab.obj trdlocal.obj ttmac.obj tweetnacl.obj twofish.obj vmac.obj wait.obj wake.obj whrlpool.obj winpipes.obj xtr.obj xtrcrypt.obj zdeflate.obj zinflate.obj zlib.obj
|
2016-09-18 03:21:34 +00:00
|
|
|
|
Add interface to TweetNaCl library (#566)
TweetNaCl is a compact reimplementation of the NaCl library by Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen, Tanja Lange, Peter Schwabe and Sjaak Smetsers. The library is less than 20 KB in size and provides 25 of the NaCl library functions.
The compact library uses curve25519, XSalsa20, Poly1305 and SHA-512 as default primitives, and includes both x25519 key exchange and ed25519 signatures. The complete list of functions can be found in TweetNaCl: A crypto library in 100 tweets (20140917), Table 1, page 5.
Crypto++ retained the function names and signatures but switched to data types provided by <stdint.h> to promote interoperability with Crypto++ and avoid size problems on platforms like Cygwin. For example, NaCl typdef'd u64 as an unsigned long long, but Cygwin, MinGW and MSYS are LP64 systems (not LLP64 systems). In addition, Crypto++ was missing NaCl's signed 64-bit integer i64.
Crypto++ enforces the 0-key restriction due to small points. The TweetNaCl library allowed the 0-keys to small points. Also see RFC 7748, Elliptic Curves for Security, Section 6.
TweetNaCl is well written but not well optimized. It runs 2x to 3x slower than optimized routines from libsodium. However, the library is still 2x to 4x faster than the algorithms NaCl was designed to replace.
The Crypto++ wrapper for TweetNaCl requires OS features. That is, NO_OS_DEPENDENCE cannot be defined. It is due to TweetNaCl's internal function randombytes. Crypto++ used DefaultAutoSeededRNG within randombytes, so OS integration must be enabled. You can use another generator like RDRAND to avoid the restriction.
2018-01-18 03:02:09 +00:00
|
|
|
TEST_SRCS = bench1.cpp bench2.cpp test.cpp validat0.cpp validat1.cpp validat2.cpp validat3.cpp validat4.cpp datatest.cpp regtest1.cpp regtest2.cpp regtest3.cpp fipsalgt.cpp dlltest.cpp fipstest.cpp
|
2016-09-18 03:21:34 +00:00
|
|
|
|
Add interface to TweetNaCl library (#566)
TweetNaCl is a compact reimplementation of the NaCl library by Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen, Tanja Lange, Peter Schwabe and Sjaak Smetsers. The library is less than 20 KB in size and provides 25 of the NaCl library functions.
The compact library uses curve25519, XSalsa20, Poly1305 and SHA-512 as default primitives, and includes both x25519 key exchange and ed25519 signatures. The complete list of functions can be found in TweetNaCl: A crypto library in 100 tweets (20140917), Table 1, page 5.
Crypto++ retained the function names and signatures but switched to data types provided by <stdint.h> to promote interoperability with Crypto++ and avoid size problems on platforms like Cygwin. For example, NaCl typdef'd u64 as an unsigned long long, but Cygwin, MinGW and MSYS are LP64 systems (not LLP64 systems). In addition, Crypto++ was missing NaCl's signed 64-bit integer i64.
Crypto++ enforces the 0-key restriction due to small points. The TweetNaCl library allowed the 0-keys to small points. Also see RFC 7748, Elliptic Curves for Security, Section 6.
TweetNaCl is well written but not well optimized. It runs 2x to 3x slower than optimized routines from libsodium. However, the library is still 2x to 4x faster than the algorithms NaCl was designed to replace.
The Crypto++ wrapper for TweetNaCl requires OS features. That is, NO_OS_DEPENDENCE cannot be defined. It is due to TweetNaCl's internal function randombytes. Crypto++ used DefaultAutoSeededRNG within randombytes, so OS integration must be enabled. You can use another generator like RDRAND to avoid the restriction.
2018-01-18 03:02:09 +00:00
|
|
|
TEST_OBJS = bench1.obj bench2.obj test.obj validat0.obj validat1.obj validat2.obj validat3.obj validat4.obj datatest.obj regtest1.obj regtest2.obj regtest3.obj fipsalgt.obj dlltest.obj fipstest.obj
|
2016-09-18 03:21:34 +00:00
|
|
|
|
|
|
|
CXX = cl.exe
|
|
|
|
LD = link.exe
|
|
|
|
AR = lib.exe
|
|
|
|
RM = del.exe
|
|
|
|
|
2016-12-18 08:42:34 +00:00
|
|
|
CXXFLAGS = /nologo /W4 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc
|
2016-04-26 21:12:21 +00:00
|
|
|
LDFLAGS = /nologo /SUBSYSTEM:CONSOLE
|
2016-04-25 21:45:23 +00:00
|
|
|
ARFLAGS = /nologo
|
2016-04-26 21:12:21 +00:00
|
|
|
LDLIBS =
|
|
|
|
|
2016-12-18 08:42:34 +00:00
|
|
|
# Debug build
|
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DDEBUG /D_DEBUG /Oi /Oy- /Od /MTd
|
|
|
|
# Release build
|
|
|
|
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT
|
|
|
|
|
2016-12-27 17:34:57 +00:00
|
|
|
# Attempt to detect when <sdkddkver.h> and <winapifamily.h> are available
|
2016-11-13 21:18:41 +00:00
|
|
|
# http://stackoverflow.com/q/40577415 ?
|
|
|
|
!IF "$(WINDOWSSDKDIR)" != "" || "$(WINDOWSSDKLIBVERSION)" != ""
|
|
|
|
CXXFLAGS = $(CXXFLAGS) /FI sdkddkver.h
|
|
|
|
!ENDIF
|
|
|
|
!IF "$(WINDOWSPHONEKITDIR)" != "" || "$(UNIVERSALCRTSDKDIR)" != "" || "$(UCRTVERSION)" != ""
|
|
|
|
CXXFLAGS = $(CXXFLAGS) /FI winapifamily.h
|
2017-03-20 19:11:27 +00:00
|
|
|
!ELSEIF "$(PLATFORM)" == "ARM" || "$(PLATFORM)" == "arm" || "$(PLATFORM)" == "ARM64" || "$(PLATFORM)" == "arm64"
|
|
|
|
CXXFLAGS = $(CXXFLAGS) /FI winapifamily.h
|
2016-11-13 21:18:41 +00:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
# Check for empty Platform and Processor
|
2016-04-28 05:36:41 +00:00
|
|
|
!IF "$(PLATFORM)" == ""
|
2016-09-09 00:24:25 +00:00
|
|
|
!IF "$(PROCESSOR_ARCHITECTURE)" == "x86"
|
2016-04-28 05:36:41 +00:00
|
|
|
PLATFORM = x86
|
2016-09-07 23:53:38 +00:00
|
|
|
!ELSEIF "$(PROCESSOR_ARCHITECTURE)" == "x64" || "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
|
2016-04-28 05:36:41 +00:00
|
|
|
PLATFORM = x64
|
|
|
|
!ELSE
|
|
|
|
!ERROR "Unknown platform"
|
|
|
|
!ENDIF
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
!MESSAGE
|
|
|
|
!MESSAGE ******************************
|
|
|
|
!MESSAGE Platform is $(PLATFORM)
|
|
|
|
!MESSAGE ******************************
|
|
|
|
!MESSAGE
|
|
|
|
|
2016-05-01 02:48:14 +00:00
|
|
|
!IF "$(PLATFORM)" == "x86" || "$(PLATFORM)" == "X86"
|
2016-09-21 06:17:02 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /arch:SSE2
|
2016-05-01 02:48:14 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_APP
|
2016-04-26 21:12:21 +00:00
|
|
|
AS = ml.exe
|
|
|
|
ASFLAGS = /nologo /D_M_X86 /W3 /Cx /Zi /safeseh
|
2016-05-01 02:48:14 +00:00
|
|
|
LIB_SRCS = $(LIB_SRCS) rdrand.cpp rdrand.asm
|
2016-04-28 05:36:41 +00:00
|
|
|
LIB_OBJS = $(LIB_OBJS) rdrand.obj rdrand-x86.obj
|
2016-11-14 10:32:58 +00:00
|
|
|
LDFLAGS = $(LDFLAGS) /MACHINE:X86
|
2016-04-28 05:36:41 +00:00
|
|
|
LDLIBS = $(LDLIBS) ws2_32.lib kernel32.lib
|
2016-04-26 21:12:21 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2016-04-28 05:36:41 +00:00
|
|
|
# May need $(VCINSTALLDIR)\bin\amd64\ml64.exe
|
2017-01-18 08:52:21 +00:00
|
|
|
!IF "$(PLATFORM)" == "x64" || "$(PLATFORM)" == "X64" || "$(PLATFORM)" == "amd64"
|
2016-09-21 06:17:02 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /arch:AVX2
|
2016-05-01 02:48:14 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_APP
|
2016-04-26 21:12:21 +00:00
|
|
|
AS = ml64.exe
|
|
|
|
ASFLAGS = /nologo /D_M_X64 /W3 /Cx /Zi
|
2016-05-01 02:48:14 +00:00
|
|
|
LIB_SRCS = $(LIB_SRCS) rdrand.cpp rdrand.asm
|
2016-04-28 05:36:41 +00:00
|
|
|
LIB_OBJS = $(LIB_OBJS) rdrand.obj rdrand-x64.obj x64masm.obj x64dll.obj
|
2016-11-14 10:32:58 +00:00
|
|
|
LDFLAGS = $(LDFLAGS) /MACHINE:X64
|
2016-04-28 05:36:41 +00:00
|
|
|
LDLIBS = $(LDLIBS) ws2_32.lib kernel32.lib
|
2016-04-26 21:12:21 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2017-03-20 19:11:27 +00:00
|
|
|
# We still don't know what we need for ARM64 on Windows. ARM64 and arm64 may be incorrect
|
|
|
|
!IF "$(PLATFORM)" == "ARM" || "$(PLATFORM)" == "arm" || "$(PLATFORM)" == "ARM64" || "$(PLATFORM)" == "arm64"
|
2016-05-01 02:48:14 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
2016-12-18 08:42:34 +00:00
|
|
|
CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
|
2017-08-23 20:13:20 +00:00
|
|
|
LIB_SRCS = $(LIB_SRCS) neon-simd.cpp
|
|
|
|
LIB_OBJS = $(LIB_OBJS) neon-simd.obj
|
2016-05-01 02:48:14 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_APP
|
2016-04-27 00:21:00 +00:00
|
|
|
# LDLIBS = $(LDLIBS) ws2_32.lib
|
2016-04-26 21:12:21 +00:00
|
|
|
!ENDIF
|
2016-04-25 21:45:23 +00:00
|
|
|
|
|
|
|
all: cryptest.exe
|
|
|
|
|
2016-04-27 00:21:00 +00:00
|
|
|
cryptest.exe: pch.pch cryptlib.lib $(TEST_OBJS)
|
2016-04-28 05:36:41 +00:00
|
|
|
$(LD) $(LDFLAGS) $(TEST_OBJS) cryptlib.lib $(LDLIBS) /out:$@
|
2016-04-26 21:12:21 +00:00
|
|
|
|
2016-04-28 05:36:41 +00:00
|
|
|
cryptlib.lib: $(LIB_OBJS)
|
2016-04-25 21:45:23 +00:00
|
|
|
$(AR) $(ARFLAGS) $(LIB_OBJS) /out:$@
|
|
|
|
|
|
|
|
clean:
|
2017-03-08 17:25:21 +00:00
|
|
|
$(RM) /F /Q pch.pch $(LIB_OBJS) pch.obj rdrand-x86.obj rdrand-x64.obj x64masm.obj x64dll.obj cryptlib.lib $(TEST_OBJS) cryptest.exe *.pdb
|
2016-04-27 00:21:00 +00:00
|
|
|
|
|
|
|
# Precompiled header
|
|
|
|
pch.pch: pch.h pch.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) /Yc"pch.h" /Fp"pch.pch" /c pch.cpp
|
|
|
|
|
|
|
|
# No precompiled headers
|
|
|
|
iterhash.obj:
|
|
|
|
$(CXX) $(CXXFLAGS) /Y- /c iterhash.cpp
|
|
|
|
dll.obj:
|
|
|
|
$(CXX) $(CXXFLAGS) /Y- /c dll.cpp
|
2016-04-28 05:36:41 +00:00
|
|
|
rdrand.obj:
|
|
|
|
$(CXX) $(CXXFLAGS) /c rdrand.cpp
|
2016-04-26 21:12:21 +00:00
|
|
|
|
|
|
|
# Built for x86/x64
|
2016-04-28 05:36:41 +00:00
|
|
|
rdrand-x86.obj:
|
|
|
|
$(AS) $(ASFLAGS) /Fo rdrand-x86.obj /c rdrand.asm
|
|
|
|
rdrand-x64.obj:
|
|
|
|
$(AS) $(ASFLAGS) /Fo rdrand-x64.obj /c rdrand.asm
|
2016-04-26 21:12:21 +00:00
|
|
|
x64masm.obj:
|
|
|
|
$(AS) $(ASFLAGS) /Fo x64masm.obj /c x64masm.asm
|
|
|
|
x64dll.obj:
|
|
|
|
$(AS) $(ASFLAGS) /Fo x64dll.obj /c x64dll.asm
|
|
|
|
|
2016-04-27 00:21:00 +00:00
|
|
|
.cpp.obj:
|
2016-04-26 21:12:21 +00:00
|
|
|
$(CXX) $(CXXFLAGS) /c $<
|
2016-04-28 05:36:41 +00:00
|
|
|
|
|
|
|
.asm.obj:
|
|
|
|
$(AS) $(ASFLAGS) /c $<
|