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