*************************************** 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