Jizhou Liao | 4619345 | 2015-05-19 10:33:04 -0700 | [diff] [blame] | 1 | # 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 |
| 17 | define all-cpp-files-under |
| 18 | $(patsubst ./%,%, \ |
| 19 | $(shell cd $(LOCAL_PATH) ; \ |
| 20 | find $(1) -name "*.cpp" -and -not -name ".*") \ |
| 21 | ) |
| 22 | endef |
| 23 | |
| 24 | LOCAL_PRELINK_MODULE := false |
| 25 | LOCAL_ARM_MODE := arm |
| 26 | LOCAL_PATH := $(call my-dir) |
| 27 | include $(CLEAR_VARS) |
| 28 | LOCAL_MODULE := nfc_nci.$(TARGET_DEVICE) |
| 29 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 30 | LOCAL_SRC_FILES := $(call all-c-files-under, .) $(call all-cpp-files-under, .) |
| 31 | LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy libdl libhardware |
| 32 | LOCAL_MODULE_TAGS := optional |
| 33 | |
| 34 | LOCAL_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 |
| 45 | PN547C2 := 1 |
| 46 | PN548C2 := 2 |
| 47 | |
| 48 | ifeq ($(PN547C2),1) |
| 49 | LOCAL_CFLAGS += -DPN547C2=1 |
| 50 | endif |
| 51 | ifeq ($(PN548C2),2) |
| 52 | LOCAL_CFLAGS += -DPN548C2=2 |
| 53 | endif |
| 54 | |
| 55 | #### Select the CHIP #### |
| 56 | LOCAL_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2 |
| 57 | |
| 58 | LOCAL_CFLAGS += -DANDROID \ |
| 59 | -DNXP_UICC_ENABLE -DNXP_HW_SELF_TEST |
| 60 | LOCAL_CFLAGS += -DNFC_NXP_HFO_SETTINGS=FALSE |
| 61 | #LOCAL_CFLAGS += -DFELICA_CLT_ENABLE |
| 62 | |
| 63 | include $(BUILD_SHARED_LIBRARY) |