Home | History | Annotate | Download | only in libnfc-nci
      1 # function to find all *.cpp files under a directory
      2 define all-cpp-files-under
      3 $(patsubst ./%,%, \
      4   $(shell cd $(LOCAL_PATH) ; \
      5           find $(1) -name "*.cpp" -and -not -name ".*") \
      6  )
      7 endef
      8 
      9 
     10 LOCAL_PATH:= $(call my-dir)
     11 NFA := src/nfa
     12 NFC := src/nfc
     13 HAL := src/hal
     14 UDRV := src/udrv
     15 HALIMPL := halimpl/bcm2079x
     16 D_CFLAGS := -DANDROID -DBUILDCFG=1
     17 
     18 
     19 ######################################
     20 # Build shared library system/lib/libnfc-nci.so for stack code.
     21 
     22 include $(CLEAR_VARS)
     23 LOCAL_PRELINK_MODULE := false
     24 LOCAL_ARM_MODE := arm
     25 LOCAL_MODULE := libnfc-nci
     26 LOCAL_MODULE_TAGS := optional
     27 LOCAL_SHARED_LIBRARIES := libhardware_legacy libcutils liblog libdl libstlport libhardware
     28 LOCAL_CFLAGS := $(D_CFLAGS)
     29 LOCAL_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
     39 LOCAL_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
     47 include $(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 
     54 include $(CLEAR_VARS)
     55 LOCAL_MODULE := nfc_nci.$(TARGET_DEVICE)
     56 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
     57 LOCAL_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
     61 LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy libstlport
     62 LOCAL_MODULE_TAGS := optional
     63 LOCAL_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
     73 LOCAL_CFLAGS := $(D_CFLAGS) -DNFC_HAL_TARGET=TRUE -DNFC_RW_ONLY=TRUE
     74 LOCAL_CPPFLAGS := $(LOCAL_CFLAGS)
     75 include $(BUILD_SHARED_LIBRARY)
     76 
     77 
     78 ######################################
     79 include $(call all-makefiles-under,$(LOCAL_PATH))
     80