blob: c923a464726b961fb788c8ae50af3d67c2fd025b [file] [log] [blame]
Jizhou Liao46193452015-05-19 10:33:04 -07001# Copyright (C) 2012-2014 NXP Semiconductors
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
16# function to find all *.cpp files under a directory
17define all-cpp-files-under
18$(patsubst ./%,%, \
19 $(shell cd $(LOCAL_PATH) ; \
20 find $(1) -name "*.cpp" -and -not -name ".*") \
21 )
22endef
23
24LOCAL_PRELINK_MODULE := false
25LOCAL_ARM_MODE := arm
26LOCAL_PATH := $(call my-dir)
27include $(CLEAR_VARS)
28LOCAL_MODULE := nfc_nci.$(TARGET_DEVICE)
29LOCAL_MODULE_RELATIVE_PATH := hw
30LOCAL_SRC_FILES := $(call all-c-files-under, .) $(call all-cpp-files-under, .)
31LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy libdl libhardware
32LOCAL_MODULE_TAGS := optional
33
34LOCAL_C_INCLUDES += \
35 $(LOCAL_PATH)/utils \
36 $(LOCAL_PATH)/inc \
37 $(LOCAL_PATH)/common \
38 $(LOCAL_PATH)/dnld \
39 $(LOCAL_PATH)/hal \
40 $(LOCAL_PATH)/log \
41 $(LOCAL_PATH)/tml \
42 $(LOCAL_PATH)/self-test
43
44#variables for NFC_NXP_CHIP_TYPE
45PN547C2 := 1
46PN548C2 := 2
47
48ifeq ($(PN547C2),1)
49LOCAL_CFLAGS += -DPN547C2=1
50endif
51ifeq ($(PN548C2),2)
52LOCAL_CFLAGS += -DPN548C2=2
53endif
54
55#### Select the CHIP ####
56LOCAL_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2
57
58LOCAL_CFLAGS += -DANDROID \
59 -DNXP_UICC_ENABLE -DNXP_HW_SELF_TEST
60LOCAL_CFLAGS += -DNFC_NXP_HFO_SETTINGS=FALSE
61#LOCAL_CFLAGS += -DFELICA_CLT_ENABLE
62
63include $(BUILD_SHARED_LIBRARY)