User forums > Using Code::Blocks

cbp2make - makefile generation tool

(1/25) > >>

mirai:
cbp2make is another standalone command-line tool to convert Code::Blocks projects to GNU makefiles.
Unlike previously appeared cbp2mak (v0.2) tool it does not require to be built for individual projects,
however, it is still in early stage of development and currently able to process only simple project files.
Hopefully, somebody will find this tool useful (http://sourceforge.net/projects/cbp2make).
I'm using CB constantly and going to support all or at least most of CB project/workspace features in this tool.
Any comments or suggestions are welcome.

xunxun:
That's very useful function, and you can refer to cbmakegen plugin.

http://forums.codeblocks.org/index.php/topic,6241.0.html
http://developer.berlios.de/projects/cbmakegen/

mirai:

--- Quote from: xunxun1982 on November 14, 2010, 09:26:09 am ---That's very useful function, and you can refer to cbmakegen plugin.

http://forums.codeblocks.org/index.php/topic,6241.0.html
http://developer.berlios.de/projects/cbmakegen/

--- End quote ---

Thank you, xunxun1982, I will refer to that.

Actually, I've looked through the plugin code and it seems that I haven't missed too many features.
So I have to add few words on what cbp2make can do and what it cannot in the current state.
Pros.:
(+) reads .cbp file directly and does not require .depend file presence as well as CB presence.
(+) processes all targets and all virtual targets, "all" and "clean" targets are added by default
(+) supports two(three) of all types of targets: binary, static library, (dynamic library)
(+) generates individual makefile for every platform
(+) keeps toolchain configuration in local xml file
Cons.:
(-) doesn't know how to process .workspace files
(-) doesn't work when project has no targets
(-) other types of targets are not supported
(-) doesn't generate makefile rules for before-build and after-build commands
(-) makes no difference between platforms and generates makefiles for unix toolchains
(-) can't read CB toolchain configuration from CB profile due to tinyxml library limitations (CDATA sections).


--- Quote ---Usage syntax:

        Generate makefile:
                cbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>]
                cbp2make -list -in <project_file_list> [-cfg <configuration>]

        Manage toolchains:
                cbp2make --config
                cbp2make --config --add --default
                cbp2make --config --add -alias <toolchain> -cc <c_compiler> -cpp <c++_compiler> -ln <linker> -st <static_linker>
                cbp2make --config --remove -alias <toolchain>

        Common options:
                cbp2make --verbose      // show project information
                cbp2make --quiet        // hide all messages
                cbp2make --help         // display this message

--- End quote ---

mirai:
Update: (see rev.30)

[+] Added support for Code::Blocks workspace files
[+] Project and unit dependencies are taken into account via weights/priorities
[+] Implemented "compile" and "link" flags for build units
[+] Implemented external dependencies for targets
[+] Implemented Before-build and After-build commands
[+] Projects without targets are processed with "default" virtual target
[*] Makefile names are made by appending ".mak" extension now, not by replacing input file extension.
[*] Improved toolchain management (this feature is incomplete yet)

There's still a lot of work has to be done...
[*] Windows/Mac platforms
[*] Environment variables
[*] Non-inclusive compiler/linker option relations
[*] Working directories for targets
[*] Resource compilers
[*] Other types of targets
[*] Other compilers from gcc collection
[*] ...

oBFusCATed:
mirai: Do you have plans to make automake/autotools system generation?

Navigation

[0] Message Index

[#] Next page

Go to full version