Android.mk file - including all source files in different folders and subfolders

前端 未结 2 1713
故里飘歌
故里飘歌 2021-02-08 14:10

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?

2条回答
  •  臣服心动
    2021-02-08 15:03

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

    LOCAL_SRC_FILES += $(patsubst $(LOCAL_PATH)/%, %, $(wildcard folder/**/*.cpp))
    

提交回复
热议问题