summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2015-09-29 17:12:58 -0700
committerDan Willemsen <dwillemsen@google.com>2015-10-13 16:17:20 -0700
commitf85bfd062f4ea7f5348c81cd24d59b8d5772292a (patch)
treebddb93a20af5fa13fcec1dd6456d41ff144dbb98
parentc22a07fdcd13c148c0d2db7317397da2a6345f0b (diff)
downloadlibnfc-nci-marshmallow-mr1-dev.tar.gz
Use global all-cpp-files-undermarshmallow-mr1-dev
The build system now has a better implementation of all-cpp-files-under Bug: 24204119 Change-Id: I295247b82c1d522f284963df79b94730c1f6017c
-rw-r--r--Android.mk14
-rw-r--r--halimpl/pn54x/Android.mk14
2 files changed, 1 insertions, 27 deletions
diff --git a/Android.mk b/Android.mk
index eb36bb6..59bc991 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,12 +1,3 @@
-# function to find all *.cpp files under a directory
-define all-cpp-files-under
-$(patsubst ./%,%, \
- $(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "*.cpp" -and -not -name ".*") \
- )
-endef
-
-
LOCAL_PATH:= $(call my-dir)
NFA := src/nfa
NFC := src/nfc
@@ -20,10 +11,8 @@ D_CFLAGS := -DANDROID -DBUILDCFG=1
# Build shared library system/lib/libnfc-nci.so for stack code.
include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libnfc-nci
-LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils liblog libdl libhardware
LOCAL_CFLAGS := $(D_CFLAGS)
LOCAL_C_INCLUDES := \
@@ -54,7 +43,6 @@ include $(BUILD_SHARED_LIBRARY)
# Android's generic HAL (libhardware.so) dynamically loads this shared library.
include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := nfc_nci.bcm2079x.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := $(call all-c-files-under, $(HALIMPL)) \
@@ -62,7 +50,6 @@ LOCAL_SRC_FILES := $(call all-c-files-under, $(HALIMPL)) \
src/adaptation/CrcChecksum.cpp \
src//nfca_version.c
LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy
-LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/$(HALIMPL)/include \
$(LOCAL_PATH)/$(HALIMPL)/gki/ulinux \
@@ -74,7 +61,6 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/$(NFA)/include \
$(LOCAL_PATH)/$(UDRV)/include
LOCAL_CFLAGS := $(D_CFLAGS) -DNFC_HAL_TARGET=TRUE -DNFC_RW_ONLY=TRUE
-LOCAL_CPPFLAGS := $(LOCAL_CFLAGS)
include $(BUILD_SHARED_LIBRARY)
diff --git a/halimpl/pn54x/Android.mk b/halimpl/pn54x/Android.mk
index c923a46..d75a654 100644
--- a/halimpl/pn54x/Android.mk
+++ b/halimpl/pn54x/Android.mk
@@ -12,24 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-# function to find all *.cpp files under a directory
-define all-cpp-files-under
-$(patsubst ./%,%, \
- $(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "*.cpp" -and -not -name ".*") \
- )
-endef
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_ARM_MODE := arm
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := nfc_nci.$(TARGET_DEVICE)
LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_SRC_FILES := $(call all-c-files-under, .) $(call all-cpp-files-under, .)
+LOCAL_SRC_FILES := $(call all-subdir-c-files) $(call all-subdir-cpp-files)
LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy libdl libhardware
-LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/utils \