blob: c41630a20be63181d0af29c9ad632af75e5d1d91 [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 Xue36e3472016-11-03 11:57:10 -070013 SensorDirectConnection.cpp \
Peng Xu6a2d3a02015-12-21 12:00:23 -080014 SensorEventConnection.cpp \
Mathias Agopian984826c2011-05-17 22:54:42 -070015 SensorFusion.cpp \
16 SensorInterface.cpp \
Peng Xu0cc8f802016-04-05 23:46:03 -070017 SensorList.cpp \
Peng Xu6a2d3a02015-12-21 12:00:23 -080018 SensorRecord.cpp \
19 SensorService.cpp \
20 SensorServiceUtils.cpp \
Peng Xueb4d6282015-12-10 18:02:41 -080021
Mathias Agopianfc328812010-07-14 23:41:37 -070022LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"
23
Greg Kaiserbe6dd4e2016-03-22 12:21:46 -070024LOCAL_CFLAGS += -Wall -Werror -Wextra
Aurimas Liutikas6f7854b2016-02-19 14:08:07 -080025
Mathias Agopianb6df7d02013-05-09 14:53:35 -070026LOCAL_CFLAGS += -fvisibility=hidden
27
Andreas Huber99fdbb52016-10-10 13:22:58 -070028ifeq ($(ENABLE_TREBLE), true)
29LOCAL_SRC_FILES += SensorDeviceTreble.cpp
30LOCAL_CFLAGS += -DENABLE_TREBLE=1
31else
32LOCAL_SRC_FILES += SensorDevice.cpp
33endif
34
Mathias Agopianfc328812010-07-14 23:41:37 -070035LOCAL_SHARED_LIBRARIES := \
Peng Xu6a2d3a02015-12-21 12:00:23 -080036 libcutils \
37 libhardware \
38 libhardware_legacy \
39 libutils \
40 liblog \
41 libbinder \
42 libui \
Greg Kaiser53ca2e02016-06-21 16:11:14 -070043 libgui \
Andreas Huber99fdbb52016-10-10 13:22:58 -070044 libcrypto \
45
46ifeq ($(ENABLE_TREBLE), true)
47
48LOCAL_SHARED_LIBRARIES += \
49 libbase \
Yifan Hong67a47622016-11-17 13:02:06 -080050 libhidlbase \
51 libhidltransport \
Andreas Huber99fdbb52016-10-10 13:22:58 -070052 libhwbinder \
53 android.hardware.sensors@1.0
54
55LOCAL_STATIC_LIBRARIES := \
56 android.hardware.sensors@1.0-convert
57
58endif # ENABLE_TREBLE
Mathias Agopianfc328812010-07-14 23:41:37 -070059
Mathias Agopianfc328812010-07-14 23:41:37 -070060LOCAL_MODULE:= libsensorservice
61
62include $(BUILD_SHARED_LIBRARY)
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070063
64#####################################################################
65# build executable
66include $(CLEAR_VARS)
67
68LOCAL_SRC_FILES:= \
Peng Xu6a2d3a02015-12-21 12:00:23 -080069 main_sensorservice.cpp
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070070
71LOCAL_SHARED_LIBRARIES := \
Peng Xu6a2d3a02015-12-21 12:00:23 -080072 libsensorservice \
73 libbinder \
74 libutils
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070075
Greg Kaiserbe6dd4e2016-03-22 12:21:46 -070076LOCAL_CFLAGS := -Wall -Werror -Wextra
77
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070078LOCAL_MODULE_TAGS := optional
79
80LOCAL_MODULE:= sensorservice
81
82include $(BUILD_EXECUTABLE)