-
Notifications
You must be signed in to change notification settings - Fork 16
/
Android.mk
88 lines (74 loc) · 2.69 KB
/
Android.mk
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
ifneq ($(strip $(TARGET_USES_NQ_NFC)),true)
LOCAL_PATH:= $(call my-dir)
NFA := src/nfa
NFC := src/nfc
HAL := src/hal
UDRV := src/udrv
HALIMPL := halimpl/bcm2079x
D_CFLAGS := -DANDROID -DBUILDCFG=1 \
-Wno-deprecated-register \
-Wno-unused-parameter \
######################################
# Build shared library system/lib/libnfc-nci.so for stack code.
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libnfc-nci
LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils liblog libdl libhardware
LOCAL_CFLAGS := $(D_CFLAGS)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/src/include \
$(LOCAL_PATH)/src/gki/ulinux \
$(LOCAL_PATH)/src/gki/common \
$(LOCAL_PATH)/$(NFA)/include \
$(LOCAL_PATH)/$(NFA)/int \
$(LOCAL_PATH)/$(NFC)/include \
$(LOCAL_PATH)/$(NFC)/int \
$(LOCAL_PATH)/src/hal/include \
$(LOCAL_PATH)/src/hal/int \
$(LOCAL_PATH)/$(HALIMPL)/include
LOCAL_SRC_FILES := \
$(call all-c-files-under, $(NFA)/ce $(NFA)/dm $(NFA)/ee) \
$(call all-c-files-under, $(NFA)/hci $(NFA)/int $(NFA)/p2p $(NFA)/rw $(NFA)/sys) \
$(call all-c-files-under, $(NFC)/int $(NFC)/llcp $(NFC)/nci $(NFC)/ndef $(NFC)/nfc $(NFC)/tags) \
$(call all-c-files-under, src/adaptation) \
$(call all-cpp-files-under, src/adaptation) \
$(call all-c-files-under, src/gki) \
$(HALIMPL)/adaptation/android_logmsg.cpp \
src/nfca_version.c
ifeq ($(BOARD_NFC_CHIPSET),pn547)
ifeq ($(BOARD_NFC_LPM_LOSES_CONFIG),true)
LOCAL_CFLAGS += -DNFCC_FORCE_CONFIG_UPDATE
endif
endif
include $(BUILD_SHARED_LIBRARY)
######################################
# Build shared library system/lib/hw/nfc_nci.*.so for Hardware Abstraction Layer.
# Android's generic HAL (libhardware.so) dynamically loads this shared library.
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
ifneq ($(BOARD_NFC_HAL_SUFFIX),)
HAL_SUFFIX := bcm2079x.$(BOARD_NFC_HAL_SUFFIX)
else
HAL_SUFFIX := bcm2079x.default
endif
LOCAL_MODULE := nfc_nci.$(HAL_SUFFIX)
LOCAL_SRC_FILES := $(call all-c-files-under, $(HALIMPL)) \
$(call all-cpp-files-under, $(HALIMPL)) \
src/adaptation/CrcChecksum.cpp \
src//nfca_version.c
LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/$(HALIMPL)/include \
$(LOCAL_PATH)/$(HALIMPL)/gki/ulinux \
$(LOCAL_PATH)/$(HALIMPL)/gki/common \
$(LOCAL_PATH)/$(HAL)/include \
$(LOCAL_PATH)/$(HAL)/int \
$(LOCAL_PATH)/src/include \
$(LOCAL_PATH)/$(NFC)/include \
$(LOCAL_PATH)/$(NFA)/include \
$(LOCAL_PATH)/$(UDRV)/include
LOCAL_CFLAGS := $(D_CFLAGS) -DNFC_HAL_TARGET=TRUE -DNFC_RW_ONLY=TRUE
include $(BUILD_SHARED_LIBRARY)
######################################
include $(call all-makefiles-under,$(LOCAL_PATH))
endif