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 15LOCAL_PATH := $(call my-dir) 16 17ifeq ($(TARGET_USES_NANOHUB_SENSORHAL), true) 18 19COMMON_CFLAGS := -Wall -Werror -Wextra 20 21################################################################################ 22ifeq ($(NANOHUB_SENSORHAL_LEFTY_IMPL_ENABLED), true) 23 24include $(CLEAR_VARS) 25 26LOCAL_MODULE := vendor.google_clockwork.lefty@1.0-impl.nanohub 27 28LOCAL_MODULE_RELATIVE_PATH := hw 29LOCAL_MODULE_TAGS := optional 30LOCAL_MODULE_OWNER := google 31LOCAL_PROPRIETARY_MODULE := true 32 33LOCAL_CFLAGS += $(COMMON_CFLAGS) 34 35LOCAL_C_INCLUDES += \ 36 device/google/contexthub/firmware/os/inc \ 37 device/google/contexthub/sensorhal \ 38 device/google/contexthub/util/common \ 39 40LOCAL_SRC_FILES := \ 41 Lefty.cpp \ 42 43LOCAL_SHARED_LIBRARIES := \ 44 vendor.google_clockwork.lefty@1.0 \ 45 libbase \ 46 libcutils \ 47 libhidlbase \ 48 libhubconnection \ 49 liblog \ 50 libutils \ 51 52include $(BUILD_SHARED_LIBRARY) 53 54endif 55################################################################################ 56ifeq ($(NANOHUB_SENSORHAL_LEFTY_SERVICE_ENABLED), true) 57 58include $(CLEAR_VARS) 59 60LOCAL_MODULE := liblefty_service_nanohub 61 62LOCAL_MODULE_TAGS := optional 63LOCAL_MODULE_OWNER := google 64LOCAL_PROPRIETARY_MODULE := true 65 66LOCAL_CFLAGS += $(COMMON_CFLAGS) 67 68LOCAL_C_INCLUDES += \ 69 device/google/contexthub/firmware/os/inc \ 70 device/google/contexthub/sensorhal \ 71 device/google/contexthub/util/common \ 72 73LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 74 75LOCAL_SRC_FILES := \ 76 Lefty.cpp \ 77 lefty_service.cpp \ 78 79LOCAL_SHARED_LIBRARIES := \ 80 vendor.google_clockwork.lefty@1.0 \ 81 libbase \ 82 libcutils \ 83 libhidlbase \ 84 libhubconnection \ 85 liblog \ 86 libutils \ 87 88include $(BUILD_SHARED_LIBRARY) 89 90endif 91################################################################################ 92 93endif 94