OSDN Git Service

add module for HDAPS accelerometer found in many IBM Thinkpads
[android-x86/hardware-libsensors.git] / Android.mk
1 # Copyright (C) 2011 The Android-x86 Open Source Project
2
3 LOCAL_PATH := $(call my-dir)
4
5 # HAL module implemenation, not prelinked and stored in
6 # hw/<OVERLAY_HARDWARE_MODULE_ID>.<ro.product.board>.so
7 include $(CLEAR_VARS)
8 LOCAL_PRELINK_MODULE := false
9 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
10 LOCAL_SHARED_LIBRARIES := liblog libcutils
11 LOCAL_MODULE := sensors.$(TARGET_PRODUCT)
12 LOCAL_MODULE_TAGS := optional
13
14 ifeq ($(strip $(BOARD_USES_KBDSENSOR)),true)
15 LOCAL_SRC_FILES := kbdsensor.cpp
16
17 ifeq ($(strip $(BOARD_USES_KBDSENSOR_ROTKEY1)),true)
18 LOCAL_CFLAGS := -DFN_ROT_0=KEY_F9 -DFN_ROT_90=KEY_F12 -DFN_ROT_180=KEY_F10 -DFN_ROT_270=KEY_F11
19 endif
20 ifeq ($(filter -DFN_ROT_0=%,$(LOCAL_CFLAGS)),)
21 LOCAL_CFLAGS := -DFN_ROT_0=KEY_UP -DFN_ROT_90=KEY_RIGHT -DFN_ROT_180=KEY_DOWN -DFN_ROT_270=KEY_LEFT
22 endif
23
24 include $(BUILD_SHARED_LIBRARY)
25 endif
26
27 ifeq ($(strip $(BOARD_USES_HDAPS_ACCEL)),true)
28 LOCAL_SRC_FILES := hdaps.c
29 include $(BUILD_SHARED_LIBRARY)
30 endif