1define all-cpp-files-under 2$(patsubst ./%,%, \ 3 $(shell cd $(LOCAL_PATH) ; \ 4 find $(1) -name "*.cpp" -and -not -name ".*") \ 5 ) 6endef 7 8 9LOCAL_PATH:= $(call my-dir) 10NFA:=src/nfa 11NFC:=src/nfc 12UDRV:=src/udrv 13 14#gki 15GKI_FILES:=$(call all-c-files-under, src/gki) 16 17# 18# libnfc-nci 19# 20#nfa 21NFA_ADAP_FILES:= \ 22 $(call all-c-files-under, src/adaptation) \ 23 $(call all-cpp-files-under, src/adaptation) 24 25#nfa 26NFA_FILES:= $(call all-c-files-under, $(NFA)) 27NFC_FILES:= $(call all-c-files-under, $(NFC)) 28 29COMMON_CFLAGS += -DANDROID -DANDROID_USE_LOGCAT=TRUE 30 31NFA_CFLAGS += -DNFC_CONTROLLER_ID=1 32D_CFLAGS += -DDEBUG -D_DEBUG -O0 -g 33 34ifeq ($(findstring maguro,$(TARGET_PRODUCT)),) 35ifeq ($(findstring crespo,$(TARGET_PRODUCT)),) 36D_CFLAGS += -DGENERIC_TARGET=1 37endif 38endif 39 40D_CFLAGS += -DBUILDCFG=1 41D_CFLAGS += -DNFA_APP_DOWNLOAD_NFC_PATCHRAM=TRUE 42 43#NTAL includes 44NTAL_CFLAGS += -I$(LOCAL_PATH)/src/include 45NTAL_CFLAGS += -I$(LOCAL_PATH)/src/gki/ulinux 46NTAL_CFLAGS += -I$(LOCAL_PATH)/src/gki/common 47 48#NFA NFC includes 49NFA_CFLAGS += -I$(LOCAL_PATH)/src/include 50NFA_CFLAGS += -I$(LOCAL_PATH)/src/gki/ulinux 51NFA_CFLAGS += -I$(LOCAL_PATH)/src/gki/common 52NFA_CFLAGS += -I$(LOCAL_PATH)/$(NFA)/brcm 53NFA_CFLAGS += -I$(LOCAL_PATH)/$(NFA)/include 54NFA_CFLAGS += -I$(LOCAL_PATH)/$(NFA)/int 55NFA_CFLAGS += -I$(LOCAL_PATH)/$(NFC)/brcm 56NFA_CFLAGS += -I$(LOCAL_PATH)/$(NFC)/include 57NFA_CFLAGS += -I$(LOCAL_PATH)/$(NFC)/int 58NFA_CFLAGS += -I$(LOCAL_PATH)/$(UDRV)/include 59NFA_CFLAGS += -I$(LOCAL_PATH)/src/hal/include 60 61ifneq ($(NCI_VERSION),) 62NFA_CFLAGS += -DNCI_VERSION=$(NCI_VERSION) 63endif 64 65include $(CLEAR_VARS) 66LOCAL_PRELINK_MODULE := false 67LOCAL_ARM_MODE := arm 68LOCAL_MODULE:= libnfc-nci 69LOCAL_MODULE_TAGS := optional 70LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils libdl libstlport libhardware 71LOCAL_CFLAGS := $(COMMON_CFLAGS) $(D_CFLAGS) $(NFA_CFLAGS) 72LOCAL_C_INCLUDES := external/stlport/stlport bionic/ bionic/libstdc++/include 73LOCAL_SRC_FILES := $(NFA_ADAP_FILES) $(GKI_FILES) $(NFA_FILES) $(NFC_FILES) $(LOG_FILES) 74include $(BUILD_SHARED_LIBRARY) 75 76include $(call all-makefiles-under,$(LOCAL_PATH)) 77