File: Android.mk

package info (click to toggle)
biometryd 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,500 kB
  • sloc: cpp: 10,221; ansic: 191; python: 42; makefile: 20
file content (67 lines) | stat: -rw-r--r-- 1,456 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
LOCAL_PATH := $(call my-dir)

ANDROID_VERSION_MAJOR := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
ANDROID_VERSION_MINOR := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
ANDROID_VERSION_PATCH := $(word 3, $(subst ., , $(PLATFORM_VERSION)))

ifeq ($(ANDROID_VERSION_MINOR),)
    ANDROID_VERSION_MINOR := 0
endif
ifeq ($(ANDROID_VERSION_PATCH),)
    ANDROID_VERSION_PATCH := 0
endif

IS_ANDROID_8 := $(shell test $(ANDROID_VERSION_MAJOR) -ge 8 && echo true)

include $(CLEAR_VARS)

LOCAL_CFLAGS += \
	-DANDROID_VERSION_MAJOR=$(ANDROID_VERSION_MAJOR) \
	-DANDROID_VERSION_MINOR=$(ANDROID_VERSION_MINOR) \
	-DANDROID_VERSION_PATCH=$(ANDROID_VERSION_PATCH)

UPAPI_PATH := $(LOCAL_PATH)/../../

ifneq ($(IS_ANDROID_8),true)
LOCAL_CFLAGS += -std=gnu++0x
endif

ifeq ($(IS_ANDROID_8),true)
LOCAL_CFLAGS += \
    -Wno-unused-parameter
endif

LOCAL_C_INCLUDES := \
	$(UPAPI_PATH)/include

ifeq ($(IS_ANDROID_8),true)
LOCAL_SRC_FILES += \
    biometry_fp_hidl_for_hybris.cpp
else
$(error "Android pre oreo not supported")
endif

LOCAL_MODULE := libbiometry_fp_api
LOCAL_MODULE_TAGS := optional

LOCAL_SHARED_LIBRARIES := \
	libbinder \
	libcutils \
	libinput \
	liblog \
	libutils \
	libhardware \
	libhardware_legacy \
	libdl

ifeq ($(IS_ANDROID_8),true)
LOCAL_SHARED_LIBRARIES += \
    libhidlbase \
    libhidltransport \
    libsensor \
    android.hardware.biometrics.fingerprint@2.1 \
    android.hardware.gatekeeper@1.0
endif

include $(BUILD_SHARED_LIBRARY)