User forums > Using Code::Blocks
cbp2make - makefile generation tool
mirai:
--- Quote from: oBFusCATed on November 17, 2010, 08:57:10 am ---mirai: Do you have plans to make automake/autotools system generation?
--- End quote ---
Honestly, I just haven't thought about creating that kind of build tool.
As far as I know, the autotools system is rather complicated and unfriendly one.
However, If there is an actual necessity to connect CB to automake/autotools system,
maybe it is a good idea to get concerned about developing such tool.
For the time being, I want to get makefile generation tool to production state
as soon as possible before I am forced to switch to something else...
xunxun:
I think you can add Linux makefile/Mingw makefile(make/mingw32-make) and Windows makefile(nmake) support.
mirai:
--- Quote from: xunxun1982 on November 18, 2010, 04:28:02 am ---I think you can add Linux makefile/Mingw makefile(make/mingw32-make) and Windows makefile(nmake) support.
--- End quote ---
That's what I'm actually planning (all but nmake, because there's a little different story with nmake, I may add nmake later).
Almost all of the time I'm developing and testing under Linux, so Windows part may not work for now.
Update: (see rev.35)
[+] Improved platform and toolchain management
[+] Implemented compiler and linker option relations
[+] Working directories for targets (see macros.h TARGET_WDIR_ENABLED)
[+] Commands-only targets
[+] Support for fortran compilers (f77,f9x)
[+] Extended object names (like foo.cpp.o vs foo.o)
[*] Limited support for Windows/Mac platforms (untested yet)
.
--- Quote ---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
--- End quote ---
Now I'm gradually starting to switch from developing to testing and working on compatibility with Windows.
There are few things I had problems with.
One problem is working directories for targets. According to CB's wiki, one should change directory to target's
working directory before building it, but applying that to the CB projects results in discrepancy in expected paths
in build command sequence. What's wrong?
Another is calling resource compilers, processing of WX forms, etc. How does CB invokes this resource compiler stuff ?
There are also few other things to implement before full-scale testing, but I think they will be completed in the course of time.
mirai:
Update: (see rev.37)
[+] Moved Before-build and After-build commands to individual targets
[*] Fixed dynamic library linking
[*] Fixed makefile generation for project with multiple targets
[*] Fixed makefile generation for workspaces
[*] Fixed issues caused by wrong file paths or extensions
I tried to convert and build Code::Blocks IDE project and plug-ins workspace and it seems that it mostly worked out with couple of exceptions. (openSUSE 11.2 x86, gcc 4.4.x, wxWidgets 2.8.10, CodeBlocks 10.05)
1) Neither CB build system nor make tool could not link "codeblocks" executable leaving me with error message
" ../../devel/libwxscintilla.so: undefined reference to `sci2wx(char const*)' "
after everything else before final linkage went just fine.
2) Neither of build tools could not select correct "wxscintilla.h" out of system default and one from CB sources,
even with include directories given in right order, so I had to rename CB's version of wxscintilla.* files and change #include directives accordingly.
Please confirm if cbp2make really works in for unix version of CB IDE project or for any of your projects.
mirai:
Update: (see rev.38)
[*] Fixed makefile generation for Windows platform
[*] Switched Windows platform defaults to MinGW (32bit)
Now cbp2make works for my projects in Windows, but they are quite simple. I would be very grateful to everyone for testing this tool or for links to open source projects developed with CodeBlocks to test against them.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version