1# Copyright (C) 2015 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
16
17# libtpm2
18# ========================================================
19include $(CLEAR_VARS)
20LOCAL_MODULE := libtpm2
21LOCAL_CFLAGS := -Wall -Wextra -Werror \
22  -Wno-typedef-redefinition \
23  -Wno-unused-parameter \
24  -Wno-missing-field-initializers \
25  -Wno-tautological-compare \
26  -Wno-sign-compare
27LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/tpm2
28LOCAL_CLANG := true
29LOCAL_SHARED_LIBRARIES := libcrypto
30LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
31LOCAL_SRC_FILES := \
32  ActivateCredential.c \
33  AlgorithmCap.c \
34  Attest_spt.c \
35  Bits.c \
36  Cancel.c \
37  Certify.c \
38  CertifyCreation.c \
39  ChangeEPS.c \
40  ChangePPS.c \
41  Clear.c \
42  ClearControl.c \
43  Clock.c \
44  ClockRateAdjust.c \
45  ClockSet.c \
46  CommandAudit.c \
47  CommandCodeAttributes.c \
48  CommandDispatcher.c \
49  Commit.c \
50  ContextLoad.c \
51  ContextSave.c \
52  Context_spt.c \
53  CpriCryptPri.c \
54  CpriECC.c \
55  CpriHash.c \
56  CpriMisc.c \
57  CpriRNG.c \
58  CpriRSA.c \
59  CpriSym.c \
60  Create.c \
61  CreatePrimary.c \
62  CryptSelfTest.c \
63  CryptUtil.c \
64  DA.c \
65  DRTM.c \
66  DictionaryAttackLockReset.c \
67  DictionaryAttackParameters.c \
68  Duplicate.c \
69  ECC_Parameters.c \
70  ECDH_KeyGen.c \
71  ECDH_ZGen.c \
72  EC_Ephemeral.c \
73  EncryptDecrypt.c \
74  Entity.c \
75  Entropy.c \
76  EventSequenceComplete.c \
77  EvictControl.c \
78  ExecCommand.c \
79  FieldUpgradeData.c \
80  FieldUpgradeStart.c \
81  FirmwareRead.c \
82  FlushContext.c \
83  GetCapability.c \
84  GetCommandAuditDigest.c \
85  GetCommandCodeString.c \
86  GetRandom.c \
87  GetSessionAuditDigest.c \
88  GetTestResult.c \
89  GetTime.c \
90  Global.c \
91  HMAC.c \
92  HMAC_Start.c \
93  Handle.c \
94  HandleProcess.c \
95  Hash.c \
96  HashSequenceStart.c \
97  Hierarchy.c \
98  HierarchyChangeAuth.c \
99  HierarchyControl.c \
100  Import.c \
101  IncrementalSelfTest.c \
102  Load.c \
103  LoadExternal.c \
104  Locality.c \
105  LocalityPlat.c \
106  MakeCredential.c \
107  Marshal_ActivateCredential.c \
108  Marshal_Certify.c \
109  Marshal_CertifyCreation.c \
110  Marshal_ChangeEPS.c \
111  Marshal_ChangePPS.c \
112  Marshal_Clear.c \
113  Marshal_ClearControl.c \
114  Marshal_ClockRateAdjust.c \
115  Marshal_ClockSet.c \
116  Marshal_Commit.c \
117  Marshal_ContextLoad.c \
118  Marshal_ContextSave.c \
119  Marshal_Create.c \
120  Marshal_CreatePrimary.c \
121  Marshal_DictionaryAttackLockReset.c \
122  Marshal_DictionaryAttackParameters.c \
123  Marshal_Duplicate.c \
124  Marshal_ECC_Parameters.c \
125  Marshal_ECDH_KeyGen.c \
126  Marshal_ECDH_ZGen.c \
127  Marshal_EC_Ephemeral.c \
128  Marshal_EncryptDecrypt.c \
129  Marshal_EventSequenceComplete.c \
130  Marshal_EvictControl.c \
131  Marshal_FirmwareRead.c \
132  Marshal_FlushContext.c \
133  Marshal_GetCapability.c \
134  Marshal_GetCommandAuditDigest.c \
135  Marshal_GetRandom.c \
136  Marshal_GetSessionAuditDigest.c \
137  Marshal_GetTestResult.c \
138  Marshal_GetTime.c \
139  Marshal_HMAC.c \
140  Marshal_HMAC_Start.c \
141  Marshal_Hash.c \
142  Marshal_HashSequenceStart.c \
143  Marshal_HierarchyChangeAuth.c \
144  Marshal_HierarchyControl.c \
145  Marshal_Import.c \
146  Marshal_IncrementalSelfTest.c \
147  Marshal_Load.c \
148  Marshal_LoadExternal.c \
149  Marshal_MakeCredential.c \
150  Marshal_NV_Certify.c \
151  Marshal_NV_ChangeAuth.c \
152  Marshal_NV_DefineSpace.c \
153  Marshal_NV_Extend.c \
154  Marshal_NV_GlobalWriteLock.c \
155  Marshal_NV_Increment.c \
156  Marshal_NV_Read.c \
157  Marshal_NV_ReadLock.c \
158  Marshal_NV_ReadPublic.c \
159  Marshal_NV_SetBits.c \
160  Marshal_NV_UndefineSpace.c \
161  Marshal_NV_UndefineSpaceSpecial.c \
162  Marshal_NV_Write.c \
163  Marshal_NV_WriteLock.c \
164  Marshal_ObjectChangeAuth.c \
165  Marshal_PCR_Allocate.c \
166  Marshal_PCR_Event.c \
167  Marshal_PCR_Extend.c \
168  Marshal_PCR_Read.c \
169  Marshal_PCR_Reset.c \
170  Marshal_PCR_SetAuthPolicy.c \
171  Marshal_PCR_SetAuthValue.c \
172  Marshal_PP_Commands.c \
173  Marshal_PolicyAuthValue.c \
174  Marshal_PolicyAuthorize.c \
175  Marshal_PolicyCommandCode.c \
176  Marshal_PolicyCounterTimer.c \
177  Marshal_PolicyCpHash.c \
178  Marshal_PolicyDuplicationSelect.c \
179  Marshal_PolicyGetDigest.c \
180  Marshal_PolicyLocality.c \
181  Marshal_PolicyNV.c \
182  Marshal_PolicyNameHash.c \
183  Marshal_PolicyNvWritten.c \
184  Marshal_PolicyOR.c \
185  Marshal_PolicyPCR.c \
186  Marshal_PolicyPassword.c \
187  Marshal_PolicyPhysicalPresence.c \
188  Marshal_PolicyRestart.c \
189  Marshal_PolicySecret.c \
190  Marshal_PolicySigned.c \
191  Marshal_PolicyTicket.c \
192  Marshal_Quote.c \
193  Marshal_RSA_Decrypt.c \
194  Marshal_RSA_Encrypt.c \
195  Marshal_ReadClock.c \
196  Marshal_ReadPublic.c \
197  Marshal_Rewrap.c \
198  Marshal_SelfTest.c \
199  Marshal_SequenceComplete.c \
200  Marshal_SequenceUpdate.c \
201  Marshal_SetAlgorithmSet.c \
202  Marshal_SetCommandCodeAuditStatus.c \
203  Marshal_SetPrimaryPolicy.c \
204  Marshal_Shutdown.c \
205  Marshal_Sign.c \
206  Marshal_StartAuthSession.c \
207  Marshal_Startup.c \
208  Marshal_StirRandom.c \
209  Marshal_TestParms.c \
210  Marshal_Unseal.c \
211  Marshal_VerifySignature.c \
212  Marshal_ZGen_2Phase.c \
213  Manufacture.c \
214  MathFunctions.c \
215  MemoryLib.c \
216  NV.c \
217  NVMem.c \
218  NV_Certify.c \
219  NV_ChangeAuth.c \
220  NV_DefineSpace.c \
221  NV_Extend.c \
222  NV_GlobalWriteLock.c \
223  NV_Increment.c \
224  NV_Read.c \
225  NV_ReadLock.c \
226  NV_ReadPublic.c \
227  NV_SetBits.c \
228  NV_UndefineSpace.c \
229  NV_UndefineSpaceSpecial.c \
230  NV_Write.c \
231  NV_WriteLock.c \
232  NV_spt.c \
233  Object.c \
234  ObjectChangeAuth.c \
235  Object_spt.c \
236  PCR.c \
237  PCR_Allocate.c \
238  PCR_Event.c \
239  PCR_Extend.c \
240  PCR_Read.c \
241  PCR_Reset.c \
242  PCR_SetAuthPolicy.c \
243  PCR_SetAuthValue.c \
244  PP.c \
245  PPPlat.c \
246  PP_Commands.c \
247  PlatformData.c \
248  PolicyAuthValue.c \
249  PolicyAuthorize.c \
250  PolicyCommandCode.c \
251  PolicyCounterTimer.c \
252  PolicyCpHash.c \
253  PolicyDuplicationSelect.c \
254  PolicyGetDigest.c \
255  PolicyLocality.c \
256  PolicyNV.c \
257  PolicyNameHash.c \
258  PolicyNvWritten.c \
259  PolicyOR.c \
260  PolicyPCR.c \
261  PolicyPassword.c \
262  PolicyPhysicalPresence.c \
263  PolicyRestart.c \
264  PolicySecret.c \
265  PolicySigned.c \
266  PolicyTicket.c \
267  Policy_spt.c \
268  Power.c \
269  PowerPlat.c \
270  PropertyCap.c \
271  Quote.c \
272  RSAData.c \
273  RSAKeySieve.c \
274  RSA_Decrypt.c \
275  RSA_Encrypt.c \
276  ReadClock.c \
277  ReadPublic.c \
278  Rewrap.c \
279  SelfTest.c \
280  SequenceComplete.c \
281  SequenceUpdate.c \
282  Session.c \
283  SessionProcess.c \
284  SetAlgorithmSet.c \
285  SetCommandCodeAuditStatus.c \
286  SetPrimaryPolicy.c \
287  Shutdown.c \
288  Sign.c \
289  StartAuthSession.c \
290  Startup.c \
291  StirRandom.c \
292  TestParms.c \
293  Ticket.c \
294  Time.c \
295  TpmFail.c \
296  Unique.c \
297  Unseal.c \
298  VerifySignature.c \
299  ZGen_2Phase.c \
300  _TPM_Hash_Data.c \
301  _TPM_Hash_End.c \
302  _TPM_Hash_Start.c \
303  _TPM_Init.c \
304  tpm_generated.c
305include $(BUILD_SHARED_LIBRARY)
306