nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 1 | VOB_COMPONENTS := external/libnfc-nci/src |
| 2 | NFA := $(VOB_COMPONENTS)/nfa |
| 3 | NFC := $(VOB_COMPONENTS)/nfc |
| 4 | |
| 5 | LOCAL_PATH := $(call my-dir) |
| 6 | include $(CLEAR_VARS) |
| 7 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
| 8 | |
| 9 | LOCAL_PRELINK_MODULE := false |
| 10 | |
| 11 | ifneq ($(NCI_VERSION),) |
| 12 | LOCAL_CFLAGS += -DNCI_VERSION=$(NCI_VERSION) -O0 -g |
| 13 | endif |
| 14 | |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 15 | LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter -Werror |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 16 | #variables for NFC_NXP_CHIP_TYPE |
| 17 | PN547C2 := 1 |
| 18 | PN548C2 := 2 |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 19 | PN551 := 3 |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame^] | 20 | PN553 := 4 |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 21 | NQ110 := $PN547C2 |
| 22 | NQ120 := $PN547C2 |
| 23 | NQ210 := $PN548C2 |
| 24 | NQ220 := $PN548C2 |
| 25 | |
| 26 | #NXP chip type Enable |
| 27 | ifeq ($(PN547C2),1) |
| 28 | LOCAL_CFLAGS += -DPN547C2=1 |
| 29 | endif |
| 30 | ifeq ($(PN548C2),2) |
| 31 | LOCAL_CFLAGS += -DPN548C2=2 |
| 32 | endif |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 33 | ifeq ($(PN551),3) |
| 34 | LOCAL_CFLAGS += -DPN551=3 |
| 35 | endif |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame^] | 36 | ifeq ($(PN553),4) |
| 37 | LOCAL_CFLAGS += -DPN553=4 |
| 38 | endif |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 39 | |
| 40 | #NXP PN547 Enable |
nxpandroid | 1153eb3 | 2015-11-06 18:46:58 +0530 | [diff] [blame] | 41 | LOCAL_CFLAGS += -DNXP_EXTNS=TRUE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 42 | LOCAL_CFLAGS += -DNFC_NXP_NON_STD_CARD=FALSE |
| 43 | LOCAL_CFLAGS += -DNFC_NXP_HFO_SETTINGS=FALSE |
| 44 | |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 45 | #Enable HCE-F specific |
| 46 | LOCAL_CFLAGS += -DNXP_NFCC_HCE_F=TRUE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 47 | |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 48 | #### Select the JCOP OS Version #### |
| 49 | JCOP_VER_3_1 := 1 |
| 50 | JCOP_VER_3_2 := 2 |
| 51 | JCOP_VER_3_3 := 3 |
| 52 | |
| 53 | LOCAL_CFLAGS += -DJCOP_VER_3_1=$(JCOP_VER_3_1) |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 54 | LOCAL_CFLAGS += -DJCOP_VER_3_2=$(JCOP_VER_3_2) |
| 55 | LOCAL_CFLAGS += -DJCOP_VER_3_3=$(JCOP_VER_3_3) |
| 56 | |
nxpandroid | a9a68ba | 2016-01-14 21:12:17 +0530 | [diff] [blame] | 57 | NFC_NXP_ESE:= TRUE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 58 | ifeq ($(NFC_NXP_ESE),TRUE) |
| 59 | LOCAL_CFLAGS += -DNFC_NXP_ESE=TRUE |
| 60 | LOCAL_CFLAGS += -DNFC_NXP_ESE_VER=$(JCOP_VER_3_3) |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame^] | 61 | LOCAL_CFLAGS += -DJCOP_WA_ENABLE=FALSE |
| 62 | LOCAL_CFLAGS += -DCONCURRENCY_PROTECTION=TRUE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 63 | else |
| 64 | LOCAL_CFLAGS += -DNFC_NXP_ESE=FALSE |
| 65 | endif |
| 66 | |
| 67 | #### Select the CHIP #### |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame^] | 68 | NXP_CHIP_TYPE := $(PN553) |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 69 | |
| 70 | ifeq ($(NXP_CHIP_TYPE),$(PN547C2)) |
| 71 | LOCAL_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2 |
| 72 | else ifeq ($(NXP_CHIP_TYPE),$(PN548C2)) |
| 73 | LOCAL_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2 |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 74 | else ifeq ($(NXP_CHIP_TYPE),$(PN551)) |
| 75 | LOCAL_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN551 |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame^] | 76 | else ifeq ($(NXP_CHIP_TYPE),$(PN553)) |
| 77 | LOCAL_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553 |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 78 | endif |
| 79 | |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame^] | 80 | NFC_POWER_MANAGEMENT:= TRUE |
nxpandroid | 1153eb3 | 2015-11-06 18:46:58 +0530 | [diff] [blame] | 81 | ifeq ($(NFC_POWER_MANAGEMENT),TRUE) |
| 82 | LOCAL_CFLAGS += -DNFC_POWER_MANAGEMENT=TRUE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 83 | else |
nxpandroid | 1153eb3 | 2015-11-06 18:46:58 +0530 | [diff] [blame] | 84 | LOCAL_CFLAGS += -DNFC_POWER_MANAGEMENT=FALSE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 85 | endif |
| 86 | |
| 87 | ifeq ($(NFC_NXP_ESE),TRUE) |
nxpandroid | 1153eb3 | 2015-11-06 18:46:58 +0530 | [diff] [blame] | 88 | LOCAL_CFLAGS += -DNXP_LDR_SVC_VER_2=TRUE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 89 | else |
nxpandroid | 1153eb3 | 2015-11-06 18:46:58 +0530 | [diff] [blame] | 90 | LOCAL_CFLAGS += -DNXP_LDR_SVC_VER_2=FALSE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 91 | endif |
| 92 | |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 93 | LOCAL_CFLAGS += -DNFC_NXP_STAT_DUAL_UICC_EXT_SWITCH=TRUE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 94 | #Gemalto SE Support |
| 95 | LOCAL_CFLAGS += -DGEMATO_SE_SUPPORT |
| 96 | LOCAL_CFLAGS += -DNXP_UICC_ENABLE |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 97 | |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 98 | LOCAL_SRC_FILES := $(call all-subdir-cpp-files) $(call all-subdir-c-files) |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 99 | |
| 100 | LOCAL_C_INCLUDES += \ |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 101 | frameworks/native/include \ |
| 102 | libcore/include \ |
| 103 | $(NFA)/include \ |
| 104 | $(NFA)/brcm \ |
| 105 | $(NFC)/include \ |
| 106 | $(NFC)/brcm \ |
| 107 | $(NFC)/int \ |
| 108 | $(VOB_COMPONENTS)/hal/include \ |
| 109 | $(VOB_COMPONENTS)/hal/int \ |
| 110 | $(VOB_COMPONENTS)/include \ |
| 111 | $(VOB_COMPONENTS)/gki/ulinux \ |
| 112 | $(VOB_COMPONENTS)/gki/common |
| 113 | |
| 114 | ifeq ($(NFC_NXP_ESE),TRUE) |
| 115 | LOCAL_C_INCLUDES +=external/p61-jcop-kit/include |
| 116 | |
| 117 | endif |
| 118 | |
| 119 | LOCAL_SHARED_LIBRARIES := \ |
| 120 | libicuuc \ |
| 121 | libnativehelper \ |
| 122 | libcutils \ |
| 123 | libutils \ |
| 124 | liblog \ |
nxpandroid | 1153eb3 | 2015-11-06 18:46:58 +0530 | [diff] [blame] | 125 | libnfc-nci |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 126 | |
| 127 | ifeq ($(NFC_NXP_ESE),TRUE) |
| 128 | LOCAL_SHARED_LIBRARIES += libp61-jcop-kit |
| 129 | endif |
| 130 | |
| 131 | #LOCAL_STATIC_LIBRARIES := libxml2 |
| 132 | |
| 133 | LOCAL_MODULE := libnfc_nci_jni |
| 134 | LOCAL_MODULE_TAGS := optional |
| 135 | |
| 136 | include $(BUILD_SHARED_LIBRARY) |