diff options
author | Bruce Beare <bbeare1@gmail.com> | 2015-12-19 09:29:14 -0800 |
---|---|---|
committer | Bruce Beare <bbeare1@gmail.com> | 2015-12-21 15:36:34 -0800 |
commit | b107422fde11c6894faf65d51f635453742e8814 (patch) | |
tree | d51264f2390312d756349ed2e0f6be9c8f0522b6 /peripheral/sensors | |
parent | 1a7a7ca125ef0eb3e576e94412eba05ed916acaa (diff) | |
download | intel-b107422fde11c6894faf65d51f635453742e8814.tar.gz |
SensorHAL: build in only the requested sensors
The list of sensors to be added to the Sensor HAL for a particular platform
needs to be determined by the Platform's BoardConfig file. The HAL is modified
to add the requested sensors depending on the selection variables.
BUG=none
Change-Id: I1636bbd8434526e2ec0bd2c2061d235a1bbd40ef
Signed-off-by: Bruce Beare <bbeare1@gmail.com>
Diffstat (limited to 'peripheral/sensors')
-rw-r--r-- | peripheral/sensors/edison_arduino/Android.mk | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/peripheral/sensors/edison_arduino/Android.mk b/peripheral/sensors/edison_arduino/Android.mk index fbd36b4..a94cf59 100644 --- a/peripheral/sensors/edison_arduino/Android.mk +++ b/peripheral/sensors/edison_arduino/Android.mk @@ -20,14 +20,25 @@ LOCAL_CPPFLAGS:= -Wno-unused-parameter -Wno-error=non-virtual-dtor -fexceptions LOCAL_CFLAGS += -DLOG_TAG=\"Sensors\" -Wno-unused-parameter LOCAL_SHARED_LIBRARIES := libcutils libupm libmraa LOCAL_C_INCLUDES := $(LOCAL_PATH)/../libupm/src/mpu9150/ -LOCAL_SRC_FILES := SensorsHAL.cpp Sensor.cpp AcquisitionThread.cpp Utils.cpp \ - SensorUtils.cpp \ - sensors/MPU9150Accelerometer.cpp \ - sensors/MMA7660Accelerometer.cpp \ - sensors/GroveLight.cpp \ - sensors/GroveTemperature.cpp +LOCAL_SRC_FILES := SensorsHAL.cpp Sensor.cpp AcquisitionThread.cpp Utils.cpp SensorUtils.cpp LOCAL_MODULE := sensors.edison LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_MODULE_TAGS := optional +ifneq (,$(filter MPU9150Accelerometer, $(PLATFORM_SENSOR_LIST))) +LOCAL_SRC_FILES += sensors/MPU9150Accelerometer.cpp +endif + +ifneq (,$(filter MMA7660Accelerometer, $(PLATFORM_SENSOR_LIST))) +LOCAL_SRC_FILES += sensors/MMA7660Accelerometer.cpp +endif + +ifneq (,$(filter GroveLight, $(PLATFORM_SENSOR_LIST))) +LOCAL_SRC_FILES += sensors/GroveLight.cpp +endif + +ifneq (,$(filter GroveTemperature, $(PLATFORM_SENSOR_LIST))) +LOCAL_SRC_FILES += sensors/GroveTemperature.cpp +endif + include $(BUILD_SHARED_LIBRARY) |