1# function to find all *.cpp files under a directory 2define all-cpp-files-under 3$(patsubst ./%,%, \ 4 $(shell cd $(LOCAL_PATH) ; \ 5 find $(1) -name "*.cpp" -and -not -name ".*") \ 6 ) 7endef 8 9 10LOCAL_PATH:= $(call my-dir) 11NFA := src/nfa 12NFC := src/nfc 13HAL := src/hal 14UDRV := src/udrv 15HALIMPL := halimpl/bcm2079x 16D_CFLAGS := -DANDROID -DBUILDCFG=1 17 18 19###################################### 20# Build shared library system/lib/libnfc-nci.so for stack code. 21 22include $(CLEAR_VARS) 23LOCAL_PRELINK_MODULE := false 24LOCAL_ARM_MODE := arm 25LOCAL_MODULE := libnfc-nci 26LOCAL_MODULE_TAGS := optional 27LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils liblog libdl libstlport libhardware 28LOCAL_CFLAGS := $(D_CFLAGS) 29LOCAL_C_INCLUDES := external/stlport/stlport bionic/ bionic/libstdc++/include \ 30 $(LOCAL_PATH)/src/include \ 31 $(LOCAL_PATH)/src/gki/ulinux \ 32 $(LOCAL_PATH)/src/gki/common \ 33 $(LOCAL_PATH)/$(NFA)/include \ 34 $(LOCAL_PATH)/$(NFA)/int \ 35 $(LOCAL_PATH)/$(NFC)/include \ 36 $(LOCAL_PATH)/$(NFC)/int \ 37 $(LOCAL_PATH)/src/hal/include \ 38 $(LOCAL_PATH)/src/hal/int 39LOCAL_SRC_FILES := \ 40 $(call all-c-files-under, $(NFA)/ce $(NFA)/dm $(NFA)/ee) \ 41 $(call all-c-files-under, $(NFA)/hci $(NFA)/int $(NFA)/p2p $(NFA)/rw $(NFA)/sys) \ 42 $(call all-c-files-under, $(NFC)/int $(NFC)/llcp $(NFC)/nci $(NFC)/ndef $(NFC)/nfc $(NFC)/tags) \ 43 $(call all-c-files-under, src/adaptation) \ 44 $(call all-cpp-files-under, src/adaptation) \ 45 $(call all-c-files-under, src/gki) \ 46 src/nfca_version.c 47include $(BUILD_SHARED_LIBRARY) 48 49 50###################################### 51# Build shared library system/lib/hw/nfc_nci.*.so for Hardware Abstraction Layer. 52# Android's generic HAL (libhardware.so) dynamically loads this shared library. 53 54include $(CLEAR_VARS) 55LOCAL_MODULE := nfc_nci.$(TARGET_DEVICE) 56LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 57LOCAL_SRC_FILES := $(call all-c-files-under, $(HALIMPL)) \ 58 $(call all-cpp-files-under, $(HALIMPL)) \ 59 src/adaptation/CrcChecksum.cpp \ 60 src//nfca_version.c 61LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy libstlport 62LOCAL_MODULE_TAGS := optional 63LOCAL_C_INCLUDES := external/stlport/stlport bionic/ bionic/libstdc++/include \ 64 $(LOCAL_PATH)/$(HALIMPL)/include \ 65 $(LOCAL_PATH)/$(HALIMPL)/gki/ulinux \ 66 $(LOCAL_PATH)/$(HALIMPL)/gki/common \ 67 $(LOCAL_PATH)/$(HAL)/include \ 68 $(LOCAL_PATH)/$(HAL)/int \ 69 $(LOCAL_PATH)/src/include \ 70 $(LOCAL_PATH)/$(NFC)/include \ 71 $(LOCAL_PATH)/$(NFA)/include \ 72 $(LOCAL_PATH)/$(UDRV)/include 73LOCAL_CFLAGS := $(D_CFLAGS) -DNFC_HAL_TARGET=TRUE -DNFC_RW_ONLY=TRUE 74LOCAL_CPPFLAGS := $(LOCAL_CFLAGS) 75include $(BUILD_SHARED_LIBRARY) 76 77 78###################################### 79include $(call all-makefiles-under,$(LOCAL_PATH)) 80