blob: 2314122c70ebf285e7b07bd0bae8640753416055 [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
19include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060020ifeq ($(USE_32_BIT_KEYSTORE), true)
21LOCAL_MULTILIB := 32
22endif
Chad Brubaker61c58842015-03-16 11:05:51 -070023LOCAL_CFLAGS := -Wall -Wextra -Werror -Wunused
Chad Brubakerd80c7b42015-03-31 11:04:28 -070024LOCAL_SRC_FILES := keystore.cpp keyblob_utils.cpp operation.cpp auth_token_table.cpp
Kenny Root17208e02013-09-04 13:56:03 -070025LOCAL_SHARED_LIBRARIES := \
26 libbinder \
27 libcutils \
28 libcrypto \
29 libhardware \
30 libkeystore_binder \
31 liblog \
32 libsoftkeymaster \
Riley Spahneaabae92014-06-30 12:39:52 -070033 libutils \
Chad Brubaker919cb2a2015-02-05 21:58:25 -080034 libselinux \
Chad Brubakerd80c7b42015-03-31 11:04:28 -070035 libsoftkeymasterdevice \
Shawn Willden9221bff2015-06-18 18:23:54 -060036 libkeymaster_messages \
37 libkeymaster1
Kenny Roota91203b2012-02-15 15:00:46 -080038LOCAL_MODULE := keystore
Kenny Root70e3a862012-02-15 17:20:23 -080039LOCAL_MODULE_TAGS := optional
Chad Brubaker919cb2a2015-02-05 21:58:25 -080040LOCAL_C_INCLUES := system/keymaster/
Chad Brubakerdb25fcd2015-08-12 11:23:45 -070041LOCAL_CLANG := true
42LOCAL_SANITIZE := integer
Kenny Root6a9cafc2012-11-16 12:53:42 -080043LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Roota91203b2012-02-15 15:00:46 -080044include $(BUILD_EXECUTABLE)
45
46include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060047ifeq ($(USE_32_BIT_KEYSTORE), true)
48LOCAL_MULTILIB := 32
49endif
Kenny Rootda1ed9a2012-04-10 12:34:07 -070050LOCAL_CFLAGS := -Wall -Wextra -Werror
Kenny Roota91203b2012-02-15 15:00:46 -080051LOCAL_SRC_FILES := keystore_cli.cpp
Ying Wanga6fe6202013-04-09 22:05:12 -070052LOCAL_SHARED_LIBRARIES := libcutils libcrypto libkeystore_binder libutils liblog libbinder
Kenny Roota91203b2012-02-15 15:00:46 -080053LOCAL_MODULE := keystore_cli
54LOCAL_MODULE_TAGS := debug
Kenny Root6a9cafc2012-11-16 12:53:42 -080055LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Roota91203b2012-02-15 15:00:46 -080056include $(BUILD_EXECUTABLE)
Kenny Root51878182012-03-13 12:53:19 -070057
58# Library for keystore clients
59include $(CLEAR_VARS)
Shawn Willdenbd4bb2f2014-08-29 16:31:51 -060060ifeq ($(USE_32_BIT_KEYSTORE), true)
61LOCAL_MULTILIB := 32
62endif
Kenny Rootda1ed9a2012-04-10 12:34:07 -070063LOCAL_CFLAGS := -Wall -Wextra -Werror
Kenny Root07438c82012-11-02 15:41:02 -070064LOCAL_SRC_FILES := IKeystoreService.cpp keystore_get.cpp keyblob_utils.cpp
Chad Brubaker919cb2a2015-02-05 21:58:25 -080065LOCAL_SHARED_LIBRARIES := libbinder libutils liblog libsoftkeymasterdevice
Kenny Root07438c82012-11-02 15:41:02 -070066LOCAL_MODULE := libkeystore_binder
Kenny Root51878182012-03-13 12:53:19 -070067LOCAL_MODULE_TAGS := optional
Kenny Root07438c82012-11-02 15:41:02 -070068LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
69LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Chad Brubakerdb25fcd2015-08-12 11:23:45 -070070LOCAL_CLANG := true
71LOCAL_SANITIZE := integer
Kenny Root6a9cafc2012-11-16 12:53:42 -080072LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Root822c3a92012-03-23 16:34:39 -070073include $(BUILD_SHARED_LIBRARY)
Shawn Willden489dfe12015-03-17 10:13:27 -060074
75# Library for unit tests
76include $(CLEAR_VARS)
77ifeq ($(USE_32_BIT_KEYSTORE), true)
78LOCAL_MULTILIB := 32
79endif
Shawn Willden489dfe12015-03-17 10:13:27 -060080LOCAL_CFLAGS := -Wall -Wextra -Werror
81LOCAL_SRC_FILES := auth_token_table.cpp
82LOCAL_MODULE := libkeystore_test
83LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
84LOCAL_STATIC_LIBRARIES := libgtest_main
85LOCAL_SHARED_LIBRARIES := libkeymaster_messages
86LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
87LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
88include $(BUILD_STATIC_LIBRARY)