1 # $NetBSD: Makefile,v 1.6 2025/07/14 10:25:51 kre Exp $ 2 .include "../Makefile.inc" 3 4 CPPFLAGS+=-DAPPID=\"TSPI\" -DVAR_PREFIX=\"/var\" -DETC_PREFIX=\"/etc\" 5 CPPFLAGS+=-DTSS_BUILD_TSS12 -DTSS_BUILD_TRANSPORT -DTSS_BUILD_TICK 6 CPPFLAGS+=-DTSS_BUILD_COUNTER -DTSS_BUILD_AUTH -DTSS_BUILD_GETSET 7 CPPFLAGS+=-DTSS_BUILD_RANDOM -DTSS_BUILD_CAPS -DTSS_BUILD_CAPS_TPM 8 CPPFLAGS+=-DTSS_BUILD_POLICY -DTSS_BUILD_DIR -DTSS_BUILD_PCR_EVENTS 9 CPPFLAGS+=-DTSS_BUILD_HASH -DTSS_BUILD_SIGN -DTSS_BUILD_QUOTE 10 CPPFLAGS+=-DTSS_BUILD_PCR_COMP -DTSS_BUILD_SEAL -DTSS_BUILD_CHANGEAUTH 11 CPPFLAGS+=-DTSS_BUILD_BIND -DTSS_BUILD_OWN -DTSS_BUILD_PS -DTSS_BUILD_ADMIN 12 CPPFLAGS+=-DTSS_BUILD_AIK -DTSS_BUILD_EK -DTSS_BUILD_CERTIFY -DTSS_BUILD_KEY 13 CPPFLAGS+=-DTSS_BUILD_MAINT -DTSS_BUILD_MIGRATION -DTSS_BUILD_PCR_EXTEND 14 CPPFLAGS+=-DTSS_BUILD_SELFTEST -DTSS_BUILD_PCRS_LIST -DTSS_BUILD_HASH_LIST 15 CPPFLAGS+=-DTSS_BUILD_ENCDATA_LIST -DTSS_BUILD_RSAKEY_LIST -DTSS_BUILD_ASN1 16 CPPFLAGS+=-DTSS_BUILD_AUDIT -DTSS_BUILD_SEALX -DTSS_BUILD_QUOTE2 17 CPPFLAGS+=-DTSS_BUILD_NV -DTSS_BUILD_DELEGATION -DTSS_BUILD_CMK 18 19 COPTS.rpc.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 20 COPTS.hash.c+= -Wno-error=deprecated-declarations # openssl3 PKCS1_MGF 21 COPTS.rsa.c+= -Wno-error=deprecated-declarations # openssl3 RSA_* 22 23 TSPI=${DIST}/src/tspi 24 TRSPI=${DIST}/src/trspi 25 .PATH.c: ${TSPI} ${TSPI}/rpc ${TSPI}/rpc/tcstp ${TSPI}/ps ${TRSPI} ${TRSPI}/crypto/openssl 26 27 SHLIB_MAJOR=4 28 SHLIB_MINOR=0 29 30 LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto 31 LIB=tspi 32 SRCS=\ 33 hosttable.c \ 34 log.c \ 35 obj.c \ 36 obj_context.c \ 37 obj_delfamily.c \ 38 obj_encdata.c \ 39 obj_hash.c \ 40 obj_migdata.c \ 41 obj_nv.c \ 42 obj_pcrs.c \ 43 obj_policy.c \ 44 obj_rsakey.c \ 45 obj_tpm.c \ 46 ps_utils.c \ 47 rpc.c \ 48 rpc_admin.c \ 49 rpc_aik.c \ 50 rpc_audit.c \ 51 rpc_auth.c \ 52 rpc_bind.c \ 53 rpc_caps.c \ 54 rpc_caps_tpm.c \ 55 rpc_certify.c \ 56 rpc_changeauth.c \ 57 rpc_cmk.c \ 58 rpc_context.c \ 59 rpc_counter.c \ 60 rpc_delegate.c \ 61 rpc_dir.c \ 62 rpc_ek.c \ 63 rpc_evlog.c \ 64 rpc_key.c \ 65 rpc_maint.c \ 66 rpc_migration.c \ 67 rpc_nv.c \ 68 rpc_oper.c \ 69 rpc_own.c \ 70 rpc_pcr_extend.c \ 71 rpc_ps.c \ 72 rpc_quote.c \ 73 rpc_quote2.c \ 74 rpc_random.c \ 75 rpc_seal.c \ 76 rpc_selftest.c \ 77 rpc_sign.c \ 78 rpc_tick.c \ 79 rpc_transport.c \ 80 spi_utils.c \ 81 ssl_ui.c \ 82 tcs_api.c \ 83 tsp_admin.c \ 84 tsp_aik.c \ 85 tsp_asym.c \ 86 tsp_audit.c \ 87 tsp_auth.c \ 88 tsp_bind.c \ 89 tsp_caps.c \ 90 tsp_caps_tpm.c \ 91 tsp_certify.c \ 92 tsp_changeauth.c \ 93 tsp_context_mem.c \ 94 tsp_counter.c \ 95 tsp_delegate.c \ 96 tsp_dir.c \ 97 tsp_ek.c \ 98 tsp_get_flags.c \ 99 tsp_key.c \ 100 tsp_maint.c \ 101 tsp_migration.c \ 102 tsp_nv.c \ 103 tsp_oper.c \ 104 tsp_own.c \ 105 tsp_pcr.c \ 106 tsp_pcr_extend.c \ 107 tsp_policy.c \ 108 tsp_ps.c \ 109 tsp_quote.c \ 110 tsp_quote2.c \ 111 tsp_random.c \ 112 tsp_seal.c \ 113 tsp_selftest.c \ 114 tsp_sign.c \ 115 tsp_tcsi_param.c \ 116 tsp_tick.c \ 117 tspi_admin.c \ 118 tspi_aik.c \ 119 tspi_asn1.c \ 120 tspi_audit.c \ 121 tspi_bind.c \ 122 tspi_caps.c \ 123 tspi_caps_tpm.c \ 124 tspi_certify.c \ 125 tspi_changeauth.c \ 126 tspi_cmk.c \ 127 tspi_context.c \ 128 tspi_counter.c \ 129 tspi_delegate.c \ 130 tspi_dir.c \ 131 tspi_ek.c \ 132 tspi_getset.c \ 133 tspi_hash.c \ 134 tspi_key.c \ 135 tspi_maint.c \ 136 tspi_migration.c \ 137 tspi_nv.c \ 138 tspi_oper.c \ 139 tspi_own.c \ 140 tspi_pcr_comp.c \ 141 tspi_pcr_comp12.c \ 142 tspi_pcr_events.c \ 143 tspi_pcr_extend.c \ 144 tspi_policy.c \ 145 tspi_ps.c \ 146 tspi_quote.c \ 147 tspi_quote2.c \ 148 tspi_random.c \ 149 tspi_seal.c \ 150 tspi_selftest.c \ 151 tspi_sign.c \ 152 tspi_tick.c \ 153 tspi_transport.c \ 154 tspps.c \ 155 hash.c \ 156 rsa.c \ 157 symmetric.c \ 158 trousers.c 159 160 .SUFFIXES: .h 161 .PATH.h: ${DIST}/src/include 162 INCSDIR=/usr/include 163 INCS=\ 164 trousers/trousers.h \ 165 trousers/tss.h \ 166 tss/compat11b.h \ 167 tss/platform.h \ 168 tss/tcpa_defines.h \ 169 tss/tcpa_error.h \ 170 tss/tcpa_struct.h \ 171 tss/tcpa_typedef.h \ 172 tss/tcs.h \ 173 tss/tcs_defines.h \ 174 tss/tcs_error.h \ 175 tss/tcs_structs.h \ 176 tss/tcs_typedef.h \ 177 tss/tddl_error.h \ 178 tss/tddlapi_error.h \ 179 tss/tddli.h \ 180 tss/tpm.h \ 181 tss/tpm_error.h \ 182 tss/tpm_ordinal.h \ 183 tss/tspi.h \ 184 tss/tss_defines.h \ 185 tss/tss_error.h \ 186 tss/tss_error_basics.h \ 187 tss/tss_structs.h \ 188 tss/tss_typedef.h 189 190 .SUFFIXES: .3 191 .PATH.3: ${DIST}/man/man3 192 MAN=\ 193 Tspi_ChangeAuth.3 \ 194 Tspi_ChangeAuthAsym.3 \ 195 Tspi_Context_Close.3 \ 196 Tspi_Context_CloseObject.3 \ 197 Tspi_Context_Connect.3 \ 198 Tspi_Context_Create.3 \ 199 Tspi_Context_CreateObject.3 \ 200 Tspi_Context_FreeMemory.3 \ 201 Tspi_Context_GetCapability.3 \ 202 Tspi_Context_GetDefaultPolicy.3 \ 203 Tspi_Context_GetKeyByPublicInfo.3 \ 204 Tspi_Context_GetKeyByUUID.3 \ 205 Tspi_Context_GetRegisteredKeysByUUID.3 \ 206 Tspi_Context_GetRegisteredKeysByUUID2.3 \ 207 Tspi_Context_GetTpmObject.3 \ 208 Tspi_Context_LoadKeyByBlob.3 \ 209 Tspi_Context_LoadKeyByUUID.3 \ 210 Tspi_Context_RegisterKey.3 \ 211 Tspi_Context_UnregisterKey.3 \ 212 Tspi_DAA_IssueCredential.3 \ 213 Tspi_DAA_IssueInit.3 \ 214 Tspi_DAA_IssueSetup.3 \ 215 Tspi_DAA_IssuerKeyVerification.3 \ 216 Tspi_DAA_VerifyInit.3 \ 217 Tspi_DAA_VerifySignature.3 \ 218 Tspi_Data_Bind.3 \ 219 Tspi_Data_Seal.3 \ 220 Tspi_Data_Unbind.3 \ 221 Tspi_Data_Unseal.3 \ 222 Tspi_DecodeBER_TssBlob.3 \ 223 Tspi_EncodeDER_TssBlob.3 \ 224 Tspi_GetAttribData.3 \ 225 Tspi_GetAttribUint32.3 \ 226 Tspi_GetPolicyObject.3 \ 227 Tspi_Hash_GetHashValue.3 \ 228 Tspi_Hash_SetHashValue.3 \ 229 Tspi_Hash_Sign.3 \ 230 Tspi_Hash_UpdateHashValue.3 \ 231 Tspi_Hash_VerifySignature.3 \ 232 Tspi_Key_CertifyKey.3 \ 233 Tspi_Key_ConvertMigrationBlob.3 \ 234 Tspi_Key_CreateKey.3 \ 235 Tspi_Key_CreateMigrationBlob.3 \ 236 Tspi_Key_GetPubKey.3 \ 237 Tspi_Key_LoadKey.3 \ 238 Tspi_Key_UnloadKey.3 \ 239 Tspi_Key_WrapKey.3 \ 240 Tspi_PcrComposite_GetPcrValue.3 \ 241 Tspi_PcrComposite_SelectPcrIndex.3 \ 242 Tspi_PcrComposite_SetPcrValue.3 \ 243 Tspi_Policy_AssignToObject.3 \ 244 Tspi_Policy_FlushSecret.3 \ 245 Tspi_Policy_SetSecret.3 \ 246 Tspi_SetAttribData.3 \ 247 Tspi_SetAttribUint32.3 \ 248 Tspi_TPM_AuthorizeMigrationTicket.3 \ 249 Tspi_TPM_CMKSetRestrictions.3 \ 250 Tspi_TPM_CertifySelfTest.3 \ 251 Tspi_TPM_CheckMaintenancePubKey.3 \ 252 Tspi_TPM_ClearOwner.3 \ 253 Tspi_TPM_CollateIdentityRequest.3 \ 254 Tspi_TPM_CreateEndorsementKey.3 \ 255 Tspi_TPM_CreateMaintenanceArchive.3 \ 256 Tspi_TPM_DAA_JoinCreateDaaPubKey.3 \ 257 Tspi_TPM_DAA_JoinInit.3 \ 258 Tspi_TPM_DAA_JoinStoreCredential.3 \ 259 Tspi_TPM_DAA_Sign.3 \ 260 Tspi_TPM_DirRead.3 \ 261 Tspi_TPM_DirWrite.3 \ 262 Tspi_TPM_GetAuditDigest.3 \ 263 Tspi_TPM_GetCapability.3 \ 264 Tspi_TPM_GetEvent.3 \ 265 Tspi_TPM_GetEventLog.3 \ 266 Tspi_TPM_GetEvents.3 \ 267 Tspi_TPM_GetPubEndorsementKey.3 \ 268 Tspi_TPM_GetRandom.3 \ 269 Tspi_TPM_GetStatus.3 \ 270 Tspi_TPM_GetTestResult.3 \ 271 Tspi_TPM_KillMaintenanceFeature.3 \ 272 Tspi_TPM_LoadMaintenancePubKey.3 \ 273 Tspi_TPM_OwnerGetSRKPubKey.3 \ 274 Tspi_TPM_PcrExtend.3 \ 275 Tspi_TPM_PcrRead.3 \ 276 Tspi_TPM_Quote.3 \ 277 Tspi_TPM_SelfTestFull.3 \ 278 Tspi_TPM_SetStatus.3 \ 279 Tspi_TPM_StirRandom.3 \ 280 Tspi_TPM_TakeOwnership.3 281 282 .include <bsd.lib.mk> 283