Home | History | Annotate | Download | only in keymaster
      1 # 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 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 ###
     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 (a] google.com): Refactor and pare this down.
     26 ##
     27 include $(CLEAR_VARS)
     28 LOCAL_MODULE:= libkeymaster_messages
     29 LOCAL_SRC_FILES:= \
     30 		authorization_set.cpp \
     31 		google_keymaster_messages.cpp \
     32 		google_keymaster_utils.cpp \
     33 		ocb.c \
     34 		key_blob.cpp \
     35 		serializable.cpp
     36 LOCAL_C_INCLUDES := \
     37 	$(LOCAL_PATH)/include \
     38 	external/openssl/include
     39 LOCAL_SHARED_LIBRARIES := libcrypto
     40 LOCAL_CFLAGS = -Wall -Werror
     41 LOCAL_MODULE_TAGS := optional
     42 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
     43 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     44 include $(BUILD_STATIC_LIBRARY)
     45 
     46 include $(CLEAR_VARS)
     47 LOCAL_MODULE:= libkeymaster
     48 LOCAL_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
     56 LOCAL_C_INCLUDES := \
     57 	$(LOCAL_PATH)/include \
     58 	external/openssl/include
     59 LOCAL_SHARED_LIBRARIES := libcrypto
     60 LOCAL_CFLAGS = -Wall -Werror
     61 LOCAL_MODULE_TAGS := optional
     62 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
     63 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     64 include $(BUILD_STATIC_LIBRARY)
     65