Automatic generation of CPP files in android.mk files in Cocos2d-x

Source: Internet
Author: User

1, this code download from Zilong, although not understand, should be the general version. https://gist.github.com/andyque/6060595

Local_path: = $ (call My-dir) include $ (clear_vars) Local_module: = game_shared local_module_filename: = Libgame #traverse All the directory and Subdirectorydefine walk $ (wildcard $ (1)) $ (foreach E, $ (wildcard $ (1)/*), $ (call Walk, $ (e))) Endef #traverse Classes directoryallfiles = $ (call walk, $ (local_path)/. /.. /classes) File_list: = Hellocpp/main.cppfile_list + = $ (filter%.cpp, $ (allfiles)) File_includes: = $ (Shell find $ (LOCAL_PA TH)/. /..                    /classes-type d) #source file would be compiledlocal_src_files: = $ (file_list:$ (Local_path)/%=%) Local_c_includes: = $ (Local_path)/. /.. /.. /external/box2d/$ (file_includes) Local_whole_static_libraries: = cocos2dx_static cocosdenshion_static Cocos_ Extension_static box2d_static include $ (build_shared_library) $ (call Import-module,cocosdenshion/android) $ (cal L IMPORT-MODULE,COCOS2DX) $ (call Import-module,extensions) $ (call import-module,external/box2d)

2. My own

Local_path: = $ (call My-dir) include $ (clear_vars) Local_module: = Cocos2dcpp_sharedlocal_module_filename: = Libcocos2dcpp#traverse all the directory and Subdirectorydefine walk $ (wildcard $ (1)) $ (foreach E, $ (wildcard $ (1)/*), $ ( Call Walk, $ (e))) endef #traverse Classes directoryallfiles = $ (call walk, $ (local_path)/. /.. /classes) File_list: = Hellocpp/main.cppfile_list + = $ (filter%.cpp, $ (allfiles)) File_list + = $ (filter%.c, $ (allfiles)) F Ile_includes: = $ (Shell find $ (local_path)/. /..                    /classes-type d) #source file would be compiledlocal_src_files: = $ (file_list:$ (Local_path)/%=%) Local_c_includes: = $ (Local_path)/. /.. /.. /external/box2d/$ (file_includes) Local_whole_static_libraries: = cocos2dx_static cocosdenshion_static Cocos_ Extension_static Box2d_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) 


Automatic generation of CPP files in android.mk files in Cocos2d-x

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.