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.
|
|
|
|
|
2018-08-28 01:16:50 +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.
|
|
|
|
|
|
|
|
# The makefile is not intended for production use, though it may be used as a
|
2021-09-07 22:57:09 +00:00
|
|
|
# starting point. For example, you can add switches like /MD and /MDd for
|
2018-08-28 01:16:50 +00:00
|
|
|
# dynamic runtime linking against 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++.
|
|
|
|
|
|
|
|
# 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
|
2019-01-07 19:53:41 +00:00
|
|
|
# additional benefit of using DebugBreak(), and the program does not crash
|
2018-08-28 01:16:50 +00:00
|
|
|
# while you are debugging it like would happen with Posix assert().
|
|
|
|
|
2019-01-08 03:24:01 +00:00
|
|
|
# There is mention of cryptopp.dll, CRYPTOPP_IMPORTS and CRYPTOPP_EXPORTS
|
|
|
|
# below. They are for testing only. Attempting to produce a working DLL on
|
|
|
|
# Windows fails. Too many missing symbols because cryptest.exe exercises
|
|
|
|
# about 80% of the library, but CRYPTOPP_DLL is only used for FIPS algos.
|
2019-01-07 19:53:41 +00:00
|
|
|
|
2018-08-28 01:16:50 +00:00
|
|
|
# The list of LIB_SRCS and TEST_SRCS was generated under Linux with
|
2019-01-28 13:52:56 +00:00
|
|
|
# "make sources | fold -w73 -s". The list of LIB_OBJS and TEST_OBJS was
|
|
|
|
# generated with "make sources | fold -w73 -s | sed 's|.cpp|.obj|g'". The
|
2018-08-28 01:16:50 +00:00
|
|
|
# order of the first three object files are significant. See C++ Static
|
2021-09-07 22:59:05 +00:00
|
|
|
# Initialization Order Fiasco on the Crypto++ wiki for details.
|
2018-08-28 01:16:50 +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
|
2021-09-07 23:01:00 +00:00
|
|
|
# To test with static C++ runtime linking, use the following CXXFLAGS:
|
2016-09-18 03:21:34 +00:00
|
|
|
# - /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
|
|
|
###########################################################################################
|
|
|
|
|
2018-08-28 01:16:50 +00:00
|
|
|
LIB_SRCS = \
|
|
|
|
cryptlib.cpp cpu.cpp integer.cpp 3way.cpp adler32.cpp algebra.cpp \
|
2023-10-06 04:33:33 +00:00
|
|
|
algparam.cpp allocate.cpp arc4.cpp aria.cpp ariatab.cpp asn.cpp \
|
|
|
|
authenc.cpp base32.cpp base64.cpp basecode.cpp bfinit.cpp blake2.cpp \
|
|
|
|
blake2b_simd.cpp blake2s_simd.cpp blowfish.cpp blumshub.cpp camellia.cpp \
|
|
|
|
cast.cpp casts.cpp cbcmac.cpp ccm.cpp chacha.cpp chacha_avx.cpp \
|
|
|
|
chacha_simd.cpp chachapoly.cpp cham.cpp cham_simd.cpp channels.cpp \
|
|
|
|
cmac.cpp crc.cpp crc_simd.cpp darn.cpp default.cpp des.cpp dessp.cpp \
|
|
|
|
dh.cpp dh2.cpp dll.cpp donna_32.cpp donna_64.cpp donna_sse.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.cpp \
|
|
|
|
gcm_simd.cpp gf256.cpp gf2_32.cpp gf2n.cpp gf2n_simd.cpp gfpcrypt.cpp \
|
|
|
|
gost.cpp gzip.cpp hc128.cpp hc256.cpp hex.cpp hight.cpp hmac.cpp \
|
|
|
|
hrtimer.cpp ida.cpp idea.cpp iterhash.cpp kalyna.cpp kalynatab.cpp \
|
|
|
|
keccak.cpp keccak_core.cpp keccak_simd.cpp lea.cpp lea_simd.cpp \
|
|
|
|
lsh256.cpp lsh256_avx.cpp lsh256_sse.cpp lsh512.cpp lsh512_avx.cpp \
|
|
|
|
lsh512_sse.cpp luc.cpp mars.cpp marss.cpp md2.cpp md4.cpp md5.cpp \
|
|
|
|
misc.cpp modes.cpp mqueue.cpp mqv.cpp nbtheory.cpp oaep.cpp osrng.cpp \
|
|
|
|
padlkrng.cpp panama.cpp pkcspad.cpp poly1305.cpp polynomi.cpp \
|
|
|
|
ppc_simd.cpp primetab.cpp pssr.cpp pubkey.cpp queue.cpp rabbit.cpp \
|
|
|
|
rabin.cpp randpool.cpp rc2.cpp rc5.cpp rc6.cpp rdrand.cpp rdtables.cpp \
|
|
|
|
rijndael.cpp rijndael_simd.cpp ripemd.cpp rng.cpp rsa.cpp rw.cpp \
|
|
|
|
safer.cpp salsa.cpp scrypt.cpp seal.cpp seed.cpp serpent.cpp sha.cpp \
|
|
|
|
sha3.cpp sha_simd.cpp shacal2.cpp shacal2_simd.cpp shake.cpp shark.cpp \
|
|
|
|
sharkbox.cpp simeck.cpp simon.cpp simon128_simd.cpp skipjack.cpp sm3.cpp \
|
|
|
|
sm4.cpp sm4_simd.cpp sosemanuk.cpp speck.cpp speck128_simd.cpp \
|
|
|
|
square.cpp squaretb.cpp sse_simd.cpp strciphr.cpp tea.cpp tftables.cpp \
|
|
|
|
threefish.cpp tiger.cpp tigertab.cpp ttmac.cpp tweetnacl.cpp twofish.cpp \
|
|
|
|
vmac.cpp wake.cpp whrlpool.cpp xed25519.cpp xtr.cpp xtrcrypt.cpp xts.cpp \
|
|
|
|
zdeflate.cpp zinflate.cpp zlib.cpp
|
2018-08-28 01:16:50 +00:00
|
|
|
|
|
|
|
LIB_OBJS = \
|
|
|
|
cryptlib.obj cpu.obj integer.obj 3way.obj adler32.obj algebra.obj \
|
2023-10-06 04:33:33 +00:00
|
|
|
algparam.obj allocate.obj arc4.obj aria.obj ariatab.obj asn.obj \
|
|
|
|
authenc.obj base32.obj base64.obj basecode.obj bfinit.obj blake2.obj \
|
|
|
|
blake2b_simd.obj blake2s_simd.obj blowfish.obj blumshub.obj camellia.obj \
|
|
|
|
cast.obj casts.obj cbcmac.obj ccm.obj chacha.obj chacha_avx.obj \
|
|
|
|
chacha_simd.obj chachapoly.obj cham.obj cham_simd.obj channels.obj \
|
|
|
|
cmac.obj crc.obj crc_simd.obj darn.obj default.obj des.obj dessp.obj \
|
|
|
|
dh.obj dh2.obj dll.obj donna_32.obj donna_64.obj donna_sse.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.obj \
|
|
|
|
gcm_simd.obj gf256.obj gf2_32.obj gf2n.obj gf2n_simd.obj gfpcrypt.obj \
|
|
|
|
gost.obj gzip.obj hc128.obj hc256.obj hex.obj hight.obj hmac.obj \
|
|
|
|
hrtimer.obj ida.obj idea.obj iterhash.obj kalyna.obj kalynatab.obj \
|
|
|
|
keccak.obj keccak_core.obj keccak_simd.obj lea.obj lea_simd.obj \
|
|
|
|
lsh256.obj lsh256_avx.obj lsh256_sse.obj lsh512.obj lsh512_avx.obj \
|
|
|
|
lsh512_sse.obj luc.obj mars.obj marss.obj md2.obj md4.obj md5.obj \
|
|
|
|
misc.obj modes.obj mqueue.obj mqv.obj nbtheory.obj oaep.obj osrng.obj \
|
|
|
|
padlkrng.obj panama.obj pkcspad.obj poly1305.obj polynomi.obj \
|
|
|
|
ppc_simd.obj primetab.obj pssr.obj pubkey.obj queue.obj rabbit.obj \
|
|
|
|
rabin.obj randpool.obj rc2.obj rc5.obj rc6.obj rdrand.obj rdtables.obj \
|
|
|
|
rijndael.obj rijndael_simd.obj ripemd.obj rng.obj rsa.obj rw.obj \
|
|
|
|
safer.obj salsa.obj scrypt.obj seal.obj seed.obj serpent.obj sha.obj \
|
|
|
|
sha3.obj sha_simd.obj shacal2.obj shacal2_simd.obj shake.obj shark.obj \
|
|
|
|
sharkbox.obj simeck.obj simon.obj simon128_simd.obj skipjack.obj sm3.obj \
|
|
|
|
sm4.obj sm4_simd.obj sosemanuk.obj speck.obj speck128_simd.obj \
|
|
|
|
square.obj squaretb.obj sse_simd.obj strciphr.obj tea.obj tftables.obj \
|
|
|
|
threefish.obj tiger.obj tigertab.obj ttmac.obj tweetnacl.obj twofish.obj \
|
|
|
|
vmac.obj wake.obj whrlpool.obj xed25519.obj xtr.obj xtrcrypt.obj xts.obj \
|
|
|
|
zdeflate.obj zinflate.obj zlib.obj
|
2018-08-28 01:16:50 +00:00
|
|
|
|
2019-01-08 04:57:36 +00:00
|
|
|
ASM_OBJS = \
|
2023-10-06 04:33:33 +00:00
|
|
|
cpuid64.obj rdrand-x86.obj rdrand-x64.obj rdseed-x86.obj rdseed-x64.obj \
|
|
|
|
x64masm.obj x64dll.obj
|
2019-01-08 04:57:36 +00:00
|
|
|
|
2018-08-28 01:16:50 +00:00
|
|
|
TEST_SRCS = \
|
|
|
|
test.cpp bench1.cpp bench2.cpp bench3.cpp datatest.cpp \
|
2019-01-07 23:32:53 +00:00
|
|
|
dlltest.cpp fipsalgt.cpp validat0.cpp validat1.cpp validat2.cpp \
|
2018-08-28 01:16:50 +00:00
|
|
|
validat3.cpp validat4.cpp validat5.cpp validat6.cpp validat7.cpp \
|
|
|
|
validat8.cpp validat9.cpp validat10.cpp regtest1.cpp regtest2.cpp \
|
|
|
|
regtest3.cpp regtest4.cpp
|
|
|
|
|
|
|
|
TEST_OBJS = \
|
|
|
|
test.obj bench1.obj bench2.obj bench3.obj datatest.obj \
|
2019-01-07 23:32:53 +00:00
|
|
|
dlltest.obj fipsalgt.obj validat0.obj validat1.obj validat2.obj \
|
2018-08-28 01:16:50 +00:00
|
|
|
validat3.obj validat4.obj validat5.obj validat6.obj validat7.obj \
|
|
|
|
validat8.obj validat9.obj validat10.obj regtest1.obj regtest2.obj \
|
|
|
|
regtest3.obj regtest4.obj
|
2016-09-18 03:21:34 +00:00
|
|
|
|
|
|
|
CXX = cl.exe
|
|
|
|
LD = link.exe
|
|
|
|
AR = lib.exe
|
2019-01-08 04:57:36 +00:00
|
|
|
RM = del
|
|
|
|
RMDIR = rd
|
2016-09-18 03:21:34 +00:00
|
|
|
|
2018-12-28 16:43:55 +00:00
|
|
|
# We may misdetect the environment on VS2005 or so. Uncomment as
|
|
|
|
# needed to match the Developer Prompt environment.
|
|
|
|
# PLATFORM = x86
|
|
|
|
# PLATFORM = x64
|
|
|
|
# PLATFORM = arm
|
|
|
|
# PLATFORM = arm64
|
|
|
|
|
2018-04-06 00:34:08 +00:00
|
|
|
# C4231 is needed for VS2008 and below. Lots of noise...
|
|
|
|
CXXFLAGS = /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc
|
2018-08-20 15:42:57 +00:00
|
|
|
LDFLAGS = /nologo /SUBSYSTEM:CONSOLE /DEBUG
|
2016-04-25 21:45:23 +00:00
|
|
|
ARFLAGS = /nologo
|
2016-04-26 21:12:21 +00:00
|
|
|
LDLIBS =
|
|
|
|
|
2019-08-06 04:20:59 +00:00
|
|
|
# Compiler debug build.
|
2018-08-28 01:16:50 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DDEBUG /D_DEBUG /Oi /Oy- /Od /MTd
|
2019-08-06 04:20:59 +00:00
|
|
|
# Compiler release build.
|
2019-01-22 10:11:50 +00:00
|
|
|
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT
|
2019-08-06 04:20:59 +00:00
|
|
|
# Linker debug build.
|
|
|
|
# LDFLAGS = $(LDFLAGS) /DEBUG
|
|
|
|
# Linker release build.
|
|
|
|
LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF
|
2016-12-18 08:42:34 +00:00
|
|
|
|
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
|
2019-08-07 01:01:22 +00:00
|
|
|
LIB_SRCS = $(LIB_SRCS) rdrand.cpp rdrand.asm rdseed.asm
|
|
|
|
LIB_OBJS = $(LIB_OBJS) rdrand-x86.obj rdseed-x86.obj
|
2016-11-14 10:32:58 +00:00
|
|
|
LDFLAGS = $(LDFLAGS) /MACHINE:X86
|
2018-08-18 03:55:39 +00:00
|
|
|
LDLIBS = $(LDLIBS) kernel32.lib
|
2019-08-07 01:01:22 +00:00
|
|
|
RDRAND_OBJ = rdrand-x86.obj
|
|
|
|
RDSEED_OBJ = rdseed-x86.obj
|
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
|
2023-10-06 04:33:33 +00:00
|
|
|
LIB_SRCS = $(LIB_SRCS) cpuid64.asm rdrand.cpp rdrand.asm rdseed.asm
|
|
|
|
LIB_OBJS = $(LIB_OBJS) cpuid64.obj rdrand-x64.obj rdseed-x64.obj x64masm.obj x64dll.obj
|
2016-11-14 10:32:58 +00:00
|
|
|
LDFLAGS = $(LDFLAGS) /MACHINE:X64
|
2018-08-18 03:55:39 +00:00
|
|
|
LDLIBS = $(LDLIBS) kernel32.lib
|
2019-08-07 01:01:22 +00:00
|
|
|
RDRAND_OBJ = rdrand-x64.obj
|
|
|
|
RDSEED_OBJ = rdseed-x64.obj
|
2016-04-26 21:12:21 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2017-03-20 19:11:27 +00:00
|
|
|
!IF "$(PLATFORM)" == "ARM" || "$(PLATFORM)" == "arm" || "$(PLATFORM)" == "ARM64" || "$(PLATFORM)" == "arm64"
|
2019-01-05 01:44:56 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
|
|
|
CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
|
2018-11-10 16:16:39 +00:00
|
|
|
LIB_SRCS = $(LIB_SRCS) neon_simd.cpp
|
2018-11-10 16:55:39 +00:00
|
|
|
LIB_OBJS = $(LIB_OBJS) neon_simd.obj
|
2016-05-01 02:48:14 +00:00
|
|
|
# CXXFLAGS = $(CXXFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_APP
|
2018-08-18 03:55:39 +00:00
|
|
|
# LDLIBS = $(LDLIBS)
|
2016-04-26 21:12:21 +00:00
|
|
|
!ENDIF
|
2016-04-25 21:45:23 +00:00
|
|
|
|
|
|
|
all: cryptest.exe
|
|
|
|
|
2019-01-07 19:53:41 +00:00
|
|
|
# For testing cryptopp.dll and CRYPTOPP_IMPORTS
|
|
|
|
#cryptest.exe: pch.pch cryptopp.lib $(TEST_OBJS)
|
|
|
|
# $(LD) $(LDFLAGS) $(TEST_OBJS) cryptopp.lib $(LDLIBS) /out:$@
|
|
|
|
|
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:$@
|
|
|
|
|
2019-01-07 19:53:41 +00:00
|
|
|
cryptopp.dump: cryptlib.lib
|
|
|
|
dumpbin.exe /LINKERMEMBER cryptlib.lib /OUT:$@
|
2019-01-07 03:16:11 +00:00
|
|
|
|
2019-01-08 08:36:06 +00:00
|
|
|
cryptopp.map: $(LIB_OBJS)
|
2019-01-07 03:51:37 +00:00
|
|
|
$(LD) $(LDFLAGS) /DLL /MAP /MAPINFO:EXPORTS $(LIB_OBJS)
|
|
|
|
mv cryptlib.map cryptopp.map
|
2019-01-07 03:16:11 +00:00
|
|
|
|
2019-01-08 04:57:36 +00:00
|
|
|
cryptopp.def: cryptopp.dump
|
2019-01-07 03:16:11 +00:00
|
|
|
dump2def.exe cryptopp.dump cryptopp.def
|
|
|
|
|
2019-01-07 19:53:41 +00:00
|
|
|
# LD produces 3 output artifacts for cryptopp.dll
|
|
|
|
cryptopp.dll cryptopp.lib cryptopp.exp: $(LIB_OBJS) cryptopp.def
|
|
|
|
$(LD) $(LDFLAGS) /DLL /DEF:cryptopp.def /IGNORE:4102 $(LIB_OBJS) $(LDLIBS) /out:cryptopp.dll
|
2019-01-07 03:16:11 +00:00
|
|
|
|
2019-01-08 04:57:36 +00:00
|
|
|
clean ::
|
2019-02-04 16:28:28 +00:00
|
|
|
$(RM) /F /Q cryptest.exe cryptest.lib cryptest.exp pch.pch 2>nul
|
2019-01-09 06:39:09 +00:00
|
|
|
clean ::
|
2019-02-04 16:28:28 +00:00
|
|
|
$(RM) /F /Q cryptlib.lib cryptlib.exp cryptlib.dll 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
clean ::
|
2019-02-04 16:28:28 +00:00
|
|
|
$(RM) /F /Q cryptopp.dll cryptopp.lib cryptopp.exp cryptopp.def 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
clean ::
|
2019-02-04 16:28:28 +00:00
|
|
|
$(RM) /F /Q pch.obj $(LIB_OBJS) $(ASM_OBJS) $(TEST_OBJS) *.pdb 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
|
|
|
|
distclean :: clean
|
2019-08-27 18:44:27 +00:00
|
|
|
!IF EXIST ("$(USERNAME).sdf")
|
|
|
|
attrib -r -a -s -h "$(USERNAME).sdf" 2>nul
|
|
|
|
$(RM) /F /Q "$(USERNAME).sdf" 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
!ENDIF
|
2019-08-27 18:44:27 +00:00
|
|
|
!IF EXIST ("$(USERNAME).suo")
|
|
|
|
attrib -r -a -s -h $(USERNAME).suo" 2>nul
|
|
|
|
$(RM) /F /Q $(USERNAME).suo" 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
!ENDIF
|
|
|
|
!IF EXIST (Win32\)
|
2019-02-04 16:28:28 +00:00
|
|
|
$(RMDIR) Win32\ /q /s 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
!ENDIF
|
|
|
|
!IF EXIST (x64\)
|
2019-02-04 16:28:28 +00:00
|
|
|
$(RMDIR) x64\ /q /s 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
!ENDIF
|
|
|
|
!IF EXIST (ipch\)
|
2019-02-04 16:28:28 +00:00
|
|
|
$(RMDIR) ipch\ /q /s 2>nul
|
2019-01-08 04:57:36 +00:00
|
|
|
!ENDIF
|
2016-04-27 00:21:00 +00:00
|
|
|
|
|
|
|
# Precompiled header
|
|
|
|
pch.pch: pch.h pch.cpp
|
2022-02-12 22:01:48 +00:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) /Yc"pch.h" /Fp"pch.pch" /c pch.cpp
|
2016-04-27 00:21:00 +00:00
|
|
|
|
|
|
|
# No precompiled headers
|
2019-08-07 01:01:22 +00:00
|
|
|
iterhash.obj: iterhash.h iterhash.cpp
|
2022-02-12 22:01:48 +00:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) /Y- /c iterhash.cpp
|
2019-08-07 01:01:22 +00:00
|
|
|
dll.obj: dll.h dll.cpp
|
2022-02-12 22:01:48 +00:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) /Y- /c dll.cpp
|
2019-08-07 01:01:22 +00:00
|
|
|
rdrand.obj: rdrand.h rdrand.cpp
|
2022-02-12 22:01:48 +00:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) /c rdrand.cpp
|
2016-04-26 21:12:21 +00:00
|
|
|
|
|
|
|
# Built for x86/x64
|
2019-08-07 01:01:22 +00:00
|
|
|
rdrand-x86.obj: rdrand.asm
|
2022-02-12 22:01:48 +00:00
|
|
|
$(AS) $(CPPFLAGS) $(ASFLAGS) /Fo rdrand-x86.obj /c rdrand.asm
|
2019-08-07 01:01:22 +00:00
|
|
|
rdrand-x64.obj: rdrand.asm
|
2022-02-12 22:01:48 +00:00
|
|
|
$(AS) $(CPPFLAGS) $(ASFLAGS) /Fo rdrand-x64.obj /c rdrand.asm
|
2019-08-07 01:01:22 +00:00
|
|
|
rdseed-x86.obj: rdseed.asm
|
2022-02-12 22:01:48 +00:00
|
|
|
$(AS) $(CPPFLAGS) $(ASFLAGS) /Fo rdseed-x86.obj /c rdseed.asm
|
2019-08-07 01:01:22 +00:00
|
|
|
rdseed-x64.obj: rdseed.asm
|
2022-02-12 22:01:48 +00:00
|
|
|
$(AS) $(CPPFLAGS) $(ASFLAGS) /Fo rdseed-x64.obj /c rdseed.asm
|
2019-08-07 01:01:22 +00:00
|
|
|
x64masm.obj: x64masm.asm
|
2022-02-12 22:01:48 +00:00
|
|
|
$(AS) $(CPPFLAGS) $(ASFLAGS) /Fo x64masm.obj /c x64masm.asm
|
2019-08-07 01:01:22 +00:00
|
|
|
x64dll.obj: x64dll.asm
|
2022-02-12 22:01:48 +00:00
|
|
|
$(AS) $(CPPFLAGS) $(ASFLAGS) /Fo x64dll.obj /c x64dll.asm
|
2016-04-26 21:12:21 +00:00
|
|
|
|
2019-01-07 19:53:41 +00:00
|
|
|
# For testing cryptopp.dll and CRYPTOPP_IMPORTS
|
2019-01-07 23:02:06 +00:00
|
|
|
#CXXFLAGS_IMPORTS = /wd4275 /wd4251 /DCRYPTOPP_IMPORTS
|
2019-01-07 19:53:41 +00:00
|
|
|
#test.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#datatest.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#fipstest.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#bench1.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#bench2.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#bench3.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#regtest1.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#regtest2.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#regtest3.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#regtest4.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat1.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat2.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat3.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat4.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat5.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat6.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat7.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat8.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat9.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 23:02:06 +00:00
|
|
|
#validat10.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_IMPORTS) /c $?
|
2019-01-07 19:53:41 +00:00
|
|
|
|
2019-01-07 21:10:18 +00:00
|
|
|
# For testing cryptopp.dll and CRYPTOPP_EXPORTS
|
2019-01-07 23:02:06 +00:00
|
|
|
#CXXFLAGS_EXPORTS = /wd4275 /wd4251 /DCXXFLAGS_EXPORTS
|
2019-01-07 21:10:18 +00:00
|
|
|
#.cpp.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_EXPORTS) /c $<
|
2019-01-07 21:10:18 +00:00
|
|
|
|
2016-04-27 00:21:00 +00:00
|
|
|
.cpp.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) /c $<
|
2016-04-28 05:36:41 +00:00
|
|
|
|
|
|
|
.asm.obj:
|
2022-02-12 22:01:48 +00:00
|
|
|
$(AS) $(CPPFLAGS) $(ASFLAGS) /c $<
|