blob: e26aebe8f116c4a07f2b7bbca34b9636ba4ed97f [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
Chad Brubakerd80c7b42015-03-31 11:04:28 -070030LOCAL_SRC_FILES := keystore.cpp keyblob_utils.cpp operation.cpp auth_token_table.cpp
Kenny Root17208e02013-09-04 13:56:03 -070031LOCAL_SHARED_LIBRARIES := \
32 libbinder \
33 libcutils \
34 libcrypto \
35 libhardware \
36 libkeystore_binder \
37 liblog \
38 libsoftkeymaster \
Riley Spahneaabae92014-06-30 12:39:52 -070039 libutils \
Chad Brubaker919cb2a2015-02-05 21:58:25 -080040 libselinux \
Chad Brubakerd80c7b42015-03-31 11:04:28 -070041 libsoftkeymasterdevice \
Shawn Willden9221bff2015-06-18 18:23:54 -060042 libkeymaster_messages \
43 libkeymaster1
Kenny Roota91203b2012-02-15 15:00:46 -080044LOCAL_MODULE := keystore
Kenny Root70e3a862012-02-15 17:20:23 -080045LOCAL_MODULE_TAGS := optional
Tom Cherryad299712015-08-14 13:06:37 -070046LOCAL_INIT_RC := keystore.rc
Chad Brubaker919cb2a2015-02-05 21:58:25 -080047LOCAL_C_INCLUES := system/keymaster/
Chad Brubakerdb25fcd2015-08-12 11:23:45 -070048LOCAL_CLANG := true
49LOCAL_SANITIZE := integer
Kenny Root6a9cafc2012-11-16 12:53:42 -080050LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Roota91203b2012-02-15 15:00:46 -080051include $(BUILD_EXECUTABLE)
52
53include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060054ifeq ($(USE_32_BIT_KEYSTORE), true)
55LOCAL_MULTILIB := 32
56endif
Kenny Rootda1ed9a2012-04-10 12:34:07 -070057LOCAL_CFLAGS := -Wall -Wextra -Werror
Kenny Roota91203b2012-02-15 15:00:46 -080058LOCAL_SRC_FILES := keystore_cli.cpp
Ying Wanga6fe6202013-04-09 22:05:12 -070059LOCAL_SHARED_LIBRARIES := libcutils libcrypto libkeystore_binder libutils liblog libbinder
Kenny Roota91203b2012-02-15 15:00:46 -080060LOCAL_MODULE := keystore_cli
61LOCAL_MODULE_TAGS := debug
Kenny Root6a9cafc2012-11-16 12:53:42 -080062LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Roota91203b2012-02-15 15:00:46 -080063include $(BUILD_EXECUTABLE)
Kenny Root51878182012-03-13 12:53:19 -070064
Darren Krahn69a3dbc2015-09-22 16:21:04 -070065include $(CLEAR_VARS)
66ifeq ($(USE_32_BIT_KEYSTORE), true)
67LOCAL_MULTILIB := 32
68endif
Jorge Lucangeli Obes1c954292015-10-16 13:02:29 -070069LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter
Darren Krahn69a3dbc2015-09-22 16:21:04 -070070LOCAL_SRC_FILES := keystore_cli_v2.cpp
71LOCAL_SHARED_LIBRARIES := \
72 libchrome \
73 libkeymaster_messages \
74 libkeystore_binder
75LOCAL_MODULE := keystore_cli_v2
76LOCAL_MODULE_TAGS := debug
Darren Krahn251cb282015-09-28 08:51:18 -070077LOCAL_C_INCLUDES := $(LOCAL_PATH)/include external/gtest/include
Darren Krahn69a3dbc2015-09-22 16:21:04 -070078LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
79include $(BUILD_EXECUTABLE)
80
Kenny Root51878182012-03-13 12:53:19 -070081# Library for keystore clients
82include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060083ifeq ($(USE_32_BIT_KEYSTORE), true)
84LOCAL_MULTILIB := 32
85endif
Kenny Rootda1ed9a2012-04-10 12:34:07 -070086LOCAL_CFLAGS := -Wall -Wextra -Werror
Darren Krahn69a3dbc2015-09-22 16:21:04 -070087LOCAL_SRC_FILES := \
88 IKeystoreService.cpp \
89 keyblob_utils.cpp \
Darren Krahn251cb282015-09-28 08:51:18 -070090 keystore_client.proto \
Darren Krahn69a3dbc2015-09-22 16:21:04 -070091 keystore_client_impl.cpp \
92 keystore_get.cpp
93LOCAL_SHARED_LIBRARIES := \
94 libbinder \
95 libkeymaster_messages \
96 liblog \
Darren Krahn251cb282015-09-28 08:51:18 -070097 libprotobuf-cpp-lite \
Darren Krahn69a3dbc2015-09-22 16:21:04 -070098 libsoftkeymasterdevice \
99 libutils
Darren Krahn251cb282015-09-28 08:51:18 -0700100LOCAL_MODULE_CLASS := SHARED_LIBRARIES
Kenny Root07438c82012-11-02 15:41:02 -0700101LOCAL_MODULE := libkeystore_binder
Kenny Root51878182012-03-13 12:53:19 -0700102LOCAL_MODULE_TAGS := optional
Darren Krahn251cb282015-09-28 08:51:18 -0700103LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(call keystore_proto_include)
Kenny Root07438c82012-11-02 15:41:02 -0700104LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Chad Brubakerdb25fcd2015-08-12 11:23:45 -0700105LOCAL_CLANG := true
106LOCAL_SANITIZE := integer
Kenny Root6a9cafc2012-11-16 12:53:42 -0800107LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Root822c3a92012-03-23 16:34:39 -0700108include $(BUILD_SHARED_LIBRARY)
Shawn Willden489dfe12015-03-17 10:13:27 -0600109
110# Library for unit tests
111include $(CLEAR_VARS)
112ifeq ($(USE_32_BIT_KEYSTORE), true)
113LOCAL_MULTILIB := 32
114endif
Shawn Willden489dfe12015-03-17 10:13:27 -0600115LOCAL_CFLAGS := -Wall -Wextra -Werror
116LOCAL_SRC_FILES := auth_token_table.cpp
117LOCAL_MODULE := libkeystore_test
118LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
119LOCAL_STATIC_LIBRARIES := libgtest_main
120LOCAL_SHARED_LIBRARIES := libkeymaster_messages
121LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
122LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
123include $(BUILD_STATIC_LIBRARY)