blob: f17d5eb2b1f0101623a6bf3754c80ae2200c2dbd [file] [log] [blame]
Kenny Roota91203b2012-02-15 15:00:46 -08001#
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
17LOCAL_PATH := $(call my-dir)
18
Darren Krahn251cb282015-09-28 08:51:18 -070019# This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS
20# which varies depending on what is being built.
21define keystore_proto_include
22$(call local-generated-sources-dir)/proto/$(LOCAL_PATH)
23endef
24
Kenny Roota91203b2012-02-15 15:00:46 -080025include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060026ifeq ($(USE_32_BIT_KEYSTORE), true)
27LOCAL_MULTILIB := 32
28endif
Chad Brubaker61c58842015-03-16 11:05:51 -070029LOCAL_CFLAGS := -Wall -Wextra -Werror -Wunused
Shawn Willdenc1d1fee2016-01-26 22:44:56 -070030LOCAL_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 Root17208e02013-09-04 13:56:03 -070042LOCAL_SHARED_LIBRARIES := \
43 libbinder \
44 libcutils \
45 libcrypto \
46 libhardware \
47 libkeystore_binder \
48 liblog \
49 libsoftkeymaster \
Riley Spahneaabae92014-06-30 12:39:52 -070050 libutils \
Chad Brubaker919cb2a2015-02-05 21:58:25 -080051 libselinux \
Chad Brubakerd80c7b42015-03-31 11:04:28 -070052 libsoftkeymasterdevice \
Shawn Willden9221bff2015-06-18 18:23:54 -060053 libkeymaster_messages \
54 libkeymaster1
Kenny Roota91203b2012-02-15 15:00:46 -080055LOCAL_MODULE := keystore
Kenny Root70e3a862012-02-15 17:20:23 -080056LOCAL_MODULE_TAGS := optional
Tom Cherryad299712015-08-14 13:06:37 -070057LOCAL_INIT_RC := keystore.rc
Chad Brubaker919cb2a2015-02-05 21:58:25 -080058LOCAL_C_INCLUES := system/keymaster/
Chad Brubakerdb25fcd2015-08-12 11:23:45 -070059LOCAL_CLANG := true
60LOCAL_SANITIZE := integer
Kenny Root6a9cafc2012-11-16 12:53:42 -080061LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Roota91203b2012-02-15 15:00:46 -080062include $(BUILD_EXECUTABLE)
63
64include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060065ifeq ($(USE_32_BIT_KEYSTORE), true)
66LOCAL_MULTILIB := 32
67endif
Kenny Rootda1ed9a2012-04-10 12:34:07 -070068LOCAL_CFLAGS := -Wall -Wextra -Werror
Kenny Roota91203b2012-02-15 15:00:46 -080069LOCAL_SRC_FILES := keystore_cli.cpp
Ying Wanga6fe6202013-04-09 22:05:12 -070070LOCAL_SHARED_LIBRARIES := libcutils libcrypto libkeystore_binder libutils liblog libbinder
Kenny Roota91203b2012-02-15 15:00:46 -080071LOCAL_MODULE := keystore_cli
72LOCAL_MODULE_TAGS := debug
Kenny Root6a9cafc2012-11-16 12:53:42 -080073LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Roota91203b2012-02-15 15:00:46 -080074include $(BUILD_EXECUTABLE)
Kenny Root51878182012-03-13 12:53:19 -070075
Darren Krahn69a3dbc2015-09-22 16:21:04 -070076include $(CLEAR_VARS)
77ifeq ($(USE_32_BIT_KEYSTORE), true)
78LOCAL_MULTILIB := 32
79endif
Shawn Willdend3fac682016-01-26 13:50:17 -070080LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -DKEYMASTER_NAME_TAGS
Darren Krahn69a3dbc2015-09-22 16:21:04 -070081LOCAL_SRC_FILES := keystore_cli_v2.cpp
82LOCAL_SHARED_LIBRARIES := \
83 libchrome \
84 libkeymaster_messages \
85 libkeystore_binder
86LOCAL_MODULE := keystore_cli_v2
87LOCAL_MODULE_TAGS := debug
Darren Krahn251cb282015-09-28 08:51:18 -070088LOCAL_C_INCLUDES := $(LOCAL_PATH)/include external/gtest/include
Darren Krahn69a3dbc2015-09-22 16:21:04 -070089LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
90include $(BUILD_EXECUTABLE)
91
Kenny Root51878182012-03-13 12:53:19 -070092# Library for keystore clients
93include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060094ifeq ($(USE_32_BIT_KEYSTORE), true)
95LOCAL_MULTILIB := 32
96endif
Kenny Rootda1ed9a2012-04-10 12:34:07 -070097LOCAL_CFLAGS := -Wall -Wextra -Werror
Darren Krahn69a3dbc2015-09-22 16:21:04 -070098LOCAL_SRC_FILES := \
99 IKeystoreService.cpp \
100 keyblob_utils.cpp \
Darren Krahn251cb282015-09-28 08:51:18 -0700101 keystore_client.proto \
Darren Krahn69a3dbc2015-09-22 16:21:04 -0700102 keystore_client_impl.cpp \
103 keystore_get.cpp
104LOCAL_SHARED_LIBRARIES := \
105 libbinder \
106 libkeymaster_messages \
107 liblog \
Darren Krahn251cb282015-09-28 08:51:18 -0700108 libprotobuf-cpp-lite \
Darren Krahn69a3dbc2015-09-22 16:21:04 -0700109 libsoftkeymasterdevice \
110 libutils
Darren Krahn251cb282015-09-28 08:51:18 -0700111LOCAL_MODULE_CLASS := SHARED_LIBRARIES
Kenny Root07438c82012-11-02 15:41:02 -0700112LOCAL_MODULE := libkeystore_binder
Kenny Root51878182012-03-13 12:53:19 -0700113LOCAL_MODULE_TAGS := optional
Darren Krahn251cb282015-09-28 08:51:18 -0700114LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(call keystore_proto_include)
Kenny Root07438c82012-11-02 15:41:02 -0700115LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Christopher Wiley955cd842016-04-13 16:49:23 -0700116LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libbinder
Chad Brubakerdb25fcd2015-08-12 11:23:45 -0700117LOCAL_CLANG := true
118LOCAL_SANITIZE := integer
Kenny Root6a9cafc2012-11-16 12:53:42 -0800119LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Root822c3a92012-03-23 16:34:39 -0700120include $(BUILD_SHARED_LIBRARY)
Shawn Willden489dfe12015-03-17 10:13:27 -0600121
122# Library for unit tests
123include $(CLEAR_VARS)
124ifeq ($(USE_32_BIT_KEYSTORE), true)
125LOCAL_MULTILIB := 32
126endif
Shawn Willden489dfe12015-03-17 10:13:27 -0600127LOCAL_CFLAGS := -Wall -Wextra -Werror
128LOCAL_SRC_FILES := auth_token_table.cpp
129LOCAL_MODULE := libkeystore_test
130LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
131LOCAL_STATIC_LIBRARIES := libgtest_main
132LOCAL_SHARED_LIBRARIES := libkeymaster_messages
133LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
134LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
135include $(BUILD_STATIC_LIBRARY)