# For the license, see the LICENSE file in the root directory.
#
+AM_CFLAGS = @AM_CFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ $(HARDENING_LDFLAGS) $(SANITIZERS) $(FUZZER)
+
lib_LTLIBRARIES=libtpms.la
common_CFLAGS = -include tpm_library_conf.h \
-I$(top_srcdir)/include/libtpms \
-I$(top_builddir)/include/libtpms \
+ $(AM_CFLAGS) \
$(HARDENING_CFLAGS) \
$(SANITIZERS) \
$(FUZZER)
-
-LDFLAGS += $(HARDENING_LDFLAGS) $(SANITIZERS) $(FUZZER)
+# build with libtpms callback support
+common_CFLAGS += -DTPM_LIBTPMS_CALLBACKS
+# let the default NVRAM write to disk
+common_CFLAGS += -DTPM_NV_DISK
#
# TPM1.2
libtpms_tpm12_la_CFLAGS += -DTPM_ENABLE_ACTIVATE
# build with AES support for symmetric crypto
libtpms_tpm12_la_CFLAGS += -DTPM_AES
-# build with libtpms callback support
-libtpms_tpm12_la_CFLAGS += -DTPM_LIBTPMS_CALLBACKS
-# let the default NVRAM write to disk
-libtpms_tpm12_la_CFLAGS += -DTPM_NV_DISK
# build a POSIX type of TPM
libtpms_tpm12_la_CFLAGS += -DTPM_POSIX
# build without maintenance commands
tpm12/tpm_cryptoh.c \
tpm12/tpm_counter.c \
tpm12/tpm_daa.c \
- tpm12/tpm_debug.c \
tpm12/tpm_delegate.c \
tpm12/tpm_digest.c \
tpm12/tpm_error.c \
tpm12/tpm_key.c \
tpm12/tpm_load.c \
tpm12/tpm_maint.c \
- tpm12/tpm_memory.c \
tpm12/tpm_migration.c \
tpm12/tpm_nonce.c \
- tpm12/tpm_nvfile.c \
tpm12/tpm_nvram.c \
+ tpm12/tpm_openssl_helpers.c \
tpm12/tpm_owner.c \
tpm12/tpm_pcr.c \
tpm12/tpm_permanent.c \
tpm12/tpm_crypto.h \
tpm12/tpm_cryptoh.h \
tpm12/tpm_daa.h \
- tpm12/tpm_debug.h \
+ tpm_debug.h \
tpm12/tpm_delegate.h \
tpm12/tpm_digest.h \
tpm12/tpm_global.h \
tpm12/tpm_maint.h \
tpm12/tpm_migration.h \
tpm12/tpm_nonce.h \
- tpm12/tpm_nvfile.h \
+ tpm_nvfile.h \
tpm12/tpm_nvram_const.h \
tpm12/tpm_nvram.h \
+ tpm12/tpm_openssl_helpers.h \
tpm12/tpm_owner.h \
tpm12/tpm_pcr.h \
tpm12/tpm_permanent.h \
libtpms_tpm2_la_CFLAGS += -D_POSIX_
libtpms_tpm2_la_CFLAGS += -DTPM_POSIX
-# build with libtpms callback support
-libtpms_tpm2_la_CFLAGS += -DTPM_LIBTPMS_CALLBACKS
libtpms_tpm2_la_SOURCES = \
+ tpm2/ACT_spt.c \
+ tpm2/ACTCommands.c \
tpm2/AlgorithmCap.c \
tpm2/AlgorithmTests.c \
tpm2/AsymmetricCommands.c \
tpm2/CryptSelfTest.c \
tpm2/CryptUtil.c \
tpm2/DA.c \
+ tpm2/DebugHelpers.c \
tpm2/DictionaryCommands.c \
tpm2/DuplicationCommands.c \
tpm2/EACommands.c \
tpm2/ObjectCommands.c \
tpm2/Object_spt.c \
tpm2/PCR.c \
+ tpm2/PlatformACT.c \
tpm2/PlatformData.c \
tpm2/Policy_spt.c \
tpm2/Power.c \
tpm2/TestingCommands.c \
tpm2/Ticket.c \
tpm2/Time.c \
+ tpm2/TpmAsn1.c \
tpm2/TpmSizeChecks.c \
tpm2/TPMCmdp.c \
tpm2/TpmFail.c \
tpm2/Unique.c \
tpm2/Unmarshal.c \
tpm2/Vendor_TCG_Test.c \
+ tpm2/X509_ECC.c \
+ tpm2/X509_RSA.c \
+ tpm2/X509_spt.c \
tpm_tpm2_interface.c \
tpm_tpm2_tis.c \
\
+ tpm2/BackwardsCompatibilityObject.c \
tpm2/LibtpmsCallbacks.c \
tpm2/NVMarshal.c \
tpm2/StateMarshal.c \
tpm2/crypto/CryptCmac_fp.h \
tpm2/crypto/CryptDes_fp.h \
tpm2/crypto/CryptEcc.h \
+ tpm2/crypto/CryptEccCrypt_fp.h \
tpm2/crypto/CryptEccKeyExchange_fp.h \
tpm2/crypto/CryptEccMain_fp.h \
tpm2/crypto/CryptEccSignature_fp.h \
tpm2/crypto/CryptSym_fp.h \
tpm2/crypto/CryptTest.h \
tpm2/crypto/CryptUtil_fp.h \
+ tpm2/ACT.h \
+ tpm2/ACT_spt_fp.h \
+ tpm2/ACT_SetTimeout_fp.h \
tpm2/ActivateCredential_fp.h \
tpm2/AlgorithmCap_fp.h \
tpm2/AlgorithmTests_fp.h \
tpm2/Bits_fp.h \
tpm2/Capabilities.h \
tpm2/CertifyCreation_fp.h \
+ tpm2/CertifyX509_fp.h \
tpm2/Certify_fp.h \
tpm2/ChangeEPS_fp.h \
tpm2/ChangePPS_fp.h \
tpm2/CreatePrimary_fp.h \
tpm2/CryptSelfTest_fp.h \
tpm2/DA_fp.h \
+ tpm2/DebugHelpers_fp.h \
tpm2/DictionaryAttackLockReset_fp.h \
tpm2/DictionaryAttackParameters_fp.h \
tpm2/Duplicate_fp.h \
tpm2/Hierarchy_fp.h \
tpm2/HMAC_fp.h \
tpm2/HMAC_Start_fp.h \
- tpm2/Implementation.h \
tpm2/Import_fp.h \
tpm2/IncrementalSelfTest_fp.h \
tpm2/InternalRoutines.h \
tpm2/Marshal_fp.h \
tpm2/MathOnByteBuffers_fp.h \
tpm2/Memory_fp.h \
+ tpm2/MinMax.h \
tpm2/NV_Certify_fp.h \
tpm2/NV_ChangeAuth_fp.h \
tpm2/NV_DefineSpace_fp.h \
tpm2/NV_UndefineSpaceSpecial_fp.h \
tpm2/NV_Write_fp.h \
tpm2/NV_WriteLock_fp.h \
+ tpm2/OIDs.h \
tpm2/ObjectChangeAuth_fp.h \
tpm2/Object_fp.h \
tpm2/Object_spt_fp.h \
tpm2/PCR_Reset_fp.h \
tpm2/PCR_SetAuthPolicy_fp.h \
tpm2/PCR_SetAuthValue_fp.h \
+ tpm2/Platform.h \
+ tpm2/PlatformACT.h \
+ tpm2/PlatformACT_fp.h \
+ tpm2/PlatformClock.h \
tpm2/PlatformData.h \
tpm2/Platform_fp.h \
tpm2/PolicyAuthorize_fp.h \
tpm2/Ticket_fp.h \
tpm2/Time_fp.h \
tpm2/TPMB.h \
+ tpm2/TpmAlgorithmDefines.h \
+ tpm2/TpmAsn1.h \
+ tpm2/TpmAsn1_fp.h \
tpm2/TpmBuildSwitches.h \
tpm2/TpmError.h \
tpm2/TpmFail_fp.h \
+ tpm2/TpmProfile.h \
tpm2/Tpm.h \
tpm2/_TPM_Hash_Data_fp.h \
tpm2/_TPM_Hash_End_fp.h \
tpm2/VendorString.h \
tpm2/Vendor_TCG_Test_fp.h \
tpm2/VerifySignature_fp.h \
+ tpm2/X509.h \
+ tpm2/X509_ECC_fp.h \
+ tpm2/X509_RSA_fp.h \
+ tpm2/X509_spt_fp.h \
tpm2/ZGen_2Phase_fp.h \
\
+ tpm2/BackwardsCompatibility.h \
+ tpm2/BackwardsCompatibilityObject.h \
tpm2/LibtpmsCallbacks.h \
tpm2/NVMarshal.h \
tpm2/StateMarshal.h \
tpm2/crypto/openssl/CryptEccMain.c \
tpm2/crypto/openssl/CryptEccSignature.c \
tpm2/crypto/openssl/CryptHash.c \
- tpm2/crypto/openssl/CryptHashData.c \
tpm2/crypto/openssl/CryptPrime.c \
tpm2/crypto/openssl/CryptPrimeSieve.c \
tpm2/crypto/openssl/CryptRand.c \
tpm2/crypto/openssl/CryptRsa.c \
tpm2/crypto/openssl/CryptSmac.c \
tpm2/crypto/openssl/CryptSym.c \
+ tpm2/crypto/openssl/ExpDCache.c \
tpm2/crypto/openssl/Helpers.c \
tpm2/crypto/openssl/TpmToOsslDesSupport.c \
tpm2/crypto/openssl/TpmToOsslMath.c \
tpm2/crypto/openssl/TpmToOsslSupport.c
noinst_HEADERS += \
+ tpm2/crypto/openssl/ConsttimeUtils.h \
tpm2/crypto/openssl/BnConvert_fp.h \
tpm2/crypto/openssl/BnMath_fp.h \
tpm2/crypto/openssl/BnMemory_fp.h \
tpm2/crypto/openssl/BnValues.h \
+ tpm2/crypto/openssl/ExpDCache_fp.h \
tpm2/crypto/openssl/Helpers_fp.h \
tpm2/crypto/openssl/LibSupport.h \
tpm2/crypto/openssl/TpmToOsslDesSupport_fp.h \
#
libtpms_la_SOURCES = \
- tpm_library.c
+ tpm_debug.c \
+ tpm_library.c \
+ tpm_memory.c \
+ tpm_nvfile.c
libtpms_la_CFLAGS = $(common_CFLAGS)
libtpms_la_LDFLAGS = -version-info $(LIBTPMS_VERSION_INFO) \
- -no-undefined
+ -no-undefined $(AM_LDFLAGS)
if HAVE_VERSION_SCRIPT
libtpms_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtpms.syms
endif
-LDFLAGS_ARCH = $(findstring -m32, $(CFLAGS))
-LDFLAGS_ARCH += $(findstring -m64, $(CFLAGS))
-LDFLAGS_ARCH += $(findstring -m32, $(LDFLAGS))
-LDFLAGS_ARCH += $(findstring -m64, $(LDFLAGS))
+LDFLAGS_ARCH = $(findstring -m32, $(AM_CFLAGS))
+LDFLAGS_ARCH += $(findstring -m64, $(AM_CFLAGS))
+LDFLAGS_ARCH += $(findstring -m32, $(AM_LDFLAGS))
+LDFLAGS_ARCH += $(findstring -m64, $(AM_LDFLAGS))
check-local: SHELL?="/usr/bin/env bash"
check-local: