blob: 34da7bee830f4fbab343c6886e17e378f925ee78 [file] [log] [blame]
Andres Morales748b6902015-09-08 17:56:07 -07001#
2# Copyright (C) 2015 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
17# WARNING: Everything listed here will be built on ALL platforms,
18# including x86, the emulator, and the SDK. Modules must be uniquely
19# named (liblights.panda), and must build everywhere, or limit themselves
20# to only building on ARM if they include assembly. Individual makefiles
21# are responsible for having their own logic, for fine-grained control.
22
23LOCAL_PATH:= $(call my-dir)
24
25include $(CLEAR_VARS)
26
27###
28# trusty_keymaster is a binary used only for on-device testing. It
29# runs Trusty Keymaster through a basic set of operations with RSA
30# and ECDSA keys.
31###
32LOCAL_MODULE := trusty_keymaster
33LOCAL_C_INCLUDES:= \
34 system/keymaster \
35 external/openssl/include
36LOCAL_SRC_FILES := \
37 trusty_keymaster_device.cpp \
38 trusty_keymaster_ipc.c \
39 trusty_keymaster_main.cpp
40LOCAL_SHARED_LIBRARIES := \
41 libcrypto \
42 libcutils \
43 libkeymaster1 \
44 libtrusty \
45 libkeymaster_messages \
46 liblog
47
48include $(BUILD_EXECUTABLE)
49
50###
51# keystore.trusty is the HAL used by keystore on Trusty devices.
52##
53
54include $(CLEAR_VARS)
55
56LOCAL_MODULE := keystore.trusty
57LOCAL_MODULE_RELATIVE_PATH := hw
58LOCAL_SRC_FILES := module.cpp \
59 trusty_keymaster_ipc.c \
60 trusty_keymaster_device.cpp
61LOCAL_C_INCLUDES := system/keymaster
62LOCAL_CLFAGS = -fvisibility=hidden -Wall -Werror
63LOCAL_SHARED_LIBRARIES := \
64 libcrypto \
65 libkeymaster_messages \
66 libtrusty \
67 liblog \
68 libcutils
69LOCAL_MODULE_TAGS := optional
70LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
71
72# Symlink keymaster.trusty.so -> keymaster.<device>.so so libhardware can find it.
73LOCAL_POST_INSTALL_CMD = \
74 $(hide) ln -sf $(notdir $(LOCAL_INSTALLED_MODULE)) $(dir $(LOCAL_INSTALLED_MODULE))keystore.$(TARGET_DEVICE).so
75
76include $(BUILD_SHARED_LIBRARY)