16c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# Copyright (C) 2015 The Android Open Source Project
26c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales#
36c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# Licensed under the Apache License, Version 2.0 (the "License");
46c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# you may not use this file except in compliance with the License.
56c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# You may obtain a copy of the License at
66c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales#
76c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales#      http://www.apache.org/licenses/LICENSE-2.0
86c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales#
96c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# Unless required by applicable law or agreed to in writing, software
106c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# distributed under the License is distributed on an "AS IS" BASIS,
116c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
126c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# See the License for the specific language governing permissions and
136c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales# limitations under the License.
146c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales
156c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres MoralesLOCAL_PATH := $(call my-dir)
166c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales
176c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales###
187d0f0406314df47b7502c3cd72dcefb83ead7132Andres Morales# libgatekeeper contains just the code necessary to communicate with a
197d0f0406314df47b7502c3cd72dcefb83ead7132Andres Morales# GoogleGateKeeper implementation, e.g. one running in TrustZone.
206c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales##
216c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Moralesinclude $(CLEAR_VARS)
227d0f0406314df47b7502c3cd72dcefb83ead7132Andres MoralesLOCAL_MODULE:= libgatekeeper
23ac80818fd9e477d142dd8ed2f3902ba3757855c9Andres MoralesLOCAL_SRC_FILES := \
247d0f0406314df47b7502c3cd72dcefb83ead7132Andres Morales	gatekeeper_messages.cpp \
257d0f0406314df47b7502c3cd72dcefb83ead7132Andres Morales	gatekeeper.cpp
266c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres MoralesLOCAL_C_INCLUDES := \
276c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Morales	$(LOCAL_PATH)/include
28edd3e3dc860ff3d99c0320a6ee7d66347b4dd1c3Andres MoralesLOCAL_CFLAGS = -Wall -Werror -g
296c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres MoralesLOCAL_MODULE_TAGS := optional
306c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres MoralesLOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
316c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres MoralesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
3222febf8e7b6aed20db450b5967a63790562f7c6dIvan Krasin# TODO(krasin): reenable coverage flags, when the new Clang toolchain is released.
3322febf8e7b6aed20db450b5967a63790562f7c6dIvan Krasin# Currently, if enabled, these flags will cause an internal error in Clang.
3422febf8e7b6aed20db450b5967a63790562f7c6dIvan Krasin# Bug: 25119481
3522febf8e7b6aed20db450b5967a63790562f7c6dIvan KrasinLOCAL_CLANG_CFLAGS += -fno-sanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp
3622febf8e7b6aed20db450b5967a63790562f7c6dIvan Krasin
376c9fe69766c5a8f0a7d5bd91ac465c625e64b474Andres Moralesinclude $(BUILD_SHARED_LIBRARY)
38b2abaa89b8090c7f14048d4404a3eb146f709a6aAndres Morales
393c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasad###
403c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasad# libgatekeeper_static is an empty static library that exports
413c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasad# all of the files in gatekeeper as includes.
423c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasad###
433c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasadinclude $(CLEAR_VARS)
443c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand PrasadLOCAL_MODULE := libgatekeeper_static
453c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand PrasadLOCAL_EXPORT_C_INCLUDE_DIRS := \
463c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasad        $(LOCAL_PATH) \
473c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasad        $(LOCAL_PATH)/include
483c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand PrasadLOCAL_MODULE_TAGS := optional
493c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand PrasadLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
503c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasadinclude $(BUILD_STATIC_LIBRARY)
513c4cbf7f9434f54f8d306c059fcb7007ecb4a937Anand Prasad
5299482129e592892ef40613195d2cbcd640e031cdAndres Moralesinclude $(call first-makefiles-under,$(LOCAL_PATH))
53