blob: 093c3d10414e0ae2aebe8854a7a6b4ddb9a2161d [file] [log] [blame]
Shawn Willden0a4df7e2014-08-28 16:09:05 -06001# Copyright (C) 2014 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
16
Shawn Willden3d1ccb32014-09-03 18:01:13 -060017###
18# libkeymaster_messages contains just the code necessary to communicate with a
19# GoogleKeymaster implementation, e.g. one running in TrustZone.
20#
21# Note that this library is too large; it should not include ocb.c and not use
22# openssl. At present it must, because the code needs refactoring to separate
23# concerns a bit better.
24#
25# TODO(swillden@google.com): Refactor and pare this down.
26##
Shawn Willden0a4df7e2014-08-28 16:09:05 -060027include $(CLEAR_VARS)
Shawn Willden3d1ccb32014-09-03 18:01:13 -060028LOCAL_MODULE:= libkeymaster_messages
Shawn Willden0a4df7e2014-08-28 16:09:05 -060029LOCAL_SRC_FILES:= \
30 authorization_set.cpp \
Shawn Willden0a4df7e2014-08-28 16:09:05 -060031 google_keymaster_messages.cpp \
32 google_keymaster_utils.cpp \
Shawn Willden0a4df7e2014-08-28 16:09:05 -060033 ocb.c \
Shawn Willden3d1ccb32014-09-03 18:01:13 -060034 key_blob.cpp \
Shawn Willden0a4df7e2014-08-28 16:09:05 -060035 serializable.cpp
36LOCAL_C_INCLUDES := \
37 $(LOCAL_PATH)/include \
38 external/openssl/include
39LOCAL_SHARED_LIBRARIES := libcrypto
40LOCAL_CFLAGS = -Wall -Werror
41LOCAL_MODULE_TAGS := optional
42LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
43LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Shawn Willden3d1ccb32014-09-03 18:01:13 -060044include $(BUILD_STATIC_LIBRARY)
45
46include $(CLEAR_VARS)
47LOCAL_MODULE:= libkeymaster
48LOCAL_SRC_FILES:= \
49 authorization_set.cpp \
50 google_keymaster_messages.cpp \
51 google_keymaster.cpp \
52 google_keymaster_utils.cpp \
53 ocb.c \
54 key_blob.cpp \
55 serializable.cpp
56LOCAL_C_INCLUDES := \
57 $(LOCAL_PATH)/include \
58 external/openssl/include
59LOCAL_SHARED_LIBRARIES := libcrypto
60LOCAL_CFLAGS = -Wall -Werror
61LOCAL_MODULE_TAGS := optional
62LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
63LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
64include $(BUILD_STATIC_LIBRARY)