file – including all source files in different folders and subfolders

In writing an android .mk file, is there a short way to include many source files which are in different folders and subfolders? Like a loop or a code for iterating the folders? For example:


  • Android Permission denial in Widget RemoteViewsFactory for Content
  • Run code once after each boot on Android
  • How to change the divider color in the listview?
  • Android EditText AutoFocus to next EditText when at maxlength
  • Updated - Android Facebook api 3.0 error: Cannot call LoginActivity with a null calling package
  • reorder pages in FragmentStatePagerAdapter using getItemPosition(Object object)
  • |—subfolder1.1

                   |---some cpp files
               |--some cpp files



               |--some cpp files

    |–(so on and so forth, another folders and subfolders and cpp

    I know I can use include $(call all-subdir-makefiles) for folders and subfolders but it will take too much time if I have so many folders, is there a better way? Like a loop for iterating through the folders? So I will have just one library for folder1 and another for folder2 and so on…

  • How to create a signed APK file using Cordova command line interface?
  • Resize image to full width and fixed height with Picasso
  • Android: I lost my android key store, what should I do?
  • Using Butter Knife in Custom BaseAdapter SubClass Results in “Unable to inject views” error
  • Tracking Android install referrers with Amazon Appstore
  • Trying to attach a file from SD Card to email
  • 2 Solutions collect form web for “ file – including all source files in different folders and subfolders”

    FILE_LIST := $(wildcard $(LOCAL_PATH)/*.cpp)
    FILE_LIST += $(wildcard $(LOCAL_PATH)/**/*.cpp)
    FILE_LIST += $(wildcard $(LOCAL_PATH)/**/**/*.cpp)

    You can use ** wildcard to include files from all subdirectories:

    LOCAL_SRC_FILES += $(patsubst $(LOCAL_PATH)/%, %, $(wildcard folder/**/*.cpp))
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.