Puneet Mishra | b639345 | 2015-11-11 17:34:44 +0000 | [diff] [blame] | 1 | ifeq ($(strip $(TARGET_USES_NQ_NFC)),true) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 2 | LOCAL_PATH:= $(call my-dir) |
| 3 | include $(CLEAR_VARS) |
| 4 | NFA := src/nfa |
| 5 | NFC := src/nfc |
| 6 | HAL := src/hal |
| 7 | UDRV := src/udrv |
| 8 | |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 9 | D_CFLAGS := -DANDROID -DBUILDCFG=1 \ |
| 10 | -Wno-deprecated-register \ |
| 11 | -Wno-unused-parameter \ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 12 | |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 13 | #Enable NXP Specific |
nxpandroid | 25862ca | 2015-11-06 18:43:02 +0530 | [diff] [blame] | 14 | D_CFLAGS += -DNXP_EXTNS=TRUE |
Rohit Rangwani | 99cb562 | 2016-10-14 17:13:01 +0530 | [diff] [blame] | 15 | D_CFLAGS += -DNFC_NXP_STAT_DUAL_UICC_EXT_SWITCH=FALSE |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 16 | D_CFLAGS += -DNFC_NXP_AID_MAX_SIZE_DYN=TRUE |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 17 | |
| 18 | #Enable HCE-F specific |
| 19 | D_CFLAGS += -DNXP_NFCC_HCE_F=TRUE |
| 20 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 21 | #variables for NFC_NXP_CHIP_TYPE |
| 22 | PN547C2 := 1 |
| 23 | PN548C2 := 2 |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 24 | PN551 := 3 |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 25 | PN553 := 4 |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 26 | |
| 27 | ifeq ($(PN547C2),1) |
| 28 | D_CFLAGS += -DPN547C2=1 |
| 29 | endif |
| 30 | ifeq ($(PN548C2),2) |
| 31 | D_CFLAGS += -DPN548C2=2 |
| 32 | endif |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 33 | ifeq ($(PN551),3) |
| 34 | D_CFLAGS += -DPN551=3 |
| 35 | endif |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 36 | ifeq ($(PN553),4) |
| 37 | D_CFLAGS += -DPN553=4 |
| 38 | endif |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 39 | |
| 40 | #### Select the JCOP OS Version #### |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 41 | JCOP_VER_3_1 := 1 |
| 42 | JCOP_VER_3_2 := 2 |
| 43 | JCOP_VER_3_3 := 3 |
nxpandroid | 70cccc7 | 2016-11-18 19:58:22 +0530 | [diff] [blame] | 44 | JCOP_VER_4_0 := 4 |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 45 | |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 46 | LOCAL_CFLAGS += -DJCOP_VER_3_1=$(JCOP_VER_3_1) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 47 | LOCAL_CFLAGS += -DJCOP_VER_3_2=$(JCOP_VER_3_2) |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 48 | LOCAL_CFLAGS += -DJCOP_VER_3_3=$(JCOP_VER_3_3) |
nxpandroid | 70cccc7 | 2016-11-18 19:58:22 +0530 | [diff] [blame] | 49 | LOCAL_CFLAGS += -DJCOP_VER_4_0=$(JCOP_VER_4_0) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 50 | |
Puneet Mishra | 3f9537a | 2015-11-23 16:57:02 +0000 | [diff] [blame] | 51 | NFC_NXP_ESE:= TRUE |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 52 | ifeq ($(NFC_NXP_ESE),TRUE) |
| 53 | LOCAL_CFLAGS += -DNFC_NXP_ESE=TRUE |
nxpandroid | 70cccc7 | 2016-11-18 19:58:22 +0530 | [diff] [blame] | 54 | LOCAL_CFLAGS += -DNFC_NXP_ESE_VER=$(JCOP_VER_4_0) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 55 | else |
nxpandroid | dacfb3b | 2016-08-25 20:27:04 +0530 | [diff] [blame] | 56 | LOCAL_CFLAGS += -DNFC_NXP_ESE=FALSE |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 57 | endif |
| 58 | |
Sumatheendra Raghavendrachar | 9832363 | 2017-05-19 19:11:05 +0530 | [diff] [blame^] | 59 | ifeq ($(call is-board-platform-in-list,msm8909w msm8916 msm8994 msm8909 msm8996 msm8992 msm8952 msm8937 msm8953 msm8998),true) |
| 60 | D_CFLAGS += -DNQ_NFC_DUAL_UICC=FALSE |
| 61 | else |
| 62 | D_CFLAGS += -DNQ_NFC_DUAL_UICC=TRUE |
| 63 | endif |
| 64 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 65 | #### Select the CHIP #### |
Rohit Rangwani | be0dd33 | 2016-10-21 12:55:26 +0530 | [diff] [blame] | 66 | ifeq ($(strip $(NQ3XX_PRESENT)),true) |
| 67 | NXP_CHIP_TYPE := $(PN553) |
| 68 | else |
Gaurav Singhal | 8586680 | 2016-06-15 20:10:36 +0530 | [diff] [blame] | 69 | NXP_CHIP_TYPE := $(PN548C2) |
Rohit Rangwani | be0dd33 | 2016-10-21 12:55:26 +0530 | [diff] [blame] | 70 | endif |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 71 | |
| 72 | ifeq ($(NXP_CHIP_TYPE),$(PN547C2)) |
| 73 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2 |
| 74 | else ifeq ($(NXP_CHIP_TYPE),$(PN548C2)) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 75 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2 |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 76 | else ifeq ($(NXP_CHIP_TYPE),$(PN551)) |
| 77 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN551 |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 78 | else ifeq ($(NXP_CHIP_TYPE),$(PN553)) |
| 79 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553 |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 80 | endif |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 81 | |
| 82 | #Gemalto SE support |
| 83 | D_CFLAGS += -DGEMALTO_SE_SUPPORT |
| 84 | D_CFLAGS += -DNXP_UICC_ENABLE |
nxpandroid | 70cccc7 | 2016-11-18 19:58:22 +0530 | [diff] [blame] | 85 | ifeq ($(NXP_CHIP_TYPE),$(PN553)) |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 86 | D_CFLAGS += -DJCOP_WA_ENABLE=FALSE |
nxpandroid | 70cccc7 | 2016-11-18 19:58:22 +0530 | [diff] [blame] | 87 | else |
| 88 | D_CFLAGS += -DJCOP_WA_ENABLE=TRUE |
| 89 | endif |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 90 | |
| 91 | #Routing Entries optimization |
| 92 | D_CFLAGS += -DNFC_NXP_LISTEN_ROUTE_TBL_OPTIMIZATION=TRUE |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 93 | ###################################### |
| 94 | # Build shared library system/lib/libnfc-nci.so for stack code. |
| 95 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 96 | LOCAL_ARM_MODE := arm |
nxpandroid | 70cccc7 | 2016-11-18 19:58:22 +0530 | [diff] [blame] | 97 | ifeq (true,$(TARGET_IS_64_BIT)) |
| 98 | LOCAL_MULTILIB := 64 |
| 99 | else |
| 100 | LOCAL_MULTILIB := 32 |
| 101 | endif |
Puneet Mishra | b639345 | 2015-11-11 17:34:44 +0000 | [diff] [blame] | 102 | LOCAL_MODULE := libnqnfc-nci |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 103 | LOCAL_MODULE_TAGS := optional |
Puneet Mishra | b639345 | 2015-11-11 17:34:44 +0000 | [diff] [blame] | 104 | LOCAL_MODULE_OWNER := nxp |
nxpandroid | 25862ca | 2015-11-06 18:43:02 +0530 | [diff] [blame] | 105 | LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils liblog libdl libhardware |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 106 | LOCAL_CFLAGS += $(D_CFLAGS) |
nxpandroid | 25862ca | 2015-11-06 18:43:02 +0530 | [diff] [blame] | 107 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/include \ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 108 | $(LOCAL_PATH)/src/gki/ulinux \ |
| 109 | $(LOCAL_PATH)/src/gki/common \ |
| 110 | $(LOCAL_PATH)/$(NFA)/include \ |
| 111 | $(LOCAL_PATH)/$(NFA)/int \ |
| 112 | $(LOCAL_PATH)/$(NFC)/include \ |
| 113 | $(LOCAL_PATH)/$(NFC)/int \ |
| 114 | $(LOCAL_PATH)/src/hal/include \ |
| 115 | $(LOCAL_PATH)/src/hal/int \ |
Martijn Coenen | 634b0e9 | 2016-09-06 16:05:25 +0200 | [diff] [blame] | 116 | $(LOCAL_PATH)/$(HALIMPL)/include \ |
| 117 | system/libhwbinder/include |
| 118 | |
| 119 | # Treble configuration |
Gaurav Singhal | 8ff8a78 | 2017-05-09 08:38:03 +0530 | [diff] [blame] | 120 | LOCAL_SHARED_LIBRARIES += libhidlbase libhidltransport libhwbinder libutils android.hardware.nfc@1.0 vendor.nxp.hardware.nfc@1.0 |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 121 | LOCAL_SRC_FILES := \ |
| 122 | $(call all-c-files-under, $(NFA)/ce $(NFA)/dm $(NFA)/ee) \ |
| 123 | $(call all-c-files-under, $(NFA)/hci $(NFA)/int $(NFA)/p2p $(NFA)/rw $(NFA)/sys) \ |
| 124 | $(call all-c-files-under, $(NFC)/int $(NFC)/llcp $(NFC)/nci $(NFC)/ndef $(NFC)/nfc $(NFC)/tags) \ |
| 125 | $(call all-c-files-under, src/adaptation) \ |
| 126 | $(call all-cpp-files-under, src/adaptation) \ |
| 127 | $(call all-c-files-under, src/gki) \ |
| 128 | src/nfca_version.c |
| 129 | include $(BUILD_SHARED_LIBRARY) |
| 130 | |
| 131 | |
| 132 | ###################################### |
| 133 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Puneet Mishra | b639345 | 2015-11-11 17:34:44 +0000 | [diff] [blame] | 134 | endif |