blob: fdb11ac128fd1c508ff825c80ac6c56355560b07 [file] [log] [blame]
Shawn Willden67380a92015-05-13 12:07:50 -06001#####
2# Local unit test Makefile
3#
4# This makefile builds and runs the keymaster unit tests locally on the development
5# machine, not on an Android device. Android.mk builds the same tests into the
6# "keymaster_tests" binary for execution on-device, but this Makefile runs them locally,
7# for a very fast edit/build/test development cycle.
8#
9# To build and run these tests, one pre-requisite must be manually installed: BoringSSL.
10# This Makefile expects to find BoringSSL in a directory adjacent to $ANDROID_BUILD_TOP.
11# To get and build it, first install the Ninja build tool (e.g. apt-get install
12# ninja-build), then do:
13#
14# cd $ANDROID_BUILD_TOP/..
15# git clone https://boringssl.googlesource.com/boringssl
16# cd boringssl
17# mdkir build
18# cd build
19# cmake -GNinja ..
20# ninja
21#
22# Then return to $ANDROID_BUILD_TOP/system/keymaster and run "make".
23#####
24
Shawn Willden5ada7b62014-07-29 09:44:17 -060025BASE=../..
26SUBS=system/core \
27 hardware/libhardware \
Shawn Willden67380a92015-05-13 12:07:50 -060028 external/gtest \
29 system/security/softkeymaster \
30 system/security/keystore
Shawn Willden2dfe0452016-10-12 19:50:28 -060031GTEST=$(BASE)/external/googletest/googletest
Shawn Willden5ada7b62014-07-29 09:44:17 -060032
33INCLUDES=$(foreach dir,$(SUBS),-I $(BASE)/$(dir)/include) \
Shawn Willden98d9b922014-08-26 08:14:10 -060034 -I $(BASE)/libnativehelper/include/nativehelper \
Shawn Willden2dfe0452016-10-12 19:50:28 -060035 -I $(GTEST)/include -isystem $(GTEST) -Iinclude -I$(BASE)/../boringssl/include
Shawn Willden5ada7b62014-07-29 09:44:17 -060036
Shawn Willden0f906ec2015-06-20 09:16:30 -060037ifdef FORCE_32_BIT
38ARCH_FLAGS = -m32
39endif
40
Janis Danisevskis5b20ae72017-07-28 16:25:00 -070041ifdef USE_GCC
42CXXFLAGS +=-std=c++14 -fprofile-arcs -ftest-coverage
Shawn Willdend599b152015-07-27 16:58:30 -060043CFLAGS += -fprofile-arcs -ftest-coverage
Janis Danisevskis5b20ae72017-07-28 16:25:00 -070044else
Nick Desaulniers52665512019-12-05 14:16:44 -080045CC=$(BASE)/prebuilts/clang/host/linux-x86/clang-r370808/bin/clang
46CXX=$(BASE)/prebuilts/clang/host/linux-x86/clang-r370808/bin/clang++
Janis Danisevskis5b20ae72017-07-28 16:25:00 -070047CXXFLAGS +=-std=c++14 -DKEYMASTER_CLANG_TEST_BUILD
48CFLAGS += -DKEYMASTER_CLANG_TEST_BUILD
Shawn Willdenebf627f2014-08-12 11:15:29 -060049endif
50
Shawn Willden0f906ec2015-06-20 09:16:30 -060051LDFLAGS += $(ARCH_FLAGS)
Shawn Willdencddf3a42016-03-09 20:03:38 -070052CPPFLAGS = $(INCLUDES) -g -O0 -MD -MP $(ARCH_FLAGS) -DKEYMASTER_UNIT_TEST_BUILD -DHOST_BUILD
Shawn Willden239c1662016-01-05 17:06:56 -070053CXXFLAGS += -Wall -Werror -Wno-unused -Winit-self -Wpointer-arith -Wunused-parameter \
Shawn Willdend599b152015-07-27 16:58:30 -060054 -Werror=sign-compare -Werror=return-type -fno-permissive \
Shawn Willden0f906ec2015-06-20 09:16:30 -060055 -Wno-deprecated-declarations -fno-exceptions -DKEYMASTER_NAME_TAGS $(ARCH_FLAGS)
Shawn Willdencddf3a42016-03-09 20:03:38 -070056CFLAGS += $(ARCH_FLAGS) -DKEYMASTER_UNIT_TEST_BUILD -DHOST_BUILD
Shawn Willden567a4a02014-12-31 12:14:46 -070057
58# Uncomment to enable debug logging.
59# CXXFLAGS += -DDEBUG
60
Shawn Willden67380a92015-05-13 12:07:50 -060061LDLIBS=-L$(BASE)/../boringssl/build/crypto -lcrypto -lpthread -lstdc++ -lgcov
Shawn Willden5ada7b62014-07-29 09:44:17 -060062
Shawn Willden1615f2e2014-08-13 10:37:40 -060063CPPSRCS=\
Janis Danisevskisf54cc932017-05-10 15:29:10 -070064 km_openssl/aes_key.cpp \
65 km_openssl/aes_operation.cpp \
Shawn Willden7efc7722018-01-08 22:00:12 -070066 km_openssl/triple_des_key.cpp \
67 km_openssl/triple_des_operation.cpp \
Janis Danisevskisf54cc932017-05-10 15:29:10 -070068 android_keymaster/android_keymaster.cpp \
69 android_keymaster/android_keymaster_messages.cpp \
70 tests/android_keymaster_messages_test.cpp \
71 tests/android_keymaster_test.cpp \
72 tests/android_keymaster_test_utils.cpp \
73 android_keymaster/android_keymaster_utils.cpp \
74 km_openssl/asymmetric_key.cpp \
75 km_openssl/asymmetric_key_factory.cpp \
76 km_openssl/attestation_record.cpp \
Shawn Willdena2f1a9b2018-01-09 09:37:43 -070077 km_openssl/block_cipher_operation.cpp \
Janis Danisevskisf54cc932017-05-10 15:29:10 -070078 tests/attestation_record_test.cpp \
79 key_blob_utils/auth_encrypted_key_blob.cpp \
80 android_keymaster/authorization_set.cpp \
81 tests/authorization_set_test.cpp \
82 km_openssl/ec_key.cpp \
83 km_openssl/ec_key_factory.cpp \
84 legacy_support/ec_keymaster0_key.cpp \
85 legacy_support/ec_keymaster1_key.cpp \
86 legacy_support/ecdsa_keymaster1_operation.cpp \
87 km_openssl/ecdsa_operation.cpp \
88 km_openssl/ecies_kem.cpp \
89 tests/ecies_kem_test.cpp \
90 tests/gtest_main.cpp \
Shawn Willdenbdef0e62018-01-02 06:27:49 -070091 km_openssl/ckdf.cpp \
92 tests/hkdf_test.cpp \
Janis Danisevskisf54cc932017-05-10 15:29:10 -070093 km_openssl/hkdf.cpp \
94 tests/hkdf_test.cpp \
95 km_openssl/hmac.cpp \
96 km_openssl/hmac_key.cpp \
97 km_openssl/hmac_operation.cpp \
98 tests/hmac_test.cpp \
99 key_blob_utils/integrity_assured_key_blob.cpp \
100 km_openssl/iso18033kdf.cpp \
101 km_openssl/kdf.cpp \
102 tests/kdf1_test.cpp \
103 tests/kdf2_test.cpp \
104 tests/kdf_test.cpp \
105 tests/key_blob_test.cpp \
106 legacy_support/keymaster0_engine.cpp \
107 legacy_support/keymaster1_engine.cpp \
108 android_keymaster/keymaster_configuration.cpp \
109 tests/keymaster_configuration_test.cpp \
110 android_keymaster/keymaster_enforcement.cpp \
Janis Danisevskis1455d2e2017-05-11 10:56:27 -0700111 km_openssl/soft_keymaster_enforcement.cpp \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700112 tests/keymaster_enforcement_test.cpp \
113 android_keymaster/keymaster_tags.cpp \
114 android_keymaster/logger.cpp \
115 km_openssl/nist_curve_key_exchange.cpp \
116 tests/nist_curve_key_exchange_test.cpp \
117 key_blob_utils/ocb_utils.cpp \
118 km_openssl/openssl_err.cpp \
119 km_openssl/openssl_utils.cpp \
120 android_keymaster/operation.cpp \
121 android_keymaster/operation_table.cpp \
122 km_openssl/rsa_key.cpp \
123 km_openssl/rsa_key_factory.cpp \
124 legacy_support/rsa_keymaster0_key.cpp \
125 legacy_support/rsa_keymaster1_key.cpp \
126 legacy_support/rsa_keymaster1_operation.cpp \
127 km_openssl/rsa_operation.cpp \
128 android_keymaster/serializable.cpp \
129 contexts/soft_keymaster_context.cpp \
130 contexts/soft_keymaster_device.cpp \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700131 contexts/pure_soft_keymaster_context.cpp \
Janis Danisevskis41d5a742017-05-12 10:43:12 -0700132 km_openssl/symmetric_key.cpp \
Janis Danisevskis3bfda162017-05-12 13:10:41 -0700133 km_openssl/software_random_source.cpp \
134 contexts/soft_attestation_cert.cpp \
Janis Danisevskisfe671b62017-05-31 13:25:54 -0700135 km_openssl/attestation_utils.cpp \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700136 key_blob_utils/software_keyblobs.cpp \
137 km_openssl/wrapped_key.cpp
Shawn Willden398c1582015-05-28 00:04:06 -0600138
Shawn Willden1615f2e2014-08-13 10:37:40 -0600139CCSRCS=$(GTEST)/src/gtest-all.cc
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700140CSRCS=key_blob_utils/ocb.c
Shawn Willden5ada7b62014-07-29 09:44:17 -0600141
142OBJS=$(CPPSRCS:.cpp=.o) $(CCSRCS:.cc=.o) $(CSRCS:.c=.o)
143DEPS=$(CPPSRCS:.cpp=.d) $(CCSRCS:.cc=.d) $(CSRCS:.c=.d)
144
Shawn Willden06298102015-05-25 23:12:48 -0600145BINARIES = \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700146 tests/android_keymaster_messages_test \
147 tests/android_keymaster_test \
148 tests/attestation_record_test \
149 tests/authorization_set_test \
150 tests/ecies_kem_test \
Shawn Willdenbdef0e62018-01-02 06:27:49 -0700151 tests/ckdf_test \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700152 tests/hkdf_test \
153 tests/hmac_test \
154 tests/kdf1_test \
155 tests/kdf2_test \
156 tests/kdf_test \
157 tests/key_blob_test \
158 tests/keymaster_configuration_test \
159 tests/keymaster_enforcement_test \
160 tests/nist_curve_key_exchange_test
Shawn Willden5ada7b62014-07-29 09:44:17 -0600161
Shawn Willden834e8072014-08-09 16:38:53 -0600162.PHONY: coverage memcheck massif clean run
Shawn Willden5ada7b62014-07-29 09:44:17 -0600163
164%.run: %
165 ./$<
166 touch $@
167
168run: $(BINARIES:=.run)
169
170coverage: coverage.info
171 genhtml coverage.info --output-directory coverage
172
173coverage.info: run
174 lcov --capture --directory=. --output-file coverage.info
175
176%.coverage : %
177 $(MAKE) clean && $(MAKE) $<
178 ./$<
179 lcov --capture --directory=. --output-file coverage.info
180 genhtml coverage.info --output-directory coverage
181
182#UNINIT_OPTS=--track-origins=yes
183UNINIT_OPTS=--undef-value-errors=no
184
Shawn Willden834e8072014-08-09 16:38:53 -0600185MEMCHECK_OPTS=--leak-check=full \
Shawn Willden5ada7b62014-07-29 09:44:17 -0600186 --show-reachable=yes \
187 --vgdb=full \
188 $(UNINIT_OPTS) \
Shawn Willden67380a92015-05-13 12:07:50 -0600189 --error-exitcode=1 \
190 --suppressions=valgrind.supp \
191 --gen-suppressions=all
Shawn Willden5ada7b62014-07-29 09:44:17 -0600192
Shawn Willden834e8072014-08-09 16:38:53 -0600193MASSIF_OPTS=--tool=massif \
194 --stacks=yes
195
196%.memcheck : %
197 valgrind $(MEMCHECK_OPTS) ./$< && \
Shawn Willden5ada7b62014-07-29 09:44:17 -0600198 touch $@
199
Shawn Willden834e8072014-08-09 16:38:53 -0600200%.massif : %
201 valgrind $(MASSIF_OPTS) --massif-out-file=$@ ./$<
202
203memcheck: $(BINARIES:=.memcheck)
204
205massif: $(BINARIES:=.massif)
Shawn Willden5ada7b62014-07-29 09:44:17 -0600206
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700207GTEST_OBJS = $(GTEST)/src/gtest-all.o tests/gtest_main.o
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600208
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700209tests/keymaster_configuration_test: tests/keymaster_configuration_test.o \
210 android_keymaster/authorization_set.o \
211 android_keymaster/serializable.o \
212 android_keymaster/logger.o \
213 android_keymaster/keymaster_configuration.o \
Shawn Willdencddf3a42016-03-09 20:03:38 -0700214 $(GTEST_OBJS)
215
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700216tests/hmac_test: tests/hmac_test.o \
217 tests/android_keymaster_test_utils.o \
218 android_keymaster/android_keymaster_utils.o \
219 android_keymaster/authorization_set.o \
220 km_openssl/hmac.o \
221 android_keymaster/keymaster_tags.o \
222 android_keymaster/logger.o \
223 android_keymaster/serializable.o \
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600224 $(GTEST_OBJS)
Thai Duong7689ed62015-03-20 16:50:18 -0700225
Shawn Willdenbdef0e62018-01-02 06:27:49 -0700226tests/ckdf_test: tests/ckdf_test.o \
227 tests/android_keymaster_test_utils.o \
228 android_keymaster/android_keymaster_utils.o \
229 android_keymaster/authorization_set.o \
230 android_keymaster/keymaster_tags.o \
231 android_keymaster/logger.o \
232 android_keymaster/serializable.o \
233 km_openssl/ckdf.o \
234 km_openssl/openssl_err.o \
235 $(GTEST_OBJS)
236
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700237tests/hkdf_test: tests/hkdf_test.o \
238 tests/android_keymaster_test_utils.o \
239 android_keymaster/android_keymaster_utils.o \
240 android_keymaster/authorization_set.o \
241 km_openssl/hkdf.o \
242 km_openssl/hmac.o \
243 km_openssl/kdf.o \
244 android_keymaster/keymaster_tags.o \
245 android_keymaster/logger.o \
246 android_keymaster/serializable.o \
Quan Nguyenf7538e02015-05-21 00:49:11 -0700247 $(GTEST_OBJS)
248
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700249tests/kdf_test: tests/kdf_test.o \
250 android_keymaster/android_keymaster_utils.o \
251 km_openssl/kdf.o \
252 android_keymaster/logger.o \
253 android_keymaster/serializable.o \
Quan Nguyenf7538e02015-05-21 00:49:11 -0700254 $(GTEST_OBJS)
255
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700256tests/kdf1_test: tests/kdf1_test.o \
257 tests/android_keymaster_test_utils.o \
258 android_keymaster/android_keymaster_utils.o \
259 android_keymaster/authorization_set.o \
260 km_openssl/iso18033kdf.o \
261 km_openssl/kdf.o \
262 android_keymaster/keymaster_tags.o \
263 android_keymaster/logger.o \
264 android_keymaster/serializable.o \
Quan Nguyenf7538e02015-05-21 00:49:11 -0700265 $(GTEST_OBJS)
266
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700267tests/kdf2_test: tests/kdf2_test.o \
268 tests/android_keymaster_test_utils.o \
269 android_keymaster/android_keymaster_utils.o \
270 android_keymaster/authorization_set.o \
271 km_openssl/iso18033kdf.o \
272 km_openssl/kdf.o \
273 android_keymaster/keymaster_tags.o \
274 android_keymaster/logger.o \
275 android_keymaster/serializable.o \
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600276 $(GTEST_OBJS)
Thai Duong7689ed62015-03-20 16:50:18 -0700277
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700278tests/nist_curve_key_exchange_test: tests/nist_curve_key_exchange_test.o \
279 tests/android_keymaster_test_utils.o \
280 android_keymaster/authorization_set.o \
281 android_keymaster/keymaster_tags.o \
282 android_keymaster/logger.o \
283 km_openssl/nist_curve_key_exchange.o \
284 km_openssl/openssl_err.o \
285 km_openssl/openssl_utils.o \
286 android_keymaster/serializable.o \
Thai Duongfabacaf2015-03-25 20:14:57 -0700287 $(GTEST_OBJS)
288
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700289tests/ecies_kem_test: tests/ecies_kem_test.o \
290 android_keymaster/android_keymaster_utils.o \
291 tests/android_keymaster_test_utils.o \
292 android_keymaster/authorization_set.o \
293 km_openssl/ecies_kem.o \
294 km_openssl/hkdf.o \
295 km_openssl/hmac.o \
296 km_openssl/kdf.o \
297 android_keymaster/keymaster_tags.o \
298 android_keymaster/logger.o \
299 km_openssl/nist_curve_key_exchange.o \
300 km_openssl/openssl_err.o \
301 km_openssl/openssl_utils.o \
302 android_keymaster/serializable.o \
Thai Duongfabacaf2015-03-25 20:14:57 -0700303 $(GTEST_OBJS)
304
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700305tests/authorization_set_test: tests/authorization_set_test.o \
306 tests/android_keymaster_test_utils.o \
307 android_keymaster/authorization_set.o \
308 android_keymaster/keymaster_tags.o \
309 android_keymaster/logger.o \
310 android_keymaster/serializable.o \
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600311 $(GTEST_OBJS)
Shawn Willden5ada7b62014-07-29 09:44:17 -0600312
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700313tests/key_blob_test: tests/key_blob_test.o \
314 tests/android_keymaster_test_utils.o \
315 android_keymaster/android_keymaster_utils.o \
316 key_blob_utils/auth_encrypted_key_blob.o \
317 android_keymaster/authorization_set.o \
318 key_blob_utils/integrity_assured_key_blob.o \
319 android_keymaster/keymaster_tags.o \
320 android_keymaster/logger.o \
321 key_blob_utils/ocb.o \
322 key_blob_utils/ocb_utils.o \
323 km_openssl/openssl_err.o \
324 android_keymaster/serializable.o \
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600325 $(GTEST_OBJS)
Shawn Willden128ffe02014-08-06 12:31:33 -0600326
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700327tests/android_keymaster_messages_test: tests/android_keymaster_messages_test.o \
328 android_keymaster/android_keymaster_messages.o \
329 tests/android_keymaster_test_utils.o \
330 android_keymaster/android_keymaster_utils.o \
331 android_keymaster/authorization_set.o \
332 android_keymaster/keymaster_tags.o \
333 android_keymaster/logger.o \
334 android_keymaster/serializable.o \
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600335 $(GTEST_OBJS)
Shawn Willden128ffe02014-08-06 12:31:33 -0600336
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700337tests/android_keymaster_test: tests/android_keymaster_test.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700338 android_keymaster/android_keymaster.o \
339 android_keymaster/android_keymaster_messages.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700340 android_keymaster/android_keymaster_utils.o \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700341 android_keymaster/authorization_set.o \
342 android_keymaster/keymaster_enforcement.o \
343 android_keymaster/keymaster_tags.o \
344 android_keymaster/logger.o \
345 android_keymaster/operation.o \
346 android_keymaster/operation_table.o \
347 android_keymaster/serializable.o \
348 contexts/pure_soft_keymaster_context.o \
349 contexts/soft_attestation_cert.o \
350 contexts/soft_keymaster_context.o \
351 contexts/soft_keymaster_device.o \
352 key_blob_utils/auth_encrypted_key_blob.o \
353 key_blob_utils/integrity_assured_key_blob.o \
354 key_blob_utils/ocb.o \
355 key_blob_utils/ocb_utils.o \
356 key_blob_utils/software_keyblobs.o \
357 km_openssl/aes_key.o \
Shawn Willden7efc7722018-01-08 22:00:12 -0700358 km_openssl/aes_key.o \
359 km_openssl/aes_operation.o \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700360 km_openssl/aes_operation.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700361 km_openssl/asymmetric_key.o \
362 km_openssl/asymmetric_key_factory.o \
363 km_openssl/attestation_record.o \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700364 km_openssl/attestation_utils.o \
365 km_openssl/block_cipher_operation.o \
366 km_openssl/ckdf.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700367 km_openssl/ec_key.o \
368 km_openssl/ec_key_factory.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700369 km_openssl/ecdsa_operation.o \
370 km_openssl/hmac_key.o \
371 km_openssl/hmac_operation.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700372 km_openssl/openssl_err.o \
373 km_openssl/openssl_utils.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700374 km_openssl/rsa_key.o \
375 km_openssl/rsa_key_factory.o \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700376 km_openssl/rsa_operation.o \
377 km_openssl/soft_keymaster_enforcement.o \
378 km_openssl/software_random_source.o \
379 km_openssl/symmetric_key.o \
Shawn Willden7efc7722018-01-08 22:00:12 -0700380 km_openssl/triple_des_key.o \
381 km_openssl/triple_des_operation.o \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700382 km_openssl/wrapped_key.o \
383 legacy_support/ec_keymaster0_key.o \
384 legacy_support/ec_keymaster1_key.o \
385 legacy_support/ecdsa_keymaster1_operation.o \
386 legacy_support/keymaster0_engine.o \
387 legacy_support/keymaster1_engine.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700388 legacy_support/rsa_keymaster0_key.o \
389 legacy_support/rsa_keymaster1_key.o \
390 legacy_support/rsa_keymaster1_operation.o \
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700391 tests/android_keymaster_test_utils.o \
Shawn Willden2beb6282015-05-20 16:36:24 -0600392 $(BASE)/system/security/keystore/keyblob_utils.o \
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600393 $(GTEST_OBJS)
Shawn Willden4db3fbd2014-08-08 22:13:44 -0600394
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700395tests/keymaster_enforcement_test: tests/keymaster_enforcement_test.o \
396 android_keymaster/android_keymaster_messages.o \
397 tests/android_keymaster_test_utils.o \
398 android_keymaster/android_keymaster_utils.o \
399 android_keymaster/authorization_set.o \
400 android_keymaster/keymaster_enforcement.o \
Shawn Willden8b940582018-01-02 10:53:39 -0700401 km_openssl/ckdf.o \
402 km_openssl/openssl_err.o \
Janis Danisevskis1455d2e2017-05-11 10:56:27 -0700403 km_openssl/soft_keymaster_enforcement.o \
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700404 android_keymaster/keymaster_tags.o \
405 android_keymaster/logger.o \
406 android_keymaster/serializable.o \
Shawn Willden72a5fdd2015-03-17 20:04:33 -0600407 $(GTEST_OBJS)
Shawn Willden4dc53662015-01-13 15:39:56 -0700408
Janis Danisevskisf54cc932017-05-10 15:29:10 -0700409tests/attestation_record_test: tests/attestation_record_test.o \
410 tests/android_keymaster_test_utils.o \
411 android_keymaster/android_keymaster_utils.o \
412 km_openssl/attestation_record.o \
413 android_keymaster/authorization_set.o \
414 android_keymaster/keymaster_tags.o \
415 android_keymaster/logger.o \
416 km_openssl/openssl_err.o \
417 android_keymaster/serializable.o \
Shawn Willden239c1662016-01-05 17:06:56 -0700418 $(GTEST_OBJS)
419
Shawn Willdendd7e8a02018-01-12 13:03:37 -0700420tests/wrapped_key_test: tests/wrapped_key_test.o \
421 tests/android_keymaster_test_utils.o \
422 android_keymaster/android_keymaster_utils.o \
423 km_openssl/attestation_record.o \
424 android_keymaster/authorization_set.o \
425 android_keymaster/keymaster_tags.o \
426 android_keymaster/logger.o \
427 km_openssl/openssl_err.o \
428 android_keymaster/serializable.o \
429 km_openssl/wrapped_key.o \
430 $(GTEST_OBJS)
431
Shawn Willden1615f2e2014-08-13 10:37:40 -0600432$(GTEST)/src/gtest-all.o: CXXFLAGS:=$(subst -Wmissing-declarations,,$(CXXFLAGS))
Shawn Willden5ada7b62014-07-29 09:44:17 -0600433
434clean:
Shawn Willden834e8072014-08-09 16:38:53 -0600435 rm -f $(OBJS) $(DEPS) $(BINARIES) \
Shawn Willden437fbd12014-08-20 11:59:49 -0600436 $(BINARIES:=.run) $(BINARIES:=.memcheck) $(BINARIES:=.massif) \
Shawn Willdenc6096592015-03-17 15:53:14 -0600437 *gcov *gcno *gcda coverage.info
Shawn Willden5ada7b62014-07-29 09:44:17 -0600438 rm -rf coverage
439
440-include $(CPPSRCS:.cpp=.d)
441-include $(CCSRCS:.cc=.d)