Cocos2d-x about ANDROID.MK automatic read in CPP

Source: Internet
Author: User

*************************************** Reprint Please specify the Source: Http://blog.csdn.net/lttree ********************************************


The development of Cocos2d-x games is known,

When all the stuff is done,

The last step, build apk,

Used to be the NDK and so on a series of complex things to do,

After 3.0, you can make it directly at the command line Cocos compile.

It's a lot easier.

However, there are still things that need to be manually

For example, fill in the. cpp file in the Android.mk file,

We're going to add in this file all the. cpp files that are used in our program.

If there are fewer files, but more files, it is very painful things.


This, only need three lines can solve!

It's that simple:

Local_path: = $ (call My-dir) include $ (clear_vars) Local_module: = Cocos2dcpp_sharedlocal_module_filename: = Libcocos2dcppfile_list: = hellocpp/main.cpp file_list + = $ (wildcard $ (local_path)/.. /.. /classes/*.cpp) Local_src_files: = $ (file_list:$ (Local_path)/%=%) Local_c_includes: = $ (local_path)/... /.. /classeslocal_whole_static_libraries: = cocos2dx_staticlocal_whole_static_libraries + = Cocosdenshion_staticLOCAL_ Whole_static_libraries + = Box2d_staticinclude $ (build_shared_library) $ (call import-module,2d) $ (call Import-module, Audio/android) $ (call import-module,box2d)

Yes, that's the middle three lines:

File_list: = hellocpp/main.cpp file_list + = $ (wildcard $ (local_path)/.. /.. /classes/*.cpp) Local_src_files: = $ (file_list:$ (Local_path)/%=%)

Well, after this, mom never have to worry about us doing Cocos games!




*************************************** Reprint Please specify the Source: Http://blog.csdn.net/lttree ********************************************

Cocos2d-x about ANDROID.MK automatic read in CPP

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.