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
19include $(CLEAR_VARS)
20ifeq ($(USE_32_BIT_KEYSTORE), true)
21LOCAL_MULTILIB := 32
22endif
23LOCAL_CFLAGS := -Wall -Wextra -Werror -Wunused
24LOCAL_SRC_FILES := keystore.cpp keyblob_utils.cpp operation.cpp auth_token_table.cpp
25LOCAL_SHARED_LIBRARIES := \
26	libbinder \
27	libcutils \
28	libcrypto \
29	libhardware \
30	libkeystore_binder \
31	liblog \
32	libsoftkeymaster \
33	libutils \
34	libselinux \
35	libsoftkeymasterdevice \
36	libkeymaster_messages \
37	libkeymaster1
38LOCAL_MODULE := keystore
39LOCAL_MODULE_TAGS := optional
40LOCAL_C_INCLUES := system/keymaster/
41LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
42include $(BUILD_EXECUTABLE)
43
44include $(CLEAR_VARS)
45ifeq ($(USE_32_BIT_KEYSTORE), true)
46LOCAL_MULTILIB := 32
47endif
48LOCAL_CFLAGS := -Wall -Wextra -Werror
49LOCAL_SRC_FILES := keystore_cli.cpp
50LOCAL_SHARED_LIBRARIES := libcutils libcrypto libkeystore_binder libutils liblog libbinder
51LOCAL_MODULE := keystore_cli
52LOCAL_MODULE_TAGS := debug
53LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
54include $(BUILD_EXECUTABLE)
55
56# Library for keystore clients
57include $(CLEAR_VARS)
58ifeq ($(USE_32_BIT_KEYSTORE), true)
59LOCAL_MULTILIB := 32
60endif
61LOCAL_CFLAGS := -Wall -Wextra -Werror
62LOCAL_SRC_FILES := IKeystoreService.cpp keystore_get.cpp keyblob_utils.cpp
63LOCAL_SHARED_LIBRARIES := libbinder libutils liblog libsoftkeymasterdevice
64LOCAL_MODULE := libkeystore_binder
65LOCAL_MODULE_TAGS := optional
66LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
67LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
68LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
69include $(BUILD_SHARED_LIBRARY)
70
71# Library for unit tests
72include $(CLEAR_VARS)
73ifeq ($(USE_32_BIT_KEYSTORE), true)
74LOCAL_MULTILIB := 32
75endif
76LOCAL_CFLAGS := -Wall -Wextra -Werror
77LOCAL_SRC_FILES := auth_token_table.cpp
78LOCAL_MODULE := libkeystore_test
79LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
80LOCAL_STATIC_LIBRARIES := libgtest_main
81LOCAL_SHARED_LIBRARIES := libkeymaster_messages
82LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
83LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
84include $(BUILD_STATIC_LIBRARY)
85