Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 1 | # Copyright (C) 2011 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | #variables for NFC_NXP_CHIP_TYPE |
| 16 | PN547C2 := 1 |
| 17 | PN548C2 := 2 |
| 18 | PN551 := 3 |
Love Khanna | c8164a2 | 2017-03-08 19:27:51 +0530 | [diff] [blame] | 19 | PN553 := 4 |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 20 | NQ110 := $PN547C2 |
| 21 | NQ120 := $PN547C2 |
| 22 | NQ210 := $PN548C2 |
| 23 | NQ220 := $PN548C2 |
| 24 | #NXP PN547 Enable |
| 25 | ifeq ($(PN547C2),1) |
| 26 | D_CFLAGS += -DPN547C2=1 |
| 27 | endif |
| 28 | ifeq ($(PN548C2),2) |
| 29 | D_CFLAGS += -DPN548C2=2 |
| 30 | endif |
| 31 | ifeq ($(PN551),3) |
| 32 | D_CFLAGS += -DPN551=3 |
| 33 | endif |
Love Khanna | c8164a2 | 2017-03-08 19:27:51 +0530 | [diff] [blame] | 34 | ifeq ($(PN553),4) |
| 35 | D_CFLAGS += -DPN553=4 |
| 36 | endif |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 37 | |
Hendrik Hagendorn | 4f27782 | 2016-11-23 18:50:54 +0100 | [diff] [blame] | 38 | #### Select the CHIP #### |
Rashed Abdel-Tawab | d2cbdeb | 2017-09-10 13:56:47 -0400 | [diff] [blame] | 39 | ifneq ($(filter pn547 nq110 nq120,$(BOARD_NFC_CHIPSET)),) |
Hendrik Hagendorn | 4f27782 | 2016-11-23 18:50:54 +0100 | [diff] [blame] | 40 | NXP_CHIP_TYPE := $(PN547C2) |
Rashed Abdel-Tawab | d2cbdeb | 2017-09-10 13:56:47 -0400 | [diff] [blame] | 41 | else ifneq ($(filter pn548 nq210 nq220,$(BOARD_NFC_CHIPSET)),) |
Hendrik Hagendorn | 4f27782 | 2016-11-23 18:50:54 +0100 | [diff] [blame] | 42 | NXP_CHIP_TYPE := $(PN548C2) |
| 43 | else ifeq ($(BOARD_NFC_CHIPSET),pn551) |
| 44 | NXP_CHIP_TYPE := $(PN551) |
| 45 | else ifeq ($(BOARD_NFC_CHIPSET),pn553) |
| 46 | NXP_CHIP_TYPE := $(PN553) |
| 47 | endif |
| 48 | |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 49 | ifeq ($(NXP_CHIP_TYPE),$(PN547C2)) |
| 50 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2 |
| 51 | else ifeq ($(NXP_CHIP_TYPE),$(PN548C2)) |
| 52 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2 |
| 53 | else ifeq ($(NXP_CHIP_TYPE),$(PN551)) |
| 54 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN551 |
Love Khanna | c8164a2 | 2017-03-08 19:27:51 +0530 | [diff] [blame] | 55 | else ifeq ($(NXP_CHIP_TYPE),$(PN553)) |
| 56 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553 |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 57 | else |
Love Khanna | c8164a2 | 2017-03-08 19:27:51 +0530 | [diff] [blame] | 58 | D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553 |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 59 | endif |
| 60 | |
Luca Stefani | 1e2ae27 | 2017-08-24 15:28:26 +0200 | [diff] [blame] | 61 | ifneq ($(BOARD_NFC_HAL_SUFFIX),) |
| 62 | HAL_SUFFIX := $(BOARD_NFC_HAL_SUFFIX) |
| 63 | else |
| 64 | HAL_SUFFIX := $(TARGET_DEVICE) |
| 65 | endif |
| 66 | |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 67 | LOCAL_PATH := $(call my-dir) |
| 68 | include $(CLEAR_VARS) |
Luca Stefani | 1e2ae27 | 2017-08-24 15:28:26 +0200 | [diff] [blame] | 69 | LOCAL_MODULE := nfc_nci.$(HAL_SUFFIX) |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 70 | LOCAL_PROPRIETARY_MODULE := true |
| 71 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 72 | LOCAL_SRC_FILES := \ |
Love Khanna | c8164a2 | 2017-03-08 19:27:51 +0530 | [diff] [blame] | 73 | $(call all-c-files-under, common) \ |
| 74 | $(call all-c-files-under, dnld) \ |
| 75 | $(call all-c-files-under, hal) \ |
| 76 | $(call all-c-files-under, log) \ |
| 77 | $(call all-c-files-under, self-test) \ |
| 78 | $(call all-c-files-under, tml) \ |
| 79 | $(call all-c-files-under, utils) \ |
| 80 | $(call all-cpp-files-under, utils) \ |
| 81 | nfc_nci.c |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 82 | |
Logan Chien | c14fd14 | 2017-04-14 14:55:00 +0800 | [diff] [blame] | 83 | LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libhardware |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 84 | |
| 85 | LOCAL_CFLAGS := $(D_CFLAGS) |
| 86 | LOCAL_C_INCLUDES += \ |
| 87 | $(LOCAL_PATH)/utils \ |
| 88 | $(LOCAL_PATH)/inc \ |
| 89 | $(LOCAL_PATH)/common \ |
| 90 | $(LOCAL_PATH)/dnld \ |
| 91 | $(LOCAL_PATH)/hal \ |
| 92 | $(LOCAL_PATH)/log \ |
| 93 | $(LOCAL_PATH)/tml \ |
| 94 | $(LOCAL_PATH)/self-test \ |
| 95 | |
| 96 | LOCAL_CFLAGS += -DANDROID \ |
| 97 | -DNXP_UICC_ENABLE -DNXP_HW_SELF_TEST |
| 98 | LOCAL_CFLAGS += -DNFC_NXP_HFO_SETTINGS=FALSE |
| 99 | #LOCAL_CFLAGS += -DFELICA_CLT_ENABLE |
| 100 | |
| 101 | |
| 102 | # |
Luca Stefani | 1e2ae27 | 2017-08-24 15:28:26 +0200 | [diff] [blame] | 103 | # nfc_nci.$(HAL_SUFFIX) |
Andre Eisenbach | 04d9019 | 2017-03-03 04:08:05 +0000 | [diff] [blame] | 104 | # |
| 105 | include $(BUILD_SHARED_LIBRARY) |