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