• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    libhidltransport \
49    libhubconnection \
50    liblog \
51    libutils \
52
53include $(BUILD_SHARED_LIBRARY)
54
55endif
56################################################################################
57ifeq ($(NANOHUB_SENSORHAL_LEFTY_SERVICE_ENABLED), true)
58
59include $(CLEAR_VARS)
60
61LOCAL_MODULE := liblefty_service_nanohub
62
63LOCAL_MODULE_TAGS := optional
64LOCAL_MODULE_OWNER := google
65LOCAL_PROPRIETARY_MODULE := true
66
67LOCAL_CFLAGS += $(COMMON_CFLAGS)
68
69LOCAL_C_INCLUDES += \
70    device/google/contexthub/firmware/os/inc \
71    device/google/contexthub/sensorhal \
72    device/google/contexthub/util/common \
73
74LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
75
76LOCAL_SRC_FILES := \
77    Lefty.cpp \
78    lefty_service.cpp \
79
80LOCAL_SHARED_LIBRARIES := \
81    vendor.google_clockwork.lefty@1.0 \
82    libbase \
83    libcutils \
84    libhidlbase \
85    libhidltransport \
86    libhubconnection \
87    liblog \
88    libutils \
89
90include $(BUILD_SHARED_LIBRARY)
91
92endif
93################################################################################
94
95endif
96