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