Home | History | Annotate | Download | only in keystore-engine
      1 # 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 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 include $(CLEAR_VARS)
     18 
     19 
     20 ifneq (,$(wildcard $(TOP)/external/boringssl/flavor.mk))
     21 	include $(TOP)/external/boringssl/flavor.mk
     22 else
     23 	include $(TOP)/external/openssl/flavor.mk
     24 endif
     25 ifeq ($(OPENSSL_FLAVOR),BoringSSL)
     26   LOCAL_MODULE := libkeystore-engine
     27 
     28   LOCAL_SRC_FILES := \
     29 	android_engine.cpp
     30 else
     31   LOCAL_MODULE := libkeystore
     32 
     33   LOCAL_MODULE_RELATIVE_PATH := ssl/engines
     34 
     35   LOCAL_SRC_FILES := \
     36 	eng_keystore.cpp \
     37 	keyhandle.cpp \
     38 	ecdsa_meth.cpp \
     39 	dsa_meth.cpp \
     40 	rsa_meth.cpp
     41 
     42   LOCAL_C_INCLUDES += \
     43 	external/openssl/include \
     44 	external/openssl
     45 endif
     46 
     47 LOCAL_MODULE_TAGS := optional
     48 LOCAL_CFLAGS := -fvisibility=hidden -Wall -Werror
     49 
     50 LOCAL_SHARED_LIBRARIES += \
     51 	libcrypto \
     52 	liblog \
     53 	libcutils \
     54 	libutils \
     55 	libbinder \
     56 	libkeystore_binder
     57 
     58 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     59 
     60 include $(BUILD_SHARED_LIBRARY)
     61