1# Copyright (C) 2008 The Android Open Source Project 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# Modified 2011 by InvenSense, Inc 15 16LOCAL_PATH := $(call my-dir) 17 18ifneq ($(TARGET_SIMULATOR),true) 19 20# InvenSense fragment of the HAL 21include $(CLEAR_VARS) 22 23LOCAL_MODULE := libinvensense_hal 24 25LOCAL_MODULE_TAGS := optional 26 27LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" 28 29ifeq ($(ENG_BUILD),1) 30ifeq ($(COMPILE_INVENSENSE_COMPASS_CAL),1) 31LOCAL_CFLAGS += -DINVENSENSE_COMPASS_CAL 32endif 33ifeq ($(COMPILE_THIRD_PARTY_ACCEL),1) 34LOCAL_CFLAGS += -DTHIRD_PARTY_ACCEL 35endif 36ifeq ($(COMPILE_COMPASS_YAS530),1) 37LOCAL_CFLAGS += -DCOMPASS_YAS530 38endif 39ifeq ($(COMPILE_COMPASS_AK8975),1) 40LOCAL_CFLAGS += -DCOMPASS_AK8975 41endif 42ifeq ($(COMPILE_COMPASS_AMI306),1) 43LOCAL_CFLAGS += -DCOMPASS_AMI306 44endif 45else # release builds, default 46LOCAL_CFLAGS += -DINVENSENSE_COMPASS_CAL 47endif 48 49LOCAL_SRC_FILES := SensorBase.cpp 50LOCAL_SRC_FILES += MPLSensor.cpp 51LOCAL_SRC_FILES += MPLSupport.cpp 52LOCAL_SRC_FILES += InputEventReader.cpp 53LOCAL_SRC_FILES += CompassSensor.IIO.9150.cpp 54 55LOCAL_C_INCLUDES += $(LOCAL_PATH) 56LOCAL_C_INCLUDES += $(LOCAL_PATH)/software/core/mllite 57LOCAL_C_INCLUDES += $(LOCAL_PATH)/software/core/mllite/linux 58LOCAL_C_INCLUDES += $(LOCAL_PATH)/software/core/driver/include 59LOCAL_C_INCLUDES += $(LOCAL_PATH)/software/core/driver/include/linux 60 61LOCAL_SHARED_LIBRARIES := liblog 62LOCAL_SHARED_LIBRARIES += libcutils 63LOCAL_SHARED_LIBRARIES += libutils 64LOCAL_SHARED_LIBRARIES += libdl 65LOCAL_SHARED_LIBRARIES += libmllite 66 67#Additions for SysPed 68LOCAL_SHARED_LIBRARIES += libmplmpu 69LOCAL_C_INCLUDES += $(LOCAL_PATH)/software/core/mpl 70LOCAL_CPPFLAGS += -DLINUX=1 71LOCAL_PRELINK_MODULE := false 72 73include $(BUILD_SHARED_LIBRARY) 74 75include $(CLEAR_VARS) 76LOCAL_MODULE := libmplmpu 77LOCAL_SRC_FILES := libmplmpu.so 78LOCAL_MODULE_TAGS := optional 79LOCAL_MODULE_SUFFIX := .so 80LOCAL_MODULE_CLASS := SHARED_LIBRARIES 81LOCAL_MODULE_PATH := $(TARGET_OUT)/lib 82OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES) 83include $(BUILD_PREBUILT) 84 85include $(CLEAR_VARS) 86LOCAL_MODULE := libmllite 87LOCAL_SRC_FILES := libmllite.so 88LOCAL_MODULE_TAGS := optional 89LOCAL_MODULE_SUFFIX := .so 90LOCAL_MODULE_CLASS := SHARED_LIBRARIES 91LOCAL_MODULE_PATH := $(TARGET_OUT)/lib 92OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES) 93include $(BUILD_PREBUILT) 94 95endif # !TARGET_SIMULATOR 96