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 |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 15 | D_CFLAGS += -DNFC_NXP_STAT_DUAL_UICC_EXT_SWITCH=TRUE |
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 | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 44 | |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 45 | LOCAL_CFLAGS += -DJCOP_VER_3_1=$(JCOP_VER_3_1) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 46 | LOCAL_CFLAGS += -DJCOP_VER_3_2=$(JCOP_VER_3_2) |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 47 | LOCAL_CFLAGS += -DJCOP_VER_3_3=$(JCOP_VER_3_3) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 48 | |
Puneet Mishra | 3f9537a | 2015-11-23 16:57:02 +0000 | [diff] [blame] | 49 | NFC_NXP_ESE:= TRUE |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 50 | ifeq ($(NFC_NXP_ESE),TRUE) |
| 51 | LOCAL_CFLAGS += -DNFC_NXP_ESE=TRUE |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 52 | LOCAL_CFLAGS += -DNFC_NXP_ESE_VER=$(JCOP_VER_3_3) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 53 | else |
nxpandroid | dacfb3b | 2016-08-25 20:27:04 +0530 | [diff] [blame] | 54 | LOCAL_CFLAGS += -DNFC_NXP_ESE=FALSE |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 55 | endif |
| 56 | |
| 57 | #### Select the CHIP #### |
Rohit Rangwani | be0dd33 | 2016-10-21 12:55:26 +0530 | [diff] [blame^] | 58 | ifeq ($(strip $(NQ3XX_PRESENT)),true) |
| 59 | NXP_CHIP_TYPE := $(PN553) |
| 60 | else |
Gaurav Singhal | 8586680 | 2016-06-15 20:10:36 +0530 | [diff] [blame] | 61 | NXP_CHIP_TYPE := $(PN548C2) |
Rohit Rangwani | be0dd33 | 2016-10-21 12:55:26 +0530 | [diff] [blame^] | 62 | endif |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 63 | |
| 64 | ifeq ($(NXP_CHIP_TYPE),$(PN547C2)) |
| 65 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2 |
| 66 | else ifeq ($(NXP_CHIP_TYPE),$(PN548C2)) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 67 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2 |
nxpandroid | cdd3044 | 2016-05-27 17:26:18 +0530 | [diff] [blame] | 68 | else ifeq ($(NXP_CHIP_TYPE),$(PN551)) |
| 69 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN551 |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 70 | else ifeq ($(NXP_CHIP_TYPE),$(PN553)) |
| 71 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553 |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 72 | endif |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 73 | |
| 74 | #Gemalto SE support |
| 75 | D_CFLAGS += -DGEMALTO_SE_SUPPORT |
| 76 | D_CFLAGS += -DNXP_UICC_ENABLE |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 77 | D_CFLAGS += -DJCOP_WA_ENABLE=FALSE |
nxpandroid | 6154b73 | 2016-01-14 20:39:23 +0530 | [diff] [blame] | 78 | |
| 79 | #Routing Entries optimization |
| 80 | D_CFLAGS += -DNFC_NXP_LISTEN_ROUTE_TBL_OPTIMIZATION=TRUE |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 81 | ###################################### |
| 82 | # Build shared library system/lib/libnfc-nci.so for stack code. |
| 83 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 84 | LOCAL_ARM_MODE := arm |
Puneet Mishra | b639345 | 2015-11-11 17:34:44 +0000 | [diff] [blame] | 85 | LOCAL_MODULE := libnqnfc-nci |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 86 | LOCAL_MODULE_TAGS := optional |
Puneet Mishra | b639345 | 2015-11-11 17:34:44 +0000 | [diff] [blame] | 87 | LOCAL_PROPRIETARY_MODULE := true |
| 88 | LOCAL_MODULE_OWNER := nxp |
nxpandroid | 25862ca | 2015-11-06 18:43:02 +0530 | [diff] [blame] | 89 | LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils liblog libdl libhardware |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 90 | LOCAL_CFLAGS += $(D_CFLAGS) |
nxpandroid | 25862ca | 2015-11-06 18:43:02 +0530 | [diff] [blame] | 91 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/include \ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 92 | $(LOCAL_PATH)/src/gki/ulinux \ |
| 93 | $(LOCAL_PATH)/src/gki/common \ |
| 94 | $(LOCAL_PATH)/$(NFA)/include \ |
| 95 | $(LOCAL_PATH)/$(NFA)/int \ |
| 96 | $(LOCAL_PATH)/$(NFC)/include \ |
| 97 | $(LOCAL_PATH)/$(NFC)/int \ |
| 98 | $(LOCAL_PATH)/src/hal/include \ |
| 99 | $(LOCAL_PATH)/src/hal/int \ |
| 100 | $(LOCAL_PATH)/$(HALIMPL)/include |
| 101 | LOCAL_SRC_FILES := \ |
| 102 | $(call all-c-files-under, $(NFA)/ce $(NFA)/dm $(NFA)/ee) \ |
| 103 | $(call all-c-files-under, $(NFA)/hci $(NFA)/int $(NFA)/p2p $(NFA)/rw $(NFA)/sys) \ |
| 104 | $(call all-c-files-under, $(NFC)/int $(NFC)/llcp $(NFC)/nci $(NFC)/ndef $(NFC)/nfc $(NFC)/tags) \ |
| 105 | $(call all-c-files-under, src/adaptation) \ |
| 106 | $(call all-cpp-files-under, src/adaptation) \ |
| 107 | $(call all-c-files-under, src/gki) \ |
| 108 | src/nfca_version.c |
| 109 | include $(BUILD_SHARED_LIBRARY) |
| 110 | |
| 111 | |
| 112 | ###################################### |
| 113 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Puneet Mishra | b639345 | 2015-11-11 17:34:44 +0000 | [diff] [blame] | 114 | endif |