Kenny Root | a91203b | 2012-02-15 15:00:46 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2009 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
Darren Krahn | 251cb28 | 2015-09-28 08:51:18 -0700 | [diff] [blame] | 19 | # This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS |
| 20 | # which varies depending on what is being built. |
| 21 | define keystore_proto_include |
| 22 | $(call local-generated-sources-dir)/proto/$(LOCAL_PATH) |
| 23 | endef |
| 24 | |
Kenny Root | a91203b | 2012-02-15 15:00:46 -0800 | [diff] [blame] | 25 | include $(CLEAR_VARS) |
Shawn Willden | bd4bb2f | 2014-08-29 16:31:51 -0600 | [diff] [blame] | 26 | ifeq ($(USE_32_BIT_KEYSTORE), true) |
| 27 | LOCAL_MULTILIB := 32 |
| 28 | endif |
Chad Brubaker | 61c5884 | 2015-03-16 11:05:51 -0700 | [diff] [blame] | 29 | LOCAL_CFLAGS := -Wall -Wextra -Werror -Wunused |
Shawn Willden | 6507c27 | 2016-01-05 22:51:48 -0700 | [diff] [blame^] | 30 | LOCAL_SRC_FILES := \ |
| 31 | auth_token_table.cpp \ |
| 32 | blob.cpp \ |
| 33 | entropy.cpp \ |
| 34 | key_store_service.cpp \ |
| 35 | keyblob_utils.cpp \ |
| 36 | keystore.cpp \ |
| 37 | keystore_main.cpp \ |
| 38 | keystore_utils.cpp \ |
| 39 | operation.cpp \ |
| 40 | permissions.cpp \ |
| 41 | user_state.cpp |
Kenny Root | 17208e0 | 2013-09-04 13:56:03 -0700 | [diff] [blame] | 42 | LOCAL_SHARED_LIBRARIES := \ |
| 43 | libbinder \ |
| 44 | libcutils \ |
| 45 | libcrypto \ |
| 46 | libhardware \ |
| 47 | libkeystore_binder \ |
| 48 | liblog \ |
| 49 | libsoftkeymaster \ |
Riley Spahn | eaabae9 | 2014-06-30 12:39:52 -0700 | [diff] [blame] | 50 | libutils \ |
Chad Brubaker | 919cb2a | 2015-02-05 21:58:25 -0800 | [diff] [blame] | 51 | libselinux \ |
Chad Brubaker | d80c7b4 | 2015-03-31 11:04:28 -0700 | [diff] [blame] | 52 | libsoftkeymasterdevice \ |
Shawn Willden | 9221bff | 2015-06-18 18:23:54 -0600 | [diff] [blame] | 53 | libkeymaster_messages \ |
| 54 | libkeymaster1 |
Kenny Root | a91203b | 2012-02-15 15:00:46 -0800 | [diff] [blame] | 55 | LOCAL_MODULE := keystore |
Kenny Root | 70e3a86 | 2012-02-15 17:20:23 -0800 | [diff] [blame] | 56 | LOCAL_MODULE_TAGS := optional |
Tom Cherry | ad29971 | 2015-08-14 13:06:37 -0700 | [diff] [blame] | 57 | LOCAL_INIT_RC := keystore.rc |
Kenny Root | 6a9cafc | 2012-11-16 12:53:42 -0800 | [diff] [blame] | 58 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Kenny Root | a91203b | 2012-02-15 15:00:46 -0800 | [diff] [blame] | 59 | include $(BUILD_EXECUTABLE) |
| 60 | |
| 61 | include $(CLEAR_VARS) |
Shawn Willden | bd4bb2f | 2014-08-29 16:31:51 -0600 | [diff] [blame] | 62 | ifeq ($(USE_32_BIT_KEYSTORE), true) |
| 63 | LOCAL_MULTILIB := 32 |
| 64 | endif |
Kenny Root | da1ed9a | 2012-04-10 12:34:07 -0700 | [diff] [blame] | 65 | LOCAL_CFLAGS := -Wall -Wextra -Werror |
Kenny Root | a91203b | 2012-02-15 15:00:46 -0800 | [diff] [blame] | 66 | LOCAL_SRC_FILES := keystore_cli.cpp |
Ying Wang | a6fe620 | 2013-04-09 22:05:12 -0700 | [diff] [blame] | 67 | LOCAL_SHARED_LIBRARIES := libcutils libcrypto libkeystore_binder libutils liblog libbinder |
Kenny Root | a91203b | 2012-02-15 15:00:46 -0800 | [diff] [blame] | 68 | LOCAL_MODULE := keystore_cli |
| 69 | LOCAL_MODULE_TAGS := debug |
Kenny Root | 6a9cafc | 2012-11-16 12:53:42 -0800 | [diff] [blame] | 70 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Kenny Root | a91203b | 2012-02-15 15:00:46 -0800 | [diff] [blame] | 71 | include $(BUILD_EXECUTABLE) |
Kenny Root | 5187818 | 2012-03-13 12:53:19 -0700 | [diff] [blame] | 72 | |
Darren Krahn | 69a3dbc | 2015-09-22 16:21:04 -0700 | [diff] [blame] | 73 | include $(CLEAR_VARS) |
| 74 | ifeq ($(USE_32_BIT_KEYSTORE), true) |
| 75 | LOCAL_MULTILIB := 32 |
| 76 | endif |
Jorge Lucangeli Obes | 1c95429 | 2015-10-16 13:02:29 -0700 | [diff] [blame] | 77 | LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter |
Darren Krahn | 69a3dbc | 2015-09-22 16:21:04 -0700 | [diff] [blame] | 78 | LOCAL_SRC_FILES := keystore_cli_v2.cpp |
| 79 | LOCAL_SHARED_LIBRARIES := \ |
| 80 | libchrome \ |
| 81 | libkeymaster_messages \ |
| 82 | libkeystore_binder |
| 83 | LOCAL_MODULE := keystore_cli_v2 |
| 84 | LOCAL_MODULE_TAGS := debug |
Darren Krahn | 251cb28 | 2015-09-28 08:51:18 -0700 | [diff] [blame] | 85 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include external/gtest/include |
Darren Krahn | 69a3dbc | 2015-09-22 16:21:04 -0700 | [diff] [blame] | 86 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 87 | include $(BUILD_EXECUTABLE) |
| 88 | |
Kenny Root | 5187818 | 2012-03-13 12:53:19 -0700 | [diff] [blame] | 89 | # Library for keystore clients |
| 90 | include $(CLEAR_VARS) |
Shawn Willden | bd4bb2f | 2014-08-29 16:31:51 -0600 | [diff] [blame] | 91 | ifeq ($(USE_32_BIT_KEYSTORE), true) |
| 92 | LOCAL_MULTILIB := 32 |
| 93 | endif |
Kenny Root | da1ed9a | 2012-04-10 12:34:07 -0700 | [diff] [blame] | 94 | LOCAL_CFLAGS := -Wall -Wextra -Werror |
Darren Krahn | 69a3dbc | 2015-09-22 16:21:04 -0700 | [diff] [blame] | 95 | LOCAL_SRC_FILES := \ |
| 96 | IKeystoreService.cpp \ |
| 97 | keyblob_utils.cpp \ |
Darren Krahn | 251cb28 | 2015-09-28 08:51:18 -0700 | [diff] [blame] | 98 | keystore_client.proto \ |
Darren Krahn | 69a3dbc | 2015-09-22 16:21:04 -0700 | [diff] [blame] | 99 | keystore_client_impl.cpp \ |
| 100 | keystore_get.cpp |
| 101 | LOCAL_SHARED_LIBRARIES := \ |
| 102 | libbinder \ |
| 103 | libkeymaster_messages \ |
| 104 | liblog \ |
Darren Krahn | 251cb28 | 2015-09-28 08:51:18 -0700 | [diff] [blame] | 105 | libprotobuf-cpp-lite \ |
Darren Krahn | 69a3dbc | 2015-09-22 16:21:04 -0700 | [diff] [blame] | 106 | libsoftkeymasterdevice \ |
| 107 | libutils |
Darren Krahn | 251cb28 | 2015-09-28 08:51:18 -0700 | [diff] [blame] | 108 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
Kenny Root | 07438c8 | 2012-11-02 15:41:02 -0700 | [diff] [blame] | 109 | LOCAL_MODULE := libkeystore_binder |
Kenny Root | 5187818 | 2012-03-13 12:53:19 -0700 | [diff] [blame] | 110 | LOCAL_MODULE_TAGS := optional |
Darren Krahn | 251cb28 | 2015-09-28 08:51:18 -0700 | [diff] [blame] | 111 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(call keystore_proto_include) |
Kenny Root | 07438c8 | 2012-11-02 15:41:02 -0700 | [diff] [blame] | 112 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Kenny Root | 6a9cafc | 2012-11-16 12:53:42 -0800 | [diff] [blame] | 113 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Kenny Root | 822c3a9 | 2012-03-23 16:34:39 -0700 | [diff] [blame] | 114 | include $(BUILD_SHARED_LIBRARY) |
Shawn Willden | 489dfe1 | 2015-03-17 10:13:27 -0600 | [diff] [blame] | 115 | |
| 116 | # Library for unit tests |
| 117 | include $(CLEAR_VARS) |
| 118 | ifeq ($(USE_32_BIT_KEYSTORE), true) |
| 119 | LOCAL_MULTILIB := 32 |
| 120 | endif |
Shawn Willden | 489dfe1 | 2015-03-17 10:13:27 -0600 | [diff] [blame] | 121 | LOCAL_CFLAGS := -Wall -Wextra -Werror |
| 122 | LOCAL_SRC_FILES := auth_token_table.cpp |
| 123 | LOCAL_MODULE := libkeystore_test |
| 124 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 125 | LOCAL_STATIC_LIBRARIES := libgtest_main |
| 126 | LOCAL_SHARED_LIBRARIES := libkeymaster_messages |
| 127 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
| 128 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 129 | include $(BUILD_STATIC_LIBRARY) |