Cocos2d-x android.mk automatically generates. cpp and. Class C paths

Source: Internet
Author: User

Today, colleagues found a script that can automatically generate ANDROID.MK. Paste it here and keep it for later use. Scripts that were previously found on the web only recognize classes that end in. cpp and can be modified to recognize the. C End of the class.



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) 








Original address: http://blog.csdn.net/qqmcy/article/details/39551979

Cocos2d-x android.mk automatically generates. cpp and. Class C paths

Related Article

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.