blob: 1f5d9031efa94adff92dae114f4610b91cd84708 [file] [log] [blame]
Kenny Root70e3a862012-02-15 17:20:23 -08001# Copyright (C) 2012 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
17include $(CLEAR_VARS)
18
Adam Langley72b2bfb2015-01-22 17:21:34 -080019
20ifneq (,$(wildcard $(TOP)/external/boringssl/flavor.mk))
21 include $(TOP)/external/boringssl/flavor.mk
22else
23 include $(TOP)/external/openssl/flavor.mk
24endif
Adam Langley1fb05832014-09-23 17:42:36 -070025ifeq ($(OPENSSL_FLAVOR),BoringSSL)
26 LOCAL_MODULE := libkeystore-engine
Kenny Root70e3a862012-02-15 17:20:23 -080027
Adam Langley1fb05832014-09-23 17:42:36 -070028 LOCAL_SRC_FILES := \
29 android_engine.cpp
Adam Langley1fb05832014-09-23 17:42:36 -070030else
31 LOCAL_MODULE := libkeystore
Kenny Root70e3a862012-02-15 17:20:23 -080032
Kenny Rootde7d7342015-03-11 12:07:12 -070033 LOCAL_MODULE_RELATIVE_PATH := ssl/engines
34
Adam Langley1fb05832014-09-23 17:42:36 -070035 LOCAL_SRC_FILES := \
Kenny Root9d422a52013-06-27 09:14:46 -070036 eng_keystore.cpp \
37 keyhandle.cpp \
Kenny Root77acaa02013-09-06 22:47:54 -070038 ecdsa_meth.cpp \
Kenny Root60711792013-08-16 14:02:41 -070039 dsa_meth.cpp \
Kenny Root9d422a52013-06-27 09:14:46 -070040 rsa_meth.cpp
Kenny Root70e3a862012-02-15 17:20:23 -080041
Adam Langley1fb05832014-09-23 17:42:36 -070042 LOCAL_C_INCLUDES += \
Kenny Root77acaa02013-09-06 22:47:54 -070043 external/openssl/include \
44 external/openssl
Adam Langley1fb05832014-09-23 17:42:36 -070045endif
46
47LOCAL_MODULE_TAGS := optional
48LOCAL_CFLAGS := -fvisibility=hidden -Wall -Werror
Kenny Root70e3a862012-02-15 17:20:23 -080049
50LOCAL_SHARED_LIBRARIES += \
51 libcrypto \
52 liblog \
53 libcutils \
Kenny Root07438c82012-11-02 15:41:02 -070054 libutils \
55 libbinder \
56 libkeystore_binder
Kenny Root70e3a862012-02-15 17:20:23 -080057
Kenny Root6a9cafc2012-11-16 12:53:42 -080058LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
59
Kenny Root70e3a862012-02-15 17:20:23 -080060include $(BUILD_SHARED_LIBRARY)