blob: dc580375d899efd94f74b7815a084e9383a37008 [file] [log] [blame]
Puneet Mishrab6393452015-11-11 17:34:44 +00001ifeq ($(strip $(TARGET_USES_NQ_NFC)),true)
nxpandroidc7611652015-09-23 16:42:05 +05302LOCAL_PATH:= $(call my-dir)
3include $(CLEAR_VARS)
4NFA := src/nfa
5NFC := src/nfc
6HAL := src/hal
7UDRV := src/udrv
8
nxpandroidcdd30442016-05-27 17:26:18 +05309D_CFLAGS := -DANDROID -DBUILDCFG=1 \
10 -Wno-deprecated-register \
11 -Wno-unused-parameter \
nxpandroidc7611652015-09-23 16:42:05 +053012
nxpandroid6154b732016-01-14 20:39:23 +053013#Enable NXP Specific
nxpandroid25862ca2015-11-06 18:43:02 +053014D_CFLAGS += -DNXP_EXTNS=TRUE
Rohit Rangwani99cb5622016-10-14 17:13:01 +053015D_CFLAGS += -DNFC_NXP_STAT_DUAL_UICC_EXT_SWITCH=FALSE
nxpandroid6154b732016-01-14 20:39:23 +053016D_CFLAGS += -DNFC_NXP_AID_MAX_SIZE_DYN=TRUE
nxpandroidcdd30442016-05-27 17:26:18 +053017
18#Enable HCE-F specific
19D_CFLAGS += -DNXP_NFCC_HCE_F=TRUE
20
nxpandroidc7611652015-09-23 16:42:05 +053021#variables for NFC_NXP_CHIP_TYPE
22PN547C2 := 1
23PN548C2 := 2
nxpandroidcdd30442016-05-27 17:26:18 +053024PN551 := 3
nxpandroid3e4012e2016-08-01 19:09:55 +053025PN553 := 4
Gaurav Singhal73ba0f82017-07-18 15:38:16 +053026PN557 := 5
nxpandroidc7611652015-09-23 16:42:05 +053027
28ifeq ($(PN547C2),1)
29D_CFLAGS += -DPN547C2=1
30endif
31ifeq ($(PN548C2),2)
32D_CFLAGS += -DPN548C2=2
33endif
nxpandroidcdd30442016-05-27 17:26:18 +053034ifeq ($(PN551),3)
35D_CFLAGS += -DPN551=3
36endif
nxpandroid3e4012e2016-08-01 19:09:55 +053037ifeq ($(PN553),4)
38D_CFLAGS += -DPN553=4
39endif
Gaurav Singhal73ba0f82017-07-18 15:38:16 +053040ifeq ($(PN557),5)
41D_CFLAGS += -DPN557=5
42endif
nxpandroidc7611652015-09-23 16:42:05 +053043
44#### Select the JCOP OS Version ####
nxpandroidcdd30442016-05-27 17:26:18 +053045JCOP_VER_3_1 := 1
46JCOP_VER_3_2 := 2
47JCOP_VER_3_3 := 3
nxpandroid70cccc72016-11-18 19:58:22 +053048JCOP_VER_4_0 := 4
nxpandroidc7611652015-09-23 16:42:05 +053049
nxpandroidcdd30442016-05-27 17:26:18 +053050LOCAL_CFLAGS += -DJCOP_VER_3_1=$(JCOP_VER_3_1)
nxpandroidc7611652015-09-23 16:42:05 +053051LOCAL_CFLAGS += -DJCOP_VER_3_2=$(JCOP_VER_3_2)
nxpandroid6154b732016-01-14 20:39:23 +053052LOCAL_CFLAGS += -DJCOP_VER_3_3=$(JCOP_VER_3_3)
nxpandroid70cccc72016-11-18 19:58:22 +053053LOCAL_CFLAGS += -DJCOP_VER_4_0=$(JCOP_VER_4_0)
nxpandroidc7611652015-09-23 16:42:05 +053054
Puneet Mishra3f9537a2015-11-23 16:57:02 +000055NFC_NXP_ESE:= TRUE
nxpandroidc7611652015-09-23 16:42:05 +053056ifeq ($(NFC_NXP_ESE),TRUE)
57LOCAL_CFLAGS += -DNFC_NXP_ESE=TRUE
nxpandroid70cccc72016-11-18 19:58:22 +053058LOCAL_CFLAGS += -DNFC_NXP_ESE_VER=$(JCOP_VER_4_0)
nxpandroidc7611652015-09-23 16:42:05 +053059else
nxpandroiddacfb3b2016-08-25 20:27:04 +053060LOCAL_CFLAGS += -DNFC_NXP_ESE=FALSE
nxpandroidc7611652015-09-23 16:42:05 +053061endif
62
Sumatheendra Raghavendrachar98323632017-05-19 19:11:05 +053063ifeq ($(call is-board-platform-in-list,msm8909w msm8916 msm8994 msm8909 msm8996 msm8992 msm8952 msm8937 msm8953 msm8998),true)
64D_CFLAGS += -DNQ_NFC_DUAL_UICC=FALSE
65else
66D_CFLAGS += -DNQ_NFC_DUAL_UICC=TRUE
67endif
68
nxpandroidc7611652015-09-23 16:42:05 +053069#### Select the CHIP ####
Rohit Rangwanibe0dd332016-10-21 12:55:26 +053070ifeq ($(strip $(NQ3XX_PRESENT)),true)
Gaurav Singhal127aa082017-08-04 15:41:07 +053071NXP_CHIP_TYPE := $(PN553)
Rohit Rangwanibe0dd332016-10-21 12:55:26 +053072else
Gaurav Singhal85866802016-06-15 20:10:36 +053073NXP_CHIP_TYPE := $(PN548C2)
Rohit Rangwanibe0dd332016-10-21 12:55:26 +053074endif
nxpandroid6154b732016-01-14 20:39:23 +053075
76ifeq ($(NXP_CHIP_TYPE),$(PN547C2))
77D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2
78else ifeq ($(NXP_CHIP_TYPE),$(PN548C2))
nxpandroidc7611652015-09-23 16:42:05 +053079D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2
nxpandroidcdd30442016-05-27 17:26:18 +053080else ifeq ($(NXP_CHIP_TYPE),$(PN551))
81D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN551
nxpandroid3e4012e2016-08-01 19:09:55 +053082else ifeq ($(NXP_CHIP_TYPE),$(PN553))
83D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553
Gaurav Singhal73ba0f82017-07-18 15:38:16 +053084else ifeq ($(NXP_CHIP_TYPE),$(PN557))
85D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN557
nxpandroid6154b732016-01-14 20:39:23 +053086endif
nxpandroidc7611652015-09-23 16:42:05 +053087
88#Gemalto SE support
89D_CFLAGS += -DGEMALTO_SE_SUPPORT
90D_CFLAGS += -DNXP_UICC_ENABLE
nxpandroid70cccc72016-11-18 19:58:22 +053091ifeq ($(NXP_CHIP_TYPE),$(PN553))
nxpandroid3e4012e2016-08-01 19:09:55 +053092D_CFLAGS += -DJCOP_WA_ENABLE=FALSE
nxpandroid70cccc72016-11-18 19:58:22 +053093else
94D_CFLAGS += -DJCOP_WA_ENABLE=TRUE
95endif
nxpandroid6154b732016-01-14 20:39:23 +053096
97#Routing Entries optimization
98D_CFLAGS += -DNFC_NXP_LISTEN_ROUTE_TBL_OPTIMIZATION=TRUE
nxpandroidc7611652015-09-23 16:42:05 +053099######################################
100# Build shared library system/lib/libnfc-nci.so for stack code.
101
nxpandroidc7611652015-09-23 16:42:05 +0530102LOCAL_ARM_MODE := arm
nxpandroid70cccc72016-11-18 19:58:22 +0530103ifeq (true,$(TARGET_IS_64_BIT))
104LOCAL_MULTILIB := 64
105else
106LOCAL_MULTILIB := 32
107endif
Puneet Mishrab6393452015-11-11 17:34:44 +0000108LOCAL_MODULE := libnqnfc-nci
nxpandroidc7611652015-09-23 16:42:05 +0530109LOCAL_MODULE_TAGS := optional
Puneet Mishrab6393452015-11-11 17:34:44 +0000110LOCAL_MODULE_OWNER := nxp
nxpandroid25862ca2015-11-06 18:43:02 +0530111LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils liblog libdl libhardware
nxpandroidc7611652015-09-23 16:42:05 +0530112LOCAL_CFLAGS += $(D_CFLAGS)
nxpandroid25862ca2015-11-06 18:43:02 +0530113LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/include \
nxpandroidc7611652015-09-23 16:42:05 +0530114 $(LOCAL_PATH)/src/gki/ulinux \
115 $(LOCAL_PATH)/src/gki/common \
116 $(LOCAL_PATH)/$(NFA)/include \
117 $(LOCAL_PATH)/$(NFA)/int \
118 $(LOCAL_PATH)/$(NFC)/include \
119 $(LOCAL_PATH)/$(NFC)/int \
120 $(LOCAL_PATH)/src/hal/include \
121 $(LOCAL_PATH)/src/hal/int \
Martijn Coenen634b0e92016-09-06 16:05:25 +0200122 $(LOCAL_PATH)/$(HALIMPL)/include \
123 system/libhwbinder/include
124
125# Treble configuration
Gaurav Singhal8ff8a782017-05-09 08:38:03 +0530126LOCAL_SHARED_LIBRARIES += libhidlbase libhidltransport libhwbinder libutils android.hardware.nfc@1.0 vendor.nxp.hardware.nfc@1.0
nxpandroidc7611652015-09-23 16:42:05 +0530127LOCAL_SRC_FILES := \
128 $(call all-c-files-under, $(NFA)/ce $(NFA)/dm $(NFA)/ee) \
129 $(call all-c-files-under, $(NFA)/hci $(NFA)/int $(NFA)/p2p $(NFA)/rw $(NFA)/sys) \
130 $(call all-c-files-under, $(NFC)/int $(NFC)/llcp $(NFC)/nci $(NFC)/ndef $(NFC)/nfc $(NFC)/tags) \
131 $(call all-c-files-under, src/adaptation) \
132 $(call all-cpp-files-under, src/adaptation) \
133 $(call all-c-files-under, src/gki) \
134 src/nfca_version.c
135include $(BUILD_SHARED_LIBRARY)
136
137
138######################################
139include $(call all-makefiles-under,$(LOCAL_PATH))
Puneet Mishrab6393452015-11-11 17:34:44 +0000140endif