Shawn Willden | 67380a9 | 2015-05-13 12:07:50 -0600 | [diff] [blame] | 1 | ##### |
| 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 Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 25 | BASE=../.. |
| 26 | SUBS=system/core \ |
| 27 | hardware/libhardware \ |
Shawn Willden | 67380a9 | 2015-05-13 12:07:50 -0600 | [diff] [blame] | 28 | external/gtest \ |
| 29 | system/security/softkeymaster \ |
| 30 | system/security/keystore |
Shawn Willden | 2dfe045 | 2016-10-12 19:50:28 -0600 | [diff] [blame] | 31 | GTEST=$(BASE)/external/googletest/googletest |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 32 | |
| 33 | INCLUDES=$(foreach dir,$(SUBS),-I $(BASE)/$(dir)/include) \ |
Shawn Willden | 98d9b92 | 2014-08-26 08:14:10 -0600 | [diff] [blame] | 34 | -I $(BASE)/libnativehelper/include/nativehelper \ |
Shawn Willden | 2dfe045 | 2016-10-12 19:50:28 -0600 | [diff] [blame] | 35 | -I $(GTEST)/include -isystem $(GTEST) -Iinclude -I$(BASE)/../boringssl/include |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 36 | |
Shawn Willden | 0f906ec | 2015-06-20 09:16:30 -0600 | [diff] [blame] | 37 | ifdef FORCE_32_BIT |
| 38 | ARCH_FLAGS = -m32 |
| 39 | endif |
| 40 | |
Janis Danisevskis | 5b20ae7 | 2017-07-28 16:25:00 -0700 | [diff] [blame] | 41 | ifdef USE_GCC |
| 42 | CXXFLAGS +=-std=c++14 -fprofile-arcs -ftest-coverage |
Shawn Willden | d599b15 | 2015-07-27 16:58:30 -0600 | [diff] [blame] | 43 | CFLAGS += -fprofile-arcs -ftest-coverage |
Janis Danisevskis | 5b20ae7 | 2017-07-28 16:25:00 -0700 | [diff] [blame] | 44 | else |
Nick Desaulniers | 5266551 | 2019-12-05 14:16:44 -0800 | [diff] [blame] | 45 | CC=$(BASE)/prebuilts/clang/host/linux-x86/clang-r370808/bin/clang |
| 46 | CXX=$(BASE)/prebuilts/clang/host/linux-x86/clang-r370808/bin/clang++ |
Janis Danisevskis | 5b20ae7 | 2017-07-28 16:25:00 -0700 | [diff] [blame] | 47 | CXXFLAGS +=-std=c++14 -DKEYMASTER_CLANG_TEST_BUILD |
| 48 | CFLAGS += -DKEYMASTER_CLANG_TEST_BUILD |
Shawn Willden | ebf627f | 2014-08-12 11:15:29 -0600 | [diff] [blame] | 49 | endif |
| 50 | |
Shawn Willden | 0f906ec | 2015-06-20 09:16:30 -0600 | [diff] [blame] | 51 | LDFLAGS += $(ARCH_FLAGS) |
Shawn Willden | cddf3a4 | 2016-03-09 20:03:38 -0700 | [diff] [blame] | 52 | CPPFLAGS = $(INCLUDES) -g -O0 -MD -MP $(ARCH_FLAGS) -DKEYMASTER_UNIT_TEST_BUILD -DHOST_BUILD |
Shawn Willden | 239c166 | 2016-01-05 17:06:56 -0700 | [diff] [blame] | 53 | CXXFLAGS += -Wall -Werror -Wno-unused -Winit-self -Wpointer-arith -Wunused-parameter \ |
Shawn Willden | d599b15 | 2015-07-27 16:58:30 -0600 | [diff] [blame] | 54 | -Werror=sign-compare -Werror=return-type -fno-permissive \ |
Shawn Willden | 0f906ec | 2015-06-20 09:16:30 -0600 | [diff] [blame] | 55 | -Wno-deprecated-declarations -fno-exceptions -DKEYMASTER_NAME_TAGS $(ARCH_FLAGS) |
Shawn Willden | cddf3a4 | 2016-03-09 20:03:38 -0700 | [diff] [blame] | 56 | CFLAGS += $(ARCH_FLAGS) -DKEYMASTER_UNIT_TEST_BUILD -DHOST_BUILD |
Shawn Willden | 567a4a0 | 2014-12-31 12:14:46 -0700 | [diff] [blame] | 57 | |
| 58 | # Uncomment to enable debug logging. |
| 59 | # CXXFLAGS += -DDEBUG |
| 60 | |
Shawn Willden | 67380a9 | 2015-05-13 12:07:50 -0600 | [diff] [blame] | 61 | LDLIBS=-L$(BASE)/../boringssl/build/crypto -lcrypto -lpthread -lstdc++ -lgcov |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 62 | |
Shawn Willden | 1615f2e | 2014-08-13 10:37:40 -0600 | [diff] [blame] | 63 | CPPSRCS=\ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 64 | km_openssl/aes_key.cpp \ |
| 65 | km_openssl/aes_operation.cpp \ |
Shawn Willden | 7efc772 | 2018-01-08 22:00:12 -0700 | [diff] [blame] | 66 | km_openssl/triple_des_key.cpp \ |
| 67 | km_openssl/triple_des_operation.cpp \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 68 | 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 Willden | a2f1a9b | 2018-01-09 09:37:43 -0700 | [diff] [blame] | 77 | km_openssl/block_cipher_operation.cpp \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 78 | 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 Willden | bdef0e6 | 2018-01-02 06:27:49 -0700 | [diff] [blame] | 91 | km_openssl/ckdf.cpp \ |
| 92 | tests/hkdf_test.cpp \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 93 | 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 Danisevskis | 1455d2e | 2017-05-11 10:56:27 -0700 | [diff] [blame] | 111 | km_openssl/soft_keymaster_enforcement.cpp \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 112 | 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 Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 131 | contexts/pure_soft_keymaster_context.cpp \ |
Janis Danisevskis | 41d5a74 | 2017-05-12 10:43:12 -0700 | [diff] [blame] | 132 | km_openssl/symmetric_key.cpp \ |
Janis Danisevskis | 3bfda16 | 2017-05-12 13:10:41 -0700 | [diff] [blame] | 133 | km_openssl/software_random_source.cpp \ |
| 134 | contexts/soft_attestation_cert.cpp \ |
Janis Danisevskis | fe671b6 | 2017-05-31 13:25:54 -0700 | [diff] [blame] | 135 | km_openssl/attestation_utils.cpp \ |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 136 | key_blob_utils/software_keyblobs.cpp \ |
| 137 | km_openssl/wrapped_key.cpp |
Shawn Willden | 398c158 | 2015-05-28 00:04:06 -0600 | [diff] [blame] | 138 | |
Shawn Willden | 1615f2e | 2014-08-13 10:37:40 -0600 | [diff] [blame] | 139 | CCSRCS=$(GTEST)/src/gtest-all.cc |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 140 | CSRCS=key_blob_utils/ocb.c |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 141 | |
| 142 | OBJS=$(CPPSRCS:.cpp=.o) $(CCSRCS:.cc=.o) $(CSRCS:.c=.o) |
| 143 | DEPS=$(CPPSRCS:.cpp=.d) $(CCSRCS:.cc=.d) $(CSRCS:.c=.d) |
| 144 | |
Shawn Willden | 0629810 | 2015-05-25 23:12:48 -0600 | [diff] [blame] | 145 | BINARIES = \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 146 | 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 Willden | bdef0e6 | 2018-01-02 06:27:49 -0700 | [diff] [blame] | 151 | tests/ckdf_test \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 152 | 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 Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 161 | |
Shawn Willden | 834e807 | 2014-08-09 16:38:53 -0600 | [diff] [blame] | 162 | .PHONY: coverage memcheck massif clean run |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 163 | |
| 164 | %.run: % |
| 165 | ./$< |
| 166 | touch $@ |
| 167 | |
| 168 | run: $(BINARIES:=.run) |
| 169 | |
| 170 | coverage: coverage.info |
| 171 | genhtml coverage.info --output-directory coverage |
| 172 | |
| 173 | coverage.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 |
| 183 | UNINIT_OPTS=--undef-value-errors=no |
| 184 | |
Shawn Willden | 834e807 | 2014-08-09 16:38:53 -0600 | [diff] [blame] | 185 | MEMCHECK_OPTS=--leak-check=full \ |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 186 | --show-reachable=yes \ |
| 187 | --vgdb=full \ |
| 188 | $(UNINIT_OPTS) \ |
Shawn Willden | 67380a9 | 2015-05-13 12:07:50 -0600 | [diff] [blame] | 189 | --error-exitcode=1 \ |
| 190 | --suppressions=valgrind.supp \ |
| 191 | --gen-suppressions=all |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 192 | |
Shawn Willden | 834e807 | 2014-08-09 16:38:53 -0600 | [diff] [blame] | 193 | MASSIF_OPTS=--tool=massif \ |
| 194 | --stacks=yes |
| 195 | |
| 196 | %.memcheck : % |
| 197 | valgrind $(MEMCHECK_OPTS) ./$< && \ |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 198 | touch $@ |
| 199 | |
Shawn Willden | 834e807 | 2014-08-09 16:38:53 -0600 | [diff] [blame] | 200 | %.massif : % |
| 201 | valgrind $(MASSIF_OPTS) --massif-out-file=$@ ./$< |
| 202 | |
| 203 | memcheck: $(BINARIES:=.memcheck) |
| 204 | |
| 205 | massif: $(BINARIES:=.massif) |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 206 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 207 | GTEST_OBJS = $(GTEST)/src/gtest-all.o tests/gtest_main.o |
Shawn Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 208 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 209 | tests/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 Willden | cddf3a4 | 2016-03-09 20:03:38 -0700 | [diff] [blame] | 214 | $(GTEST_OBJS) |
| 215 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 216 | tests/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 Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 224 | $(GTEST_OBJS) |
Thai Duong | 7689ed6 | 2015-03-20 16:50:18 -0700 | [diff] [blame] | 225 | |
Shawn Willden | bdef0e6 | 2018-01-02 06:27:49 -0700 | [diff] [blame] | 226 | tests/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 Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 237 | tests/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 Nguyen | f7538e0 | 2015-05-21 00:49:11 -0700 | [diff] [blame] | 247 | $(GTEST_OBJS) |
| 248 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 249 | tests/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 Nguyen | f7538e0 | 2015-05-21 00:49:11 -0700 | [diff] [blame] | 254 | $(GTEST_OBJS) |
| 255 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 256 | tests/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 Nguyen | f7538e0 | 2015-05-21 00:49:11 -0700 | [diff] [blame] | 265 | $(GTEST_OBJS) |
| 266 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 267 | tests/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 Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 276 | $(GTEST_OBJS) |
Thai Duong | 7689ed6 | 2015-03-20 16:50:18 -0700 | [diff] [blame] | 277 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 278 | tests/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 Duong | fabacaf | 2015-03-25 20:14:57 -0700 | [diff] [blame] | 287 | $(GTEST_OBJS) |
| 288 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 289 | tests/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 Duong | fabacaf | 2015-03-25 20:14:57 -0700 | [diff] [blame] | 303 | $(GTEST_OBJS) |
| 304 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 305 | tests/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 Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 311 | $(GTEST_OBJS) |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 312 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 313 | tests/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 Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 325 | $(GTEST_OBJS) |
Shawn Willden | 128ffe0 | 2014-08-06 12:31:33 -0600 | [diff] [blame] | 326 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 327 | tests/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 Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 335 | $(GTEST_OBJS) |
Shawn Willden | 128ffe0 | 2014-08-06 12:31:33 -0600 | [diff] [blame] | 336 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 337 | tests/android_keymaster_test: tests/android_keymaster_test.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 338 | android_keymaster/android_keymaster.o \ |
| 339 | android_keymaster/android_keymaster_messages.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 340 | android_keymaster/android_keymaster_utils.o \ |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 341 | 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 Willden | 7efc772 | 2018-01-08 22:00:12 -0700 | [diff] [blame] | 358 | km_openssl/aes_key.o \ |
| 359 | km_openssl/aes_operation.o \ |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 360 | km_openssl/aes_operation.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 361 | km_openssl/asymmetric_key.o \ |
| 362 | km_openssl/asymmetric_key_factory.o \ |
| 363 | km_openssl/attestation_record.o \ |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 364 | km_openssl/attestation_utils.o \ |
| 365 | km_openssl/block_cipher_operation.o \ |
| 366 | km_openssl/ckdf.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 367 | km_openssl/ec_key.o \ |
| 368 | km_openssl/ec_key_factory.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 369 | km_openssl/ecdsa_operation.o \ |
| 370 | km_openssl/hmac_key.o \ |
| 371 | km_openssl/hmac_operation.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 372 | km_openssl/openssl_err.o \ |
| 373 | km_openssl/openssl_utils.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 374 | km_openssl/rsa_key.o \ |
| 375 | km_openssl/rsa_key_factory.o \ |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 376 | 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 Willden | 7efc772 | 2018-01-08 22:00:12 -0700 | [diff] [blame] | 380 | km_openssl/triple_des_key.o \ |
| 381 | km_openssl/triple_des_operation.o \ |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 382 | 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 Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 388 | legacy_support/rsa_keymaster0_key.o \ |
| 389 | legacy_support/rsa_keymaster1_key.o \ |
| 390 | legacy_support/rsa_keymaster1_operation.o \ |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 391 | tests/android_keymaster_test_utils.o \ |
Shawn Willden | 2beb628 | 2015-05-20 16:36:24 -0600 | [diff] [blame] | 392 | $(BASE)/system/security/keystore/keyblob_utils.o \ |
Shawn Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 393 | $(GTEST_OBJS) |
Shawn Willden | 4db3fbd | 2014-08-08 22:13:44 -0600 | [diff] [blame] | 394 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 395 | tests/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 Willden | 8b94058 | 2018-01-02 10:53:39 -0700 | [diff] [blame] | 401 | km_openssl/ckdf.o \ |
| 402 | km_openssl/openssl_err.o \ |
Janis Danisevskis | 1455d2e | 2017-05-11 10:56:27 -0700 | [diff] [blame] | 403 | km_openssl/soft_keymaster_enforcement.o \ |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 404 | android_keymaster/keymaster_tags.o \ |
| 405 | android_keymaster/logger.o \ |
| 406 | android_keymaster/serializable.o \ |
Shawn Willden | 72a5fdd | 2015-03-17 20:04:33 -0600 | [diff] [blame] | 407 | $(GTEST_OBJS) |
Shawn Willden | 4dc5366 | 2015-01-13 15:39:56 -0700 | [diff] [blame] | 408 | |
Janis Danisevskis | f54cc93 | 2017-05-10 15:29:10 -0700 | [diff] [blame] | 409 | tests/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 Willden | 239c166 | 2016-01-05 17:06:56 -0700 | [diff] [blame] | 418 | $(GTEST_OBJS) |
| 419 | |
Shawn Willden | dd7e8a0 | 2018-01-12 13:03:37 -0700 | [diff] [blame] | 420 | tests/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 Willden | 1615f2e | 2014-08-13 10:37:40 -0600 | [diff] [blame] | 432 | $(GTEST)/src/gtest-all.o: CXXFLAGS:=$(subst -Wmissing-declarations,,$(CXXFLAGS)) |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 433 | |
| 434 | clean: |
Shawn Willden | 834e807 | 2014-08-09 16:38:53 -0600 | [diff] [blame] | 435 | rm -f $(OBJS) $(DEPS) $(BINARIES) \ |
Shawn Willden | 437fbd1 | 2014-08-20 11:59:49 -0600 | [diff] [blame] | 436 | $(BINARIES:=.run) $(BINARIES:=.memcheck) $(BINARIES:=.massif) \ |
Shawn Willden | c609659 | 2015-03-17 15:53:14 -0600 | [diff] [blame] | 437 | *gcov *gcno *gcda coverage.info |
Shawn Willden | 5ada7b6 | 2014-07-29 09:44:17 -0600 | [diff] [blame] | 438 | rm -rf coverage |
| 439 | |
| 440 | -include $(CPPSRCS:.cpp=.d) |
| 441 | -include $(CCSRCS:.cc=.d) |