blob: d6e61876d9f17e3542f8bd4498a66953b1fdbd67 [file] [log] [blame]
Mathias Agopianfc328812010-07-14 23:41:37 -07001LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_SRC_FILES:= \
Peng Xu6a2d3a02015-12-21 12:00:23 -08005 BatteryService.cpp \
6 CorrectedGyroSensor.cpp \
Mathias Agopian984826c2011-05-17 22:54:42 -07007 Fusion.cpp \
8 GravitySensor.cpp \
9 LinearAccelerationSensor.cpp \
10 OrientationSensor.cpp \
Peng Xu6a2d3a02015-12-21 12:00:23 -080011 RecentEventLogger.cpp \
Mathias Agopian984826c2011-05-17 22:54:42 -070012 RotationVectorSensor.cpp \
Peng Xu6a2d3a02015-12-21 12:00:23 -080013 SensorEventConnection.cpp \
Mathias Agopian984826c2011-05-17 22:54:42 -070014 SensorFusion.cpp \
15 SensorInterface.cpp \
Peng Xu0cc8f802016-04-05 23:46:03 -070016 SensorList.cpp \
Peng Xu6a2d3a02015-12-21 12:00:23 -080017 SensorRecord.cpp \
18 SensorService.cpp \
19 SensorServiceUtils.cpp \
Peng Xueb4d6282015-12-10 18:02:41 -080020
Mathias Agopianfc328812010-07-14 23:41:37 -070021LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"
22
Greg Kaiserbe6dd4e2016-03-22 12:21:46 -070023LOCAL_CFLAGS += -Wall -Werror -Wextra
Aurimas Liutikas6f7854b2016-02-19 14:08:07 -080024
Mathias Agopianb6df7d02013-05-09 14:53:35 -070025LOCAL_CFLAGS += -fvisibility=hidden
26
Andreas Huber99fdbb52016-10-10 13:22:58 -070027ifeq ($(ENABLE_TREBLE), true)
28LOCAL_SRC_FILES += SensorDeviceTreble.cpp
29LOCAL_CFLAGS += -DENABLE_TREBLE=1
30else
31LOCAL_SRC_FILES += SensorDevice.cpp
32endif
33
Mathias Agopianfc328812010-07-14 23:41:37 -070034LOCAL_SHARED_LIBRARIES := \
Peng Xu6a2d3a02015-12-21 12:00:23 -080035 libcutils \
36 libhardware \
37 libhardware_legacy \
38 libutils \
39 liblog \
40 libbinder \
41 libui \
Greg Kaiser53ca2e02016-06-21 16:11:14 -070042 libgui \
Andreas Huber99fdbb52016-10-10 13:22:58 -070043 libcrypto \
44
45ifeq ($(ENABLE_TREBLE), true)
46
47LOCAL_SHARED_LIBRARIES += \
48 libbase \
49 libhidl \
50 libhwbinder \
51 android.hardware.sensors@1.0
52
53LOCAL_STATIC_LIBRARIES := \
54 android.hardware.sensors@1.0-convert
55
56endif # ENABLE_TREBLE
Mathias Agopianfc328812010-07-14 23:41:37 -070057
Mathias Agopianfc328812010-07-14 23:41:37 -070058LOCAL_MODULE:= libsensorservice
59
60include $(BUILD_SHARED_LIBRARY)
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070061
62#####################################################################
63# build executable
64include $(CLEAR_VARS)
65
66LOCAL_SRC_FILES:= \
Peng Xu6a2d3a02015-12-21 12:00:23 -080067 main_sensorservice.cpp
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070068
69LOCAL_SHARED_LIBRARIES := \
Peng Xu6a2d3a02015-12-21 12:00:23 -080070 libsensorservice \
71 libbinder \
72 libutils
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070073
Greg Kaiserbe6dd4e2016-03-22 12:21:46 -070074LOCAL_CFLAGS := -Wall -Werror -Wextra
75
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070076LOCAL_MODULE_TAGS := optional
77
78LOCAL_MODULE:= sensorservice
79
80include $(BUILD_EXECUTABLE)