cbp2ndk export utility
The goal of the cbp2ndk utility is to transfer settings and settings made in Code::Blocks to the format of Android NDK
Supported C::B configuration blocks:
- both global settings blocks and corresponding tags are supported
- compiler flags settings
- setting options linker
- list of link libraries
- list of compiled project files
Data conversion for NDK configuration, Android.mk file:
- automatic calculation of paths for
includeand their inclusion in the variableLOCAL_C_INCLUDES - automatic calculation of connected libraries and their inclusion in the variable
LOCAL_LDLIBS - automatic calculation of extensions of compiled files and their inclusion in the variable
LOCAL_CPP_EXTENSION - automatic distribution of flags between the variables
LOCAL_CFLAGSandLOCAL_CPPFLAGSaccording to their language - listing the compiled project files and adding them to the variable
LOCAL_SRC_FILES - export the command line for the autorun application from
Project -> Program launch parametersinMakefileand the startup script - if the file
Android.mkis not in the directory pointed to by the path to the.cbpproject, it will be created automatically. If you createAndroid.mk, the name for the application will be taken from the name of the project and all the specials. characters and spaces will be replaced with the underscore_. - the files
Application.mkandMakefilein the absence of the directory pointed to by the path to the project.cbp, will be created automatically. InMakefileyou need to edit the variableNDKROOTindicating the path toAndroid NDKon your system. - by default, the debug print library for Android, liblog is always included in the variable
LOCAL_LDLIBS, and the project root directory is included in the variableLOCAL_C_INCLUDES
Rewritable variables in the Android.mk file:
The following variables can be overwritten, do not fill them in manually.
LOCAL_CPP_EXTENSIONLOCAL_SRC_FILESLOCAL_CFLAGSLOCAL_CPPFLAGSLOCAL_LDFLAGSLOCAL_LDLIBSLOCAL_C_INCLUDESLOCAL_MODULE(in case of file creation)
Variables not included in this list will be saved with the values and overwritten with the new configuration.
Command line parameters:
Options:
-a, --auto find .cbp project file from current directory
-c, --cbp path to .cbp project file
-d, --dump dump current configuration
-t, --tag building tag: Debug|Release|OtherTag
-q, --quiet quiet all messages
-v, --verbose verbose output to console
-n --nodefault no set default values (libs, include paths)
--cbtmpl install C::B wizard template Makefile file
--api android API number (Application.mk)
--abi android ABI platform (Application.mk)
--ndkopt android NDK options (Application.mk)
Using:
cbp2ndk.exe <BuildTag> <path\project.cbp>
cbp2ndk.exe -t <BuildTag> -c <path\project.cbp> -v
cbp2ndk.exe -a --api android-28 --abi armeabi-v7a --ndkopt debug
cbp2ndk.exe -a
Adding a menu to C::B

Sources:
Download cbp2ndk v.0.0.14.79 / win32 (07/03/2019)
See cbp2ndk directory
Learn more about the format and capabilities of the file Android.mk
Recommendations:
Always use a Unix-style slash (/) in assembly files. The build system incorrectly handles the backslash in Windows style.
Try not to change the level of optimization / debugging in your
Android.mkfile. This allows the build system to generate useful data files used during debugging. It is meant to exclude the use of the flags-g,-s,-Oand their analogues.
License
MIT