OSDN Git Service

sensors: iio: remove events dependency if __NO_EVENTS__ is set
[android-x86/hardware-intel-libsensors.git] / Android.mk
1 # Copyright (c) 2015 Intel Corporation
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 # IIO sensors HAL module implementation, compiled as hw/iio-sensors-hal.so
16
17 ifeq ($(USE_IIO_SENSOR_HAL),true)
18
19 LOCAL_PATH := $(call my-dir)
20
21 include $(CLEAR_VARS)
22
23 src_path := .
24 src_files := $(src_path)/entry.c \
25              $(src_path)/enumeration.c \
26              $(src_path)/control.c \
27              $(src_path)/description.c \
28              $(src_path)/utils.c \
29              $(src_path)/transform.c \
30              $(src_path)/compass-calibration.c \
31              $(src_path)/matrix-ops.c \
32              $(src_path)/gyro-calibration.c \
33              $(src_path)/filtering.c \
34              $(src_path)/discovery.c \
35              $(src_path)/accel-calibration.c \
36
37 LOCAL_C_INCLUDES += $(LOCAL_PATH) vendor/intel/hardware/iio-sensors
38 ifeq ($(HAL_AUTODETECT),true)
39 LOCAL_MODULE := iio-sensors-hal
40 else
41 LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM)
42 endif
43 LOCAL_MODULE_OWNER := intel
44 LOCAL_MODULE_RELATIVE_PATH := hw
45 LOCAL_MODULE_TAGS := optional
46 LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -fvisibility=hidden
47 ifeq ($(NO_IIO_EVENTS),true)
48 LOCAL_CFLAGS += -D__NO_EVENTS__
49 endif
50 LOCAL_LDFLAGS := -Wl,--gc-sections
51 LOCAL_SHARED_LIBRARIES := liblog libcutils libdl
52 LOCAL_PRELINK_MODULE := false
53 LOCAL_SRC_FILES := $(src_files)
54 LOCAL_PROPRIETARY_MODULE := true
55 include $(BUILD_SHARED_LIBRARY)
56
57 include $(CLEAR_VARS)
58 LOCAL_C_INCLUDES += $(LOCAL_PATH) vendor/intel/hardware/iio-sensors
59 LOCAL_MODULE := sens
60 LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -fvisibility=hidden
61 LOCAL_SHARED_LIBRARIES := liblog libcutils libdl
62 LOCAL_SRC_FILES := sens.c
63 LOCAL_MODULE_TAGS := eng
64 LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
65 include $(BUILD_EXECUTABLE)
66
67 endif
68
69
70 # Activity HAL module implementation
71
72 ifeq ($(USE_IIO_ACTIVITY_RECOGNITION_HAL),true)
73
74 include $(CLEAR_VARS)
75
76 src_path := .
77 activity_src_files := $(src_path)/activity_event_entry.c \
78                       $(src_path)/discovery.c \
79                       $(src_path)/utils.c \
80
81 LOCAL_C_INCLUDES += $(LOCAL_PATH) vendor/intel/hardware/iio-sensors
82 LOCAL_MODULE := activity_recognition.$(TARGET_BOARD_PLATFORM)
83 LOCAL_MODULE_OWNER := intel
84 LOCAL_MODULE_RELATIVE_PATH := hw
85 LOCAL_MODULE_TAGS := optional
86 LOCAL_CFLAGS := -DLOG_TAG=\"Activity\" -fvisibility=hidden
87 LOCAL_LDFLAGS := -Wl,--gc-sections
88 LOCAL_SHARED_LIBRARIES := liblog libcutils
89 LOCAL_PRELINK_MODULE := false
90 LOCAL_SRC_FILES := $(activity_src_files)
91 LOCAL_PROPRIETARY_MODULE := true
92 include $(BUILD_SHARED_LIBRARY)
93
94 include $(CLEAR_VARS)
95 LOCAL_C_INCLUDES += $(LOCAL_PATH) vendor/intel/hardware/iio-sensors
96 LOCAL_MODULE := activity
97 LOCAL_CFLAGS := -DLOG_TAG=\"Activity\" -fvisibility=hidden
98 LOCAL_SHARED_LIBRARIES := liblog libcutils libdl
99 LOCAL_SRC_FILES := activity.c
100 LOCAL_MODULE_TAGS := eng
101 LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
102 include $(BUILD_EXECUTABLE)
103
104 endif