]>
Commit | Line | Data |
---|---|---|
a0098eda CB |
1 | # |
2 | # src/Makefile.am | |
3 | # | |
4 | # For the license, see the LICENSE file in the root directory. | |
5 | # | |
6 | ||
7 | lib_LTLIBRARIES=libtpms.la | |
8 | ||
ccce8b5f SB |
9 | common_CFLAGS = -include tpm_library_conf.h \ |
10 | -I$(top_srcdir)/include/libtpms \ | |
8373f098 | 11 | -I$(top_builddir)/include/libtpms \ |
48dabdbd MAL |
12 | $(HARDENING_CFLAGS) \ |
13 | $(SANITIZERS) \ | |
14 | $(FUZZER) | |
ccce8b5f | 15 | |
48dabdbd | 16 | |
7a0e7052 | 17 | LDFLAGS += $(HARDENING_LDFLAGS) $(SANITIZERS) $(FUZZER) |
ec0f7ed1 | 18 | |
23b958af SB |
19 | # |
20 | # TPM1.2 | |
21 | # | |
a0098eda | 22 | |
23b958af | 23 | noinst_LTLIBRARIES = libtpms_tpm12.la |
a0098eda | 24 | |
23b958af SB |
25 | libtpms_la_LIBADD = libtpms_tpm12.la |
26 | ||
27 | libtpms_tpm12_la_LIBADD = | |
28 | ||
ccce8b5f | 29 | libtpms_tpm12_la_CFLAGS = $(common_CFLAGS) |
a0098eda CB |
30 | |
31 | #Build 1.2 TPM | |
23b958af | 32 | libtpms_tpm12_la_CFLAGS += -DTPM_V12 |
a0098eda | 33 | # build a PC Client TPM |
23b958af | 34 | libtpms_tpm12_la_CFLAGS += -DTPM_PCCLIENT |
a0098eda | 35 | # upon initialization have the TPM load the volatile state |
23b958af | 36 | libtpms_tpm12_la_CFLAGS += -DTPM_VOLATILE_LOAD |
a0098eda | 37 | # build the TPM enabled and activated |
23b958af | 38 | libtpms_tpm12_la_CFLAGS += -DTPM_ENABLE_ACTIVATE |
a0098eda | 39 | # build with AES support for symmetric crypto |
23b958af | 40 | libtpms_tpm12_la_CFLAGS += -DTPM_AES |
a0098eda | 41 | # build with libtpms callback support |
23b958af | 42 | libtpms_tpm12_la_CFLAGS += -DTPM_LIBTPMS_CALLBACKS |
a0098eda | 43 | # let the default NVRAM write to disk |
23b958af | 44 | libtpms_tpm12_la_CFLAGS += -DTPM_NV_DISK |
a0098eda | 45 | # build a POSIX type of TPM |
23b958af | 46 | libtpms_tpm12_la_CFLAGS += -DTPM_POSIX |
402fc2b1 SB |
47 | # build without maintenance commands |
48 | libtpms_tpm12_la_CFLAGS += -DTPM_NOMAINTENANCE_COMMANDS | |
a0098eda | 49 | |
23b958af | 50 | libtpms_tpm12_la_CFLAGS += @DEBUG_DEFINES@ |
a0098eda CB |
51 | |
52 | CRYPTO_OBJFILES = | |
53 | ||
23b958af SB |
54 | libtpms_tpm12_la_SOURCES = \ |
55 | tpm12/tpm_admin.c \ | |
56 | tpm12/tpm_audit.c \ | |
57 | tpm12/tpm_auth.c \ | |
58 | tpm12/tpm_cryptoh.c \ | |
59 | tpm12/tpm_counter.c \ | |
60 | tpm12/tpm_daa.c \ | |
61 | tpm12/tpm_debug.c \ | |
62 | tpm12/tpm_delegate.c \ | |
63 | tpm12/tpm_digest.c \ | |
64 | tpm12/tpm_error.c \ | |
65 | tpm12/tpm_global.c \ | |
66 | tpm12/tpm_identity.c \ | |
67 | tpm12/tpm_init.c \ | |
68 | tpm12/tpm_libtpms_io.c \ | |
69 | tpm12/tpm_key.c \ | |
70 | tpm12/tpm_load.c \ | |
71 | tpm12/tpm_maint.c \ | |
72 | tpm12/tpm_memory.c \ | |
73 | tpm12/tpm_migration.c \ | |
74 | tpm12/tpm_nonce.c \ | |
75 | tpm12/tpm_nvfile.c \ | |
76 | tpm12/tpm_nvram.c \ | |
56351430 | 77 | tpm12/tpm_openssl_helpers.c \ |
23b958af SB |
78 | tpm12/tpm_owner.c \ |
79 | tpm12/tpm_pcr.c \ | |
80 | tpm12/tpm_permanent.c \ | |
81 | tpm12/tpm_platform.c \ | |
82 | tpm12/tpm_process.c \ | |
83 | tpm12/tpm_secret.c \ | |
84 | tpm12/tpm_session.c \ | |
85 | tpm12/tpm_sizedbuffer.c \ | |
86 | tpm12/tpm_startup.c \ | |
87 | tpm12/tpm_store.c \ | |
88 | tpm12/tpm_storage.c \ | |
89 | tpm12/tpm_ticks.c \ | |
90 | tpm12/tpm_time.c \ | |
23b958af SB |
91 | tpm12/tpm_transport.c \ |
92 | tpm12/tpm_ver.c \ | |
39c9604a SB |
93 | tpm12/tpm_svnrevision.c \ |
94 | tpm_tpm12_interface.c \ | |
95 | tpm_tpm12_tis.c | |
a0098eda CB |
96 | |
97 | noinst_HEADERS = \ | |
23b958af SB |
98 | tpm12/tpm_admin.h \ |
99 | tpm12/tpm_audit.h \ | |
100 | tpm12/tpm_auth.h \ | |
101 | tpm12/tpm_commands.h \ | |
102 | tpm12/tpm_constants.h \ | |
103 | tpm12/tpm_counter.h \ | |
104 | tpm12/tpm_crypto.h \ | |
105 | tpm12/tpm_cryptoh.h \ | |
106 | tpm12/tpm_daa.h \ | |
107 | tpm12/tpm_debug.h \ | |
108 | tpm12/tpm_delegate.h \ | |
109 | tpm12/tpm_digest.h \ | |
110 | tpm12/tpm_global.h \ | |
111 | tpm12/tpm_identity.h \ | |
112 | tpm12/tpm_init.h \ | |
113 | tpm12/tpm_io.h \ | |
114 | tpm12/tpm_key.h \ | |
a0098eda CB |
115 | tpm_library_conf.h \ |
116 | tpm_library_intern.h \ | |
23b958af SB |
117 | tpm12/tpm_load.h \ |
118 | tpm12/tpm_maint.h \ | |
119 | tpm12/tpm_migration.h \ | |
120 | tpm12/tpm_nonce.h \ | |
121 | tpm12/tpm_nvfile.h \ | |
122 | tpm12/tpm_nvram_const.h \ | |
123 | tpm12/tpm_nvram.h \ | |
56351430 | 124 | tpm12/tpm_openssl_helpers.h \ |
23b958af SB |
125 | tpm12/tpm_owner.h \ |
126 | tpm12/tpm_pcr.h \ | |
127 | tpm12/tpm_permanent.h \ | |
128 | tpm12/tpm_platform.h \ | |
129 | tpm12/tpm_process.h \ | |
130 | tpm12/tpm_secret.h \ | |
131 | tpm12/tpm_session.h \ | |
132 | tpm12/tpm_sizedbuffer.h \ | |
133 | tpm12/tpm_startup.h \ | |
134 | tpm12/tpm_storage.h \ | |
135 | tpm12/tpm_store.h \ | |
136 | tpm12/tpm_structures.h \ | |
137 | tpm12/tpm_svnrevision.h \ | |
138 | tpm12/tpm_ticks.h \ | |
139 | tpm12/tpm_time.h \ | |
140 | tpm12/tpm_transport.h \ | |
141 | tpm12/tpm_ver.h | |
a0098eda CB |
142 | |
143 | if LIBTPMS_USE_FREEBL | |
144 | ||
23b958af SB |
145 | libtpms_tpm12_la_SOURCES += tpm12/tpm_crypto_freebl.c |
146 | libtpms_tpm12_la_LIBADD += -lfreebl -lgmp -lnspr4 -lnssutil3 -lnss3 | |
a0098eda CB |
147 | |
148 | #work-around broken freebl includes | |
23b958af | 149 | libtpms_tpm12_la_CFLAGS += $(shell [ ! -r /usr/include/nss3/alghmac.h ] && \ |
a0098eda CB |
150 | touch alghmac.h && \ |
151 | echo -I./) | |
23b958af SB |
152 | # tpm12/tpm_crypto_freebl.c: work around #include "blapi.h" : should be <nss3/blapi.h> |
153 | libtpms_tpm12_la_CFLAGS += $(shell nss-config --cflags) | |
a0098eda | 154 | #including nss3/blapi.h requires a look into nspr4 dir |
23b958af | 155 | libtpms_tpm12_la_CFLAGS += $(shell nspr-config --cflags) |
a0098eda CB |
156 | |
157 | else | |
158 | ||
159 | if LIBTPMS_USE_OPENSSL | |
160 | ||
23b958af SB |
161 | libtpms_tpm12_la_SOURCES += tpm12/tpm_crypto.c |
162 | libtpms_tpm12_la_LIBADD += -lcrypto | |
a0098eda CB |
163 | |
164 | endif # LIBTPMS_USE_OPENSSL | |
165 | ||
166 | endif # LIBTPMS_USE_FREEBL | |
167 | ||
ccce8b5f SB |
168 | # TPM2 |
169 | # | |
170 | ||
3cf528aa SB |
171 | if WITH_TPM2 |
172 | ||
ccce8b5f SB |
173 | noinst_LTLIBRARIES += libtpms_tpm2.la |
174 | ||
175 | libtpms_la_LIBADD += libtpms_tpm2.la | |
176 | ||
6b444ad3 | 177 | libtpms_tpm2_la_LIBADD = $(LIBRT_LIBS) |
ccce8b5f | 178 | |
37ca75c7 | 179 | libtpms_tpm2_la_CFLAGS = $(common_CFLAGS) |
ccce8b5f SB |
180 | |
181 | libtpms_tpm2_la_CFLAGS += -D_POSIX_ | |
182 | libtpms_tpm2_la_CFLAGS += -DTPM_POSIX | |
3cf528aa SB |
183 | # build with libtpms callback support |
184 | libtpms_tpm2_la_CFLAGS += -DTPM_LIBTPMS_CALLBACKS | |
ccce8b5f SB |
185 | |
186 | libtpms_tpm2_la_SOURCES = \ | |
1f4c70cd | 187 | tpm2/ACT_spt.c \ |
fd41faa5 | 188 | tpm2/ACTCommands.c \ |
ccce8b5f SB |
189 | tpm2/AlgorithmCap.c \ |
190 | tpm2/AlgorithmTests.c \ | |
191 | tpm2/AsymmetricCommands.c \ | |
192 | tpm2/AttestationCommands.c \ | |
193 | tpm2/Attest_spt.c \ | |
194 | tpm2/AuditCommands.c \ | |
195 | tpm2/Bits.c \ | |
196 | tpm2/BnConvert.c \ | |
ccce8b5f SB |
197 | tpm2/BnMath.c \ |
198 | tpm2/BnMemory.c \ | |
199 | tpm2/Cancel.c \ | |
200 | tpm2/CapabilityCommands.c \ | |
201 | tpm2/Clock.c \ | |
202 | tpm2/ClockCommands.c \ | |
203 | tpm2/CommandAudit.c \ | |
204 | tpm2/CommandCodeAttributes.c \ | |
205 | tpm2/CommandDispatcher.c \ | |
206 | tpm2/ContextCommands.c \ | |
207 | tpm2/Context_spt.c \ | |
c8ef72d9 | 208 | tpm2/CryptEccData.c \ |
ccce8b5f SB |
209 | tpm2/CryptSelfTest.c \ |
210 | tpm2/CryptUtil.c \ | |
211 | tpm2/DA.c \ | |
b1bac6d2 | 212 | tpm2/DebugHelpers.c \ |
ccce8b5f SB |
213 | tpm2/DictionaryCommands.c \ |
214 | tpm2/DuplicationCommands.c \ | |
215 | tpm2/EACommands.c \ | |
216 | tpm2/EncryptDecrypt_spt.c \ | |
217 | tpm2/Entity.c \ | |
218 | tpm2/Entropy.c \ | |
219 | tpm2/EphemeralCommands.c \ | |
220 | tpm2/ExecCommand.c \ | |
221 | tpm2/Global.c \ | |
222 | tpm2/Handle.c \ | |
223 | tpm2/HashCommands.c \ | |
224 | tpm2/Hierarchy.c \ | |
225 | tpm2/HierarchyCommands.c \ | |
226 | tpm2/IntegrityCommands.c \ | |
227 | tpm2/IoBuffers.c \ | |
228 | tpm2/Locality.c \ | |
229 | tpm2/LocalityPlat.c \ | |
230 | tpm2/ManagementCommands.c \ | |
231 | tpm2/Manufacture.c \ | |
232 | tpm2/Marshal.c \ | |
233 | tpm2/MathOnByteBuffers.c \ | |
234 | tpm2/Memory.c \ | |
235 | tpm2/NVCommands.c \ | |
236 | tpm2/NVDynamic.c \ | |
237 | tpm2/NVMem.c \ | |
238 | tpm2/NVReserved.c \ | |
239 | tpm2/NV_spt.c \ | |
240 | tpm2/Object.c \ | |
241 | tpm2/ObjectCommands.c \ | |
242 | tpm2/Object_spt.c \ | |
243 | tpm2/PCR.c \ | |
1f4c70cd | 244 | tpm2/PlatformACT.c \ |
ccce8b5f SB |
245 | tpm2/PlatformData.c \ |
246 | tpm2/Policy_spt.c \ | |
247 | tpm2/Power.c \ | |
248 | tpm2/PowerPlat.c \ | |
249 | tpm2/PP.c \ | |
250 | tpm2/PPPlat.c \ | |
251 | tpm2/PrimeData.c \ | |
252 | tpm2/PropertyCap.c \ | |
253 | tpm2/RandomCommands.c \ | |
254 | tpm2/Response.c \ | |
255 | tpm2/ResponseCodeProcessing.c \ | |
256 | tpm2/RunCommand.c \ | |
257 | tpm2/Session.c \ | |
258 | tpm2/SessionCommands.c \ | |
259 | tpm2/SessionProcess.c \ | |
260 | tpm2/SigningCommands.c \ | |
261 | tpm2/StartupCommands.c \ | |
262 | tpm2/SymmetricCommands.c \ | |
263 | tpm2/TestingCommands.c \ | |
264 | tpm2/Ticket.c \ | |
265 | tpm2/Time.c \ | |
83221ed6 | 266 | tpm2/TpmAsn1.c \ |
ccce8b5f SB |
267 | tpm2/TpmSizeChecks.c \ |
268 | tpm2/TPMCmdp.c \ | |
269 | tpm2/TpmFail.c \ | |
270 | tpm2/Unique.c \ | |
271 | tpm2/Unmarshal.c \ | |
3cf528aa | 272 | tpm2/Vendor_TCG_Test.c \ |
77f452fd SB |
273 | tpm2/X509_ECC.c \ |
274 | tpm2/X509_RSA.c \ | |
275 | tpm2/X509_spt.c \ | |
3cf528aa | 276 | tpm_tpm2_interface.c \ |
fad1e916 SB |
277 | tpm_tpm2_tis.c \ |
278 | \ | |
1e1648fe | 279 | tpm2/BackwardsCompatibilityObject.c \ |
a48ea0a2 | 280 | tpm2/LibtpmsCallbacks.c \ |
fad1e916 SB |
281 | tpm2/NVMarshal.c \ |
282 | tpm2/StateMarshal.c \ | |
283 | tpm2/Volatile.c | |
ccce8b5f SB |
284 | |
285 | noinst_HEADERS += \ | |
1a24bcc5 | 286 | compiler.h \ |
67c3f364 | 287 | tpm2/crypto/CryptCmac_fp.h \ |
ccce8b5f SB |
288 | tpm2/crypto/CryptDes_fp.h \ |
289 | tpm2/crypto/CryptEcc.h \ | |
77222e43 | 290 | tpm2/crypto/CryptEccCrypt_fp.h \ |
ccce8b5f SB |
291 | tpm2/crypto/CryptEccKeyExchange_fp.h \ |
292 | tpm2/crypto/CryptEccMain_fp.h \ | |
293 | tpm2/crypto/CryptEccSignature_fp.h \ | |
ccce8b5f SB |
294 | tpm2/crypto/CryptHash_fp.h \ |
295 | tpm2/crypto/CryptHash.h \ | |
296 | tpm2/crypto/CryptPrime_fp.h \ | |
297 | tpm2/crypto/CryptPrimeSieve_fp.h \ | |
298 | tpm2/crypto/CryptRand_fp.h \ | |
299 | tpm2/crypto/CryptRand.h \ | |
300 | tpm2/crypto/CryptRsa_fp.h \ | |
301 | tpm2/crypto/CryptRsa.h \ | |
302 | tpm2/crypto/CryptSelfTest_fp.h \ | |
67c3f364 | 303 | tpm2/crypto/CryptSmac_fp.h \ |
8fb8816c | 304 | tpm2/crypto/CryptSym.h \ |
ccce8b5f SB |
305 | tpm2/crypto/CryptSym_fp.h \ |
306 | tpm2/crypto/CryptTest.h \ | |
307 | tpm2/crypto/CryptUtil_fp.h \ | |
fd41faa5 SB |
308 | tpm2/ACT.h \ |
309 | tpm2/ACT_spt_fp.h \ | |
310 | tpm2/ACT_SetTimeout_fp.h \ | |
ccce8b5f SB |
311 | tpm2/ActivateCredential_fp.h \ |
312 | tpm2/AlgorithmCap_fp.h \ | |
313 | tpm2/AlgorithmTests_fp.h \ | |
314 | tpm2/Attest_spt_fp.h \ | |
315 | tpm2/BaseTypes.h \ | |
316 | tpm2/Bits_fp.h \ | |
317 | tpm2/Capabilities.h \ | |
318 | tpm2/CertifyCreation_fp.h \ | |
a5866291 | 319 | tpm2/CertifyX509_fp.h \ |
ccce8b5f SB |
320 | tpm2/Certify_fp.h \ |
321 | tpm2/ChangeEPS_fp.h \ | |
322 | tpm2/ChangePPS_fp.h \ | |
323 | tpm2/ClearControl_fp.h \ | |
324 | tpm2/Clear_fp.h \ | |
325 | tpm2/ClockRateAdjust_fp.h \ | |
326 | tpm2/ClockSet_fp.h \ | |
327 | tpm2/CommandAttributeData.h \ | |
328 | tpm2/CommandAttributes.h \ | |
329 | tpm2/CommandAudit_fp.h \ | |
330 | tpm2/CommandCodeAttributes_fp.h \ | |
331 | tpm2/CommandDispatchData.h \ | |
332 | tpm2/CommandDispatcher_fp.h \ | |
333 | tpm2/Commit_fp.h \ | |
334 | tpm2/CompilerDependencies.h \ | |
335 | tpm2/ContextLoad_fp.h \ | |
336 | tpm2/ContextSave_fp.h \ | |
337 | tpm2/Context_spt_fp.h \ | |
338 | tpm2/Create_fp.h \ | |
339 | tpm2/CreateLoaded_fp.h \ | |
340 | tpm2/CreatePrimary_fp.h \ | |
341 | tpm2/CryptSelfTest_fp.h \ | |
ccce8b5f | 342 | tpm2/DA_fp.h \ |
b1bac6d2 | 343 | tpm2/DebugHelpers_fp.h \ |
ccce8b5f SB |
344 | tpm2/DictionaryAttackLockReset_fp.h \ |
345 | tpm2/DictionaryAttackParameters_fp.h \ | |
346 | tpm2/Duplicate_fp.h \ | |
347 | tpm2/EccTestData.h \ | |
348 | tpm2/ECC_Parameters_fp.h \ | |
349 | tpm2/ECDH_KeyGen_fp.h \ | |
350 | tpm2/ECDH_ZGen_fp.h \ | |
351 | tpm2/EC_Ephemeral_fp.h \ | |
352 | tpm2/EncryptDecrypt2_fp.h \ | |
353 | tpm2/EncryptDecrypt_fp.h \ | |
ccce8b5f SB |
354 | tpm2/EncryptDecrypt_spt_fp.h \ |
355 | tpm2/Entity_fp.h \ | |
356 | tpm2/EventSequenceComplete_fp.h \ | |
357 | tpm2/EvictControl_fp.h \ | |
358 | tpm2/ExecCommand_fp.h \ | |
359 | tpm2/FlushContext_fp.h \ | |
360 | tpm2/GetCapability_fp.h \ | |
361 | tpm2/GetCommandAuditDigest_fp.h \ | |
362 | tpm2/GetRandom_fp.h \ | |
363 | tpm2/GetSessionAuditDigest_fp.h \ | |
364 | tpm2/GetTestResult_fp.h \ | |
365 | tpm2/GetTime_fp.h \ | |
366 | tpm2/Global.h \ | |
367 | tpm2/GpMacros.h \ | |
368 | tpm2/Handle_fp.h \ | |
369 | tpm2/Hash_fp.h \ | |
370 | tpm2/HashSequenceStart_fp.h \ | |
371 | tpm2/HashTestData.h \ | |
372 | tpm2/HierarchyChangeAuth_fp.h \ | |
373 | tpm2/HierarchyControl_fp.h \ | |
374 | tpm2/Hierarchy_fp.h \ | |
375 | tpm2/HMAC_fp.h \ | |
376 | tpm2/HMAC_Start_fp.h \ | |
ccce8b5f SB |
377 | tpm2/Import_fp.h \ |
378 | tpm2/IncrementalSelfTest_fp.h \ | |
379 | tpm2/InternalRoutines.h \ | |
380 | tpm2/IoBuffers_fp.h \ | |
fcbd854f | 381 | tpm2/KdfTestData.h \ |
ccce8b5f SB |
382 | tpm2/LoadExternal_fp.h \ |
383 | tpm2/Load_fp.h \ | |
384 | tpm2/Locality_fp.h \ | |
8fb8816c SB |
385 | tpm2/MAC_fp.h \ |
386 | tpm2/MAC_Start_fp.h \ | |
ccce8b5f SB |
387 | tpm2/MakeCredential_fp.h \ |
388 | tpm2/Manufacture_fp.h \ | |
389 | tpm2/Marshal_fp.h \ | |
390 | tpm2/MathOnByteBuffers_fp.h \ | |
391 | tpm2/Memory_fp.h \ | |
8a0af9b1 | 392 | tpm2/MinMax.h \ |
ccce8b5f SB |
393 | tpm2/NV_Certify_fp.h \ |
394 | tpm2/NV_ChangeAuth_fp.h \ | |
395 | tpm2/NV_DefineSpace_fp.h \ | |
396 | tpm2/NVDynamic_fp.h \ | |
397 | tpm2/NV_Extend_fp.h \ | |
398 | tpm2/NV_GlobalWriteLock_fp.h \ | |
399 | tpm2/NV.h \ | |
400 | tpm2/NV_Increment_fp.h \ | |
401 | tpm2/NV_Read_fp.h \ | |
402 | tpm2/NV_ReadLock_fp.h \ | |
403 | tpm2/NV_ReadPublic_fp.h \ | |
404 | tpm2/NVReserved_fp.h \ | |
405 | tpm2/NV_SetBits_fp.h \ | |
406 | tpm2/NV_spt_fp.h \ | |
407 | tpm2/NV_UndefineSpace_fp.h \ | |
408 | tpm2/NV_UndefineSpaceSpecial_fp.h \ | |
409 | tpm2/NV_Write_fp.h \ | |
410 | tpm2/NV_WriteLock_fp.h \ | |
5148fe63 | 411 | tpm2/OIDs.h \ |
ccce8b5f SB |
412 | tpm2/ObjectChangeAuth_fp.h \ |
413 | tpm2/Object_fp.h \ | |
414 | tpm2/Object_spt_fp.h \ | |
415 | tpm2/PCR_Allocate_fp.h \ | |
416 | tpm2/PCR_Event_fp.h \ | |
417 | tpm2/PCR_Extend_fp.h \ | |
418 | tpm2/PCR_fp.h \ | |
419 | tpm2/PCR_Read_fp.h \ | |
420 | tpm2/PCR_Reset_fp.h \ | |
421 | tpm2/PCR_SetAuthPolicy_fp.h \ | |
422 | tpm2/PCR_SetAuthValue_fp.h \ | |
a3f7213f | 423 | tpm2/Platform.h \ |
fd41faa5 SB |
424 | tpm2/PlatformACT.h \ |
425 | tpm2/PlatformACT_fp.h \ | |
bb84bfbf | 426 | tpm2/PlatformClock.h \ |
ccce8b5f SB |
427 | tpm2/PlatformData.h \ |
428 | tpm2/Platform_fp.h \ | |
429 | tpm2/PolicyAuthorize_fp.h \ | |
430 | tpm2/PolicyAuthorizeNV_fp.h \ | |
431 | tpm2/PolicyAuthValue_fp.h \ | |
432 | tpm2/PolicyCommandCode_fp.h \ | |
433 | tpm2/PolicyCounterTimer_fp.h \ | |
434 | tpm2/PolicyCpHash_fp.h \ | |
435 | tpm2/PolicyDuplicationSelect_fp.h \ | |
436 | tpm2/PolicyGetDigest_fp.h \ | |
437 | tpm2/PolicyLocality_fp.h \ | |
438 | tpm2/PolicyNameHash_fp.h \ | |
439 | tpm2/PolicyNV_fp.h \ | |
440 | tpm2/PolicyNvWritten_fp.h \ | |
441 | tpm2/PolicyOR_fp.h \ | |
442 | tpm2/PolicyPassword_fp.h \ | |
443 | tpm2/PolicyPCR_fp.h \ | |
444 | tpm2/PolicyPhysicalPresence_fp.h \ | |
445 | tpm2/PolicyRestart_fp.h \ | |
446 | tpm2/PolicySecret_fp.h \ | |
447 | tpm2/PolicySigned_fp.h \ | |
448 | tpm2/Policy_spt_fp.h \ | |
449 | tpm2/PolicyTemplate_fp.h \ | |
450 | tpm2/PolicyTicket_fp.h \ | |
451 | tpm2/Power_fp.h \ | |
452 | tpm2/PP_Commands_fp.h \ | |
453 | tpm2/PP_fp.h \ | |
454 | tpm2/PRNG_TestVectors.h \ | |
455 | tpm2/PropertyCap_fp.h \ | |
456 | tpm2/Quote_fp.h \ | |
457 | tpm2/ReadClock_fp.h \ | |
458 | tpm2/ReadPublic_fp.h \ | |
459 | tpm2/ResponseCodeProcessing_fp.h \ | |
460 | tpm2/Response_fp.h \ | |
461 | tpm2/Rewrap_fp.h \ | |
462 | tpm2/RsaTestData.h \ | |
463 | tpm2/RSA_Decrypt_fp.h \ | |
464 | tpm2/RSA_Encrypt_fp.h \ | |
465 | tpm2/SelfTest.h \ | |
466 | tpm2/SelfTest_fp.h \ | |
467 | tpm2/SequenceComplete_fp.h \ | |
468 | tpm2/SequenceUpdate_fp.h \ | |
469 | tpm2/Session_fp.h \ | |
470 | tpm2/SessionProcess_fp.h \ | |
471 | tpm2/SetAlgorithmSet_fp.h \ | |
472 | tpm2/SetCommandCodeAuditStatus_fp.h \ | |
473 | tpm2/SetPrimaryPolicy_fp.h \ | |
474 | tpm2/Shutdown_fp.h \ | |
475 | tpm2/Sign_fp.h \ | |
476 | tpm2/Simulator_fp.h \ | |
477 | tpm2/StartAuthSession_fp.h \ | |
478 | tpm2/Startup_fp.h \ | |
479 | tpm2/StirRandom_fp.h \ | |
480 | tpm2/SupportLibraryFunctionPrototypes_fp.h \ | |
481 | tpm2/SymmetricTest.h \ | |
482 | tpm2/SymmetricTestData.h \ | |
483 | tpm2/swap.h \ | |
484 | tpm2/TcpServerPosix_fp.h \ | |
485 | tpm2/TestParms_fp.h \ | |
486 | tpm2/Ticket_fp.h \ | |
487 | tpm2/Time_fp.h \ | |
488 | tpm2/TPMB.h \ | |
ba240b3c | 489 | tpm2/TpmAlgorithmDefines.h \ |
83221ed6 SB |
490 | tpm2/TpmAsn1.h \ |
491 | tpm2/TpmAsn1_fp.h \ | |
ccce8b5f SB |
492 | tpm2/TpmBuildSwitches.h \ |
493 | tpm2/TpmError.h \ | |
494 | tpm2/TpmFail_fp.h \ | |
d216a724 | 495 | tpm2/TpmProfile.h \ |
ccce8b5f SB |
496 | tpm2/Tpm.h \ |
497 | tpm2/_TPM_Hash_Data_fp.h \ | |
498 | tpm2/_TPM_Hash_End_fp.h \ | |
499 | tpm2/_TPM_Hash_Start_fp.h \ | |
500 | tpm2/_TPM_Init_fp.h \ | |
501 | tpm2/TpmSizeChecks_fp.h \ | |
502 | tpm2/TpmTcpProtocol.h \ | |
503 | tpm2/TpmTypes.h \ | |
504 | tpm2/Unmarshal_fp.h \ | |
505 | tpm2/Unseal_fp.h \ | |
506 | tpm2/VendorString.h \ | |
507 | tpm2/Vendor_TCG_Test_fp.h \ | |
508 | tpm2/VerifySignature_fp.h \ | |
77f452fd SB |
509 | tpm2/X509.h \ |
510 | tpm2/X509_ECC_fp.h \ | |
511 | tpm2/X509_RSA_fp.h \ | |
512 | tpm2/X509_spt_fp.h \ | |
fad1e916 SB |
513 | tpm2/ZGen_2Phase_fp.h \ |
514 | \ | |
eabcd048 | 515 | tpm2/BackwardsCompatibility.h \ |
1e1648fe | 516 | tpm2/BackwardsCompatibilityObject.h \ |
a48ea0a2 | 517 | tpm2/LibtpmsCallbacks.h \ |
fad1e916 SB |
518 | tpm2/NVMarshal.h \ |
519 | tpm2/StateMarshal.h \ | |
10d4e5fd | 520 | tpm2/Utils.h \ |
fad1e916 | 521 | tpm2/Volatile.h |
ccce8b5f SB |
522 | |
523 | if LIBTPMS_USE_OPENSSL | |
524 | ||
525 | libtpms_tpm2_la_SOURCES += \ | |
67c3f364 | 526 | tpm2/crypto/openssl/CryptCmac.c \ |
ccce8b5f SB |
527 | tpm2/crypto/openssl/CryptDes.c \ |
528 | tpm2/crypto/openssl/CryptEccKeyExchange.c \ | |
529 | tpm2/crypto/openssl/CryptEccMain.c \ | |
530 | tpm2/crypto/openssl/CryptEccSignature.c \ | |
531 | tpm2/crypto/openssl/CryptHash.c \ | |
ccce8b5f SB |
532 | tpm2/crypto/openssl/CryptPrime.c \ |
533 | tpm2/crypto/openssl/CryptPrimeSieve.c \ | |
534 | tpm2/crypto/openssl/CryptRand.c \ | |
535 | tpm2/crypto/openssl/CryptRsa.c \ | |
67c3f364 | 536 | tpm2/crypto/openssl/CryptSmac.c \ |
ccce8b5f | 537 | tpm2/crypto/openssl/CryptSym.c \ |
8de7f334 | 538 | tpm2/crypto/openssl/Helpers.c \ |
ccce8b5f SB |
539 | tpm2/crypto/openssl/TpmToOsslDesSupport.c \ |
540 | tpm2/crypto/openssl/TpmToOsslMath.c \ | |
541 | tpm2/crypto/openssl/TpmToOsslSupport.c | |
542 | ||
543 | noinst_HEADERS += \ | |
514dc4fa | 544 | tpm2/crypto/openssl/ConsttimeUtils.h \ |
ccce8b5f SB |
545 | tpm2/crypto/openssl/BnConvert_fp.h \ |
546 | tpm2/crypto/openssl/BnMath_fp.h \ | |
547 | tpm2/crypto/openssl/BnMemory_fp.h \ | |
548 | tpm2/crypto/openssl/BnValues.h \ | |
8de7f334 | 549 | tpm2/crypto/openssl/Helpers_fp.h \ |
ccce8b5f SB |
550 | tpm2/crypto/openssl/LibSupport.h \ |
551 | tpm2/crypto/openssl/TpmToOsslDesSupport_fp.h \ | |
552 | tpm2/crypto/openssl/TpmToOsslHash.h \ | |
553 | tpm2/crypto/openssl/TpmToOsslMath_fp.h \ | |
554 | tpm2/crypto/openssl/TpmToOsslMath.h \ | |
555 | tpm2/crypto/openssl/TpmToOsslSupport_fp.h \ | |
556 | tpm2/crypto/openssl/TpmToOsslSym.h | |
557 | ||
558 | libtpms_tpm2_la_CFLAGS += \ | |
bb5d837c MAL |
559 | -I $(srcdir)/tpm2 \ |
560 | -I $(srcdir)/tpm2/crypto \ | |
561 | -I $(srcdir)/tpm2/crypto/openssl | |
ccce8b5f SB |
562 | |
563 | endif # LIBTPMS_USE_OPENSSL | |
564 | ||
3cf528aa SB |
565 | endif # WITH_TPM2 |
566 | ||
23b958af SB |
567 | # |
568 | # Library API layer | |
569 | # | |
570 | ||
571 | libtpms_la_SOURCES = \ | |
572 | tpm_library.c | |
573 | ||
ccce8b5f | 574 | libtpms_la_CFLAGS = $(common_CFLAGS) |
23b958af | 575 | |
27904459 | 576 | libtpms_la_LDFLAGS = -version-info $(LIBTPMS_VERSION_INFO) \ |
23b958af SB |
577 | -no-undefined |
578 | ||
27904459 SB |
579 | if HAVE_VERSION_SCRIPT |
580 | libtpms_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtpms.syms | |
581 | endif | |
23b958af | 582 | |
a0098eda CB |
583 | LDFLAGS_ARCH = $(findstring -m32, $(CFLAGS)) |
584 | LDFLAGS_ARCH += $(findstring -m64, $(CFLAGS)) | |
585 | LDFLAGS_ARCH += $(findstring -m32, $(LDFLAGS)) | |
586 | LDFLAGS_ARCH += $(findstring -m64, $(LDFLAGS)) | |
587 | ||
1fe484ce | 588 | check-local: SHELL?="/usr/bin/env bash" |
a0098eda | 589 | check-local: |
46727502 SB |
590 | @case $(host_os) in \ |
591 | openbsd*) ADDLIBS="-lc" ;; \ | |
3300bbbc | 592 | darwin*|freebsd*) LDFLAGS_OS="-shared" ;; \ |
46727502 SB |
593 | *) ADDLIBS="" ;; \ |
594 | esac; \ | |
314f8080 SB |
595 | ($(CC) $$LDFLAGS_OS $(LDFLAGS_ARCH) -nostdlib -L./.libs -ltpms $$ADDLIBS 2>/dev/null || \ |
596 | (echo "There are undefined symbols in libtpms ($$LDFLAGS_OS $(LDFLAGS_ARCH))";\ | |
597 | $(CC) $$LDFLAGS_OS $(LDFLAGS_ARCH) -nostdlib -L./.libs -ltpms $$ADDLIBS 2>&1 | grep libtpms)) | |
46727502 SB |
598 | @case $(host_os) in \ |
599 | openbsd*) ADDLIBS="-lc" ;; \ | |
3300bbbc | 600 | darwin*|freebsd*) LDFLAGS_OS="-shared" ;; \ |
46727502 SB |
601 | *) ADDLIBS="" ;; \ |
602 | esac; \ | |
314f8080 SB |
603 | $(CC) $$LDFLAGS_OS $(LDFLAGS_ARCH) -nostdlib -L./.libs -ltpms $$ADDLIBS 2>/dev/null |
604 | rm a.out || true | |
a0098eda CB |
605 | |
606 | EXTRA_DIST = \ | |
23b958af SB |
607 | tpm12/tpm_crypto_freebl.c \ |
608 | tpm12/tpm_crypto.c \ | |
59f46464 SB |
609 | libtpms.syms \ |
610 | test.syms | |
bb5d837c | 611 | |
13992522 SB |
612 | CLEANFILES = \ |
613 | a.out \ | |
614 | *.gcov \ | |
615 | *.gcda \ | |
616 | *.gcno \ | |
617 | tpm12/*.gcov \ | |
618 | tpm12/*.gcda \ | |
619 | tpm12/*.gcno \ | |
620 | tpm2/*.gcov \ | |
621 | tpm2/*.gcda \ | |
622 | tpm2/*.gcno \ | |
623 | tpm2/crypto/openssl/*.gcov \ | |
624 | tpm2/crypto/openssl/*.gcda \ | |
625 | tpm2/crypto/openssl/*.gcno |