1,使用工具
2,使用cbmakegen插件
请参考
cbp2mak,下载地址:
下载后解压,然后cd到解压目录,执行“make”来编译cbp2mak 。
Example:
generate makefile for CodeBlocks core: $ cbp2mak -C cb/src CodeBlocks.cbp generate makefile for CodeBlocks contrib: $ cbp2mak -C cb/src ContribPlugins.workspace build: $ make -C cb/src -f CodeBlocks.cbp.mak $ make -C cb/src -f ContribPlugins.workspace.mak You might want to adjust some hardcoded paths in the makefile template or specify _WX=/path/to/wx and _CB=... at the make commanline. Todo: - add support for virtual targets (currently it builds all targets
Usage syntax:
Generate makefile: cbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>] [-unix] [-windows] [-mac] [--all-os] cbp2make -list -in <project_file_list> [-cfg <configuration>] [-unix] [-windows] [-mac] [--all-os] Manage toolchains: cbp2make --config cbp2make --config --add --default cbp2make --config --add -alias <toolchain> [-cc <c_compiler>] [-cpp <c++_compiler>] [-ln <linker>] [-st <static_linker>] [-ranlib <ranlib>] [-windres <windres>] [-make <make>] cbp2make --config --remove -alias <toolchain> Manage platforms: cbp2make --config [-unix|-windows|-mac] [-pwd <print_dir_command>] [-cd <change_dir_command>] [-rm <remove_file_command>] [-rmf <remove_file_forced>] [-rmd <remove_dir_command>] [-tf <test_file_command>] [-td <test_dir_command>] [-md <make_dir_command>] [-mdf <make_dir_forced>] Common options: cbp2make --verbose // show project information cbp2make --quiet // hide all messages cbp2make --help // display this message