1# Copyright (C) 2017 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 16LOCAL_DIR := $(GET_LOCAL_DIR) 17KEYMASTER_ROOT := system/keymaster 18KEYMASTER_DIR := trusty/user/app/keymaster 19NANOPB_DIR := external/nanopb-c 20MODULE := $(LOCAL_DIR) 21 22MANIFEST := $(LOCAL_DIR)/manifest.json 23 24# Uncomment the following lines to generate protobuf files and remove 25# $(KEYMASTER_DIR)/keymaster_attributes.pb.c from MODULE_SRCS. For detail 26# explanation, please see the comments in *.proto file. 27# 28# PB_GEN_DIR := $(call TOBUILDDIR,proto) 29# include trusty/user/base/make/compile_proto.mk 30# $(eval $(call compile_proto,$(KEYMASTER_DIR)/keymaster_attributes.proto,$(PB_GEN_DIR))) 31# MODULE_SRCS += $(NANOPB_DEPS) $(NANOPB_GENERATED_C) 32# MODULE_SRCDEPS += $(NANOPB_GENERATED_HEADER) 33# MODULE_INCLOUDES += $(PB_GEN_DIR) 34 35MODULE_SRCS += \ 36 $(KEYMASTER_DIR)/secure_storage_manager.cpp \ 37 $(KEYMASTER_DIR)/second_imei_attestation.cpp \ 38 $(LOCAL_DIR)/main.cpp \ 39 $(KEYMASTER_ROOT)/android_keymaster/logger.cpp \ 40 $(KEYMASTER_DIR)/keymaster_attributes.pb.c \ 41 $(NANOPB_DIR)/pb_common.c \ 42 $(NANOPB_DIR)/pb_encode.c \ 43 $(NANOPB_DIR)/pb_decode.c \ 44 45MODULE_LIBRARY_DEPS += \ 46 trusty/user/base/lib/libc-trusty \ 47 trusty/user/base/lib/libstdc++-trusty \ 48 trusty/user/base/lib/rng \ 49 trusty/user/base/lib/storage \ 50 trusty/user/base/lib/unittest \ 51 52MODULE_COMPILEFLAGS += -DPB_FIELD_16BIT 53MODULE_COMPILEFLAGS += -DPB_NO_STATIC_ASSERT 54 55MODULE_INCLUDES += \ 56 $(KEYMASTER_ROOT) \ 57 $(LOCAL_DIR) \ 58 $(KEYMASTER_DIR) \ 59 $(KEYMASTER_ROOT)/include \ 60 hardware/libhardware/include \ 61 lib/lib/storage/include \ 62 lib/interface/storage/include \ 63 $(NANOPB_DIR) \ 64 65include make/trusted_app.mk 66 67