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 27LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 28LOCAL_LICENSE_CONDITIONS := notice 29 30LOCAL_MODULE_RELATIVE_PATH := hw 31LOCAL_MODULE_TAGS := optional 32LOCAL_MODULE_OWNER := google 33LOCAL_PROPRIETARY_MODULE := true 34 35LOCAL_CFLAGS += $(COMMON_CFLAGS) 36 37LOCAL_C_INCLUDES += \ 38 device/google/contexthub/firmware/os/inc \ 39 device/google/contexthub/sensorhal \ 40 device/google/contexthub/util/common \ 41 42LOCAL_SRC_FILES := \ 43 Lefty.cpp \ 44 45LOCAL_SHARED_LIBRARIES := \ 46 vendor.google_clockwork.lefty@1.0 \ 47 libbase \ 48 libcutils \ 49 libhidlbase \ 50 libhubconnection \ 51 liblog \ 52 libutils \ 53 54include $(BUILD_SHARED_LIBRARY) 55 56endif 57################################################################################ 58ifeq ($(NANOHUB_SENSORHAL_LEFTY_SERVICE_ENABLED), true) 59 60include $(CLEAR_VARS) 61 62LOCAL_MODULE := liblefty_service_nanohub 63LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 64LOCAL_LICENSE_CONDITIONS := notice 65 66LOCAL_MODULE_TAGS := optional 67LOCAL_MODULE_OWNER := google 68LOCAL_PROPRIETARY_MODULE := true 69 70LOCAL_CFLAGS += $(COMMON_CFLAGS) 71 72LOCAL_C_INCLUDES += \ 73 device/google/contexthub/firmware/os/inc \ 74 device/google/contexthub/sensorhal \ 75 device/google/contexthub/util/common \ 76 77LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 78 79LOCAL_SRC_FILES := \ 80 Lefty.cpp \ 81 lefty_service.cpp \ 82 83LOCAL_SHARED_LIBRARIES := \ 84 vendor.google_clockwork.lefty@1.0 \ 85 libbase \ 86 libcutils \ 87 libhidlbase \ 88 libhubconnection \ 89 liblog \ 90 libutils \ 91 92include $(BUILD_SHARED_LIBRARY) 93 94endif 95################################################################################ 96 97endif 98