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 15LOCAL_PATH := $(call my-dir) 16 17include $(CLEAR_VARS) 18 19LOCAL_CPPFLAGS:= -Wno-unused-parameter -Wno-error=non-virtual-dtor -fexceptions 20LOCAL_CFLAGS += -DLOG_TAG=\"Sensors\" -Wno-unused-parameter 21LOCAL_SHARED_LIBRARIES := libcutils libupm libmraa 22LOCAL_C_INCLUDES := $(LOCAL_PATH)/../libupm/src/mpu9150/ 23LOCAL_SRC_FILES := SensorsHAL.cpp Sensor.cpp AcquisitionThread.cpp Utils.cpp SensorUtils.cpp 24LOCAL_MODULE := sensors.$(TARGET_DEVICE) 25LOCAL_MODULE_RELATIVE_PATH := hw 26LOCAL_MODULE_TAGS := optional 27 28ifneq (,$(filter MPU9150Accelerometer, $(PLATFORM_SENSOR_LIST))) 29LOCAL_SRC_FILES += sensors/MPU9150Accelerometer.cpp 30endif 31 32ifneq (,$(filter MMA7660Accelerometer, $(PLATFORM_SENSOR_LIST))) 33LOCAL_SRC_FILES += sensors/MMA7660Accelerometer.cpp 34endif 35 36ifneq (,$(filter LSM9DS0Accelerometer, $(PLATFORM_SENSOR_LIST))) 37LOCAL_SRC_FILES += sensors/LSM9DS0Accelerometer.cpp 38endif 39 40ifneq (,$(filter LSM303dAccelerometer, $(PLATFORM_SENSOR_LIST))) 41LOCAL_SRC_FILES += sensors/LSM303dAccelerometer.cpp 42endif 43 44ifneq (,$(filter LSM303dOrientation, $(PLATFORM_SENSOR_LIST))) 45LOCAL_SRC_FILES += sensors/LSM303dOrientation.cpp 46endif 47 48ifneq (,$(filter GroveLight, $(PLATFORM_SENSOR_LIST))) 49LOCAL_SRC_FILES += sensors/GroveLight.cpp 50endif 51 52ifneq (,$(filter GroveTemperature, $(PLATFORM_SENSOR_LIST))) 53LOCAL_SRC_FILES += sensors/GroveTemperature.cpp 54endif 55 56ifneq (,$(filter ProximityGPIO, $(PLATFORM_SENSOR_LIST))) 57LOCAL_SRC_FILES += sensors/ProximityGPIO.cpp 58endif 59 60include $(BUILD_SHARED_LIBRARY) 61