Cocos2dx-android's makefile General advanced notation

Source: Internet
Author: User

No nonsense, direct paste, save time. where improvements are needed, please point out that you can learn together.

Local_path: = $ (call My-dir) include $ (clear_vars) Local_module: = Cocos2dcpp_sharedlocal_module_filename: = libcocos2dcpp################################################################################################## ###### #手动遍历文件夹以及子目录 ####################################################### #这是第一种很麻烦的写法 ######################## ######## #XLOCAL_C_INCLUDES: = # $ (local_path)/hellocpp # $ (local_path)/... /.. /classes# #XLOCAL_CPPS: = # $ (wildcard $ (Local_path)/hellocpp/*.cpp) # $ (WILDCA RD $ (Local_path)/.. /.. /CLASSES/*.C) # $ (wildcard $ (local_path)/... /.. /classes/*.cpp) # #XLOCAL_SRC_FILES: = $ (xlocal_cpps:$ (Local_path)/%=%) # #LOCAL_C_INCLUDES + = $ (xlocal_c_includes) # Local_src_files: = $ (xlocal_src_files) ########################################################################## ############################################################################################################# #自动Traverse folders and subdirectories ####################################################### #这是第二种比较方便的写法 ############################### Functions that traverse directories and subdirectories #define WALK # $ (wildcard $ (1)) $ (foreach E, $ (wildcard $ (1)/*), $ (call Walk, $ (e))) #endef # # Traversal class Es directory #ALLFILES = $ (call walk, $ (local_path)/. /.. /classes) # #FILE_LIST: = hellocpp/main.cpp # # extract all. cpp files from all files #FILE_LIST + = $ (filter%.cpp, $ (AL Lfiles) # #LOCAL_SRC_FILES: = $ (file_list:$ (Local_path)/%=%) #LOCAL_C_INCLUDES: = $ (local_path)/... /.. /classes # $ (local_path)/... /.. /classes/logclass############################################################################################# ########################################################################################## #自动遍历文件夹以及子目录 ( source files and header files) ######################################### #这是第三种之相对最方便的写法 ############################ Configure your own source file directory and source file suffix name App_files_path: = $ (Local_path) $ (local_path)/. /.. /classesapp_files_suffix: =%.cpp%.c# recursively traverse directoryUnder All Files rwildcard=$ (wildcard $1$2) $ (foreach d,$ (wildcard $1*), $ (call Rwildcard, $d/,$2)) # gets the corresponding source file App_all_files: = $ ( foreach src_path,$ (App_files_path), $ (call rwildcard,$ (Src_path), *. *)) App_all_files: = $ (app_all_files:$ (app_cpp_ PATH)/./%=$ (app_cpp_path)%) App_src_list: = $ (Filter $ (app_files_suffix), $ (app_all_files)) App_src_list: = $ (app_src_  list:$ (Local_path)/%=%) # removes duplicate words from a string define Uniq = $ (eval seen: =) $ (foreach _,$1,$ (if $ (filter $_,${seen}), $ (eval seen + = $_))) ${seen}endef# recursive traversal gets all directories app_all_dirs: = $ (dir $ (foreach src_path,$ (App_files_path), $ (call rwildcard,$ (Src_path) , */))) App_all_dirs: = $ (call uniq,$ (app_all_dirs)) # Assignment to the NDK compilation system Local_src_files: = $ (app_src_list) Local_c_includes: = $ ( App_all_dirs) ############################################################################## #LOCAL_WHOLE_STATIC _libraries: = cocos2dx_staticlocal_whole_static_libraries + = cocosdenshion_staticlocal_whole_static_libraries + = Box2d_staticlocal_whole_static_libraries + = Cocosbuilder_staticloCal_whole_static_libraries + = spine_staticlocal_whole_static_libraries + cocostudio_staticlocal_whole_static_ LIBRARIES + = Cocos_network_staticlocal_whole_static_libraries + cocos_extension_staticinclude $ (BUILD_SHARED_ LIBRARY) $ (call Import-module,.) $ (call import-module,audio/android) $ (call import-module,box2d) $ (call Import-module,editor-support/cocosbuilder) $ ( Call Import-module,editor-support/spine) $ (call Import-module,editor-support/cocostudio) $ (call Import-module, Network) $ (call import-module,extensions)


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.