• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17LOCAL_PATH := $(call my-dir)
18
19# 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
25include $(CLEAR_VARS)
26ifeq ($(USE_32_BIT_KEYSTORE), true)
27LOCAL_MULTILIB := 32
28endif
29LOCAL_CFLAGS := -Wall -Wextra -Werror -Wunused
30LOCAL_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
42LOCAL_SHARED_LIBRARIES := \
43	libbinder \
44	libcutils \
45	libcrypto \
46	libhardware \
47	libkeystore_binder \
48	liblog \
49	libsoftkeymaster \
50	libutils \
51	libselinux \
52	libsoftkeymasterdevice \
53	libkeymaster_messages \
54	libkeymaster1
55LOCAL_MODULE := keystore
56LOCAL_MODULE_TAGS := optional
57LOCAL_INIT_RC := keystore.rc
58LOCAL_C_INCLUES := system/keymaster/
59LOCAL_CLANG := true
60LOCAL_SANITIZE := integer
61LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
62include $(BUILD_EXECUTABLE)
63
64include $(CLEAR_VARS)
65ifeq ($(USE_32_BIT_KEYSTORE), true)
66LOCAL_MULTILIB := 32
67endif
68LOCAL_CFLAGS := -Wall -Wextra -Werror
69LOCAL_SRC_FILES := keystore_cli.cpp
70LOCAL_SHARED_LIBRARIES := libcutils libcrypto libkeystore_binder libutils liblog libbinder
71LOCAL_MODULE := keystore_cli
72LOCAL_MODULE_TAGS := debug
73LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
74include $(BUILD_EXECUTABLE)
75
76include $(CLEAR_VARS)
77ifeq ($(USE_32_BIT_KEYSTORE), true)
78LOCAL_MULTILIB := 32
79endif
80LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -DKEYMASTER_NAME_TAGS
81LOCAL_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
88LOCAL_C_INCLUDES := $(LOCAL_PATH)/include external/gtest/include
89LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
90include $(BUILD_EXECUTABLE)
91
92# Library for keystore clients
93include $(CLEAR_VARS)
94ifeq ($(USE_32_BIT_KEYSTORE), true)
95LOCAL_MULTILIB := 32
96endif
97LOCAL_CFLAGS := -Wall -Wextra -Werror
98LOCAL_SRC_FILES := \
99	IKeystoreService.cpp \
100	keyblob_utils.cpp \
101	keystore_client.proto \
102	keystore_client_impl.cpp \
103	keystore_get.cpp
104LOCAL_SHARED_LIBRARIES := \
105	libbinder \
106	libkeymaster_messages \
107	liblog \
108	libprotobuf-cpp-lite \
109	libsoftkeymasterdevice \
110	libutils
111LOCAL_MODULE_CLASS := SHARED_LIBRARIES
112LOCAL_MODULE := libkeystore_binder
113LOCAL_MODULE_TAGS := optional
114LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(call keystore_proto_include)
115LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
116LOCAL_CLANG := true
117LOCAL_SANITIZE := integer
118LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
119include $(BUILD_SHARED_LIBRARY)
120
121# Library for unit tests
122include $(CLEAR_VARS)
123ifeq ($(USE_32_BIT_KEYSTORE), true)
124LOCAL_MULTILIB := 32
125endif
126LOCAL_CFLAGS := -Wall -Wextra -Werror
127LOCAL_SRC_FILES := auth_token_table.cpp
128LOCAL_MODULE := libkeystore_test
129LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
130LOCAL_STATIC_LIBRARIES := libgtest_main
131LOCAL_SHARED_LIBRARIES := libkeymaster_messages
132LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
133LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
134include $(BUILD_STATIC_LIBRARY)
135