News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

I need to export the makefile but I can't find the option

Started by matthieu, October 16, 2006, 08:46:29 AM

Previous topic - Next topic

matthieu

Hello,
I searched the forums and found people speaking about an old feature now disabled "Export Makefile".
This is a pity because in my case having the makefile is really essential: i'm writing an application which will be executed on a webserver, without X, without codeblocks, and so I need to compile it via SSH.

Of course a solution would be to write the makefile myself, but this is not user friendly nor the objective of an IDE to force the users to create their own makefile ;-)

Is this feature planned for a near future?
How do people usually manage this?

Thank you for support!
Matthieu

MortenMacFly

I have the same problem as I develop tools that require a Makefile build process, too.
Now, what I did is having another C::B copy installed in parallel - the RC2 one. This still supports the Makefile export and since my projects change rarely in questions of adding/removing files I don't have to use it very often to update the Makefiles.
Anyway: It wouldn't be wise to re-activate the Makefile export currently. But (at least) I surely see this requirement for the future.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Game_Ender

Makefile generation is helpful but the developers aren't maintaining it now because the build system is being (almost?) redone so it would be a waste of time fix it know and then have to rewrite it earlier.

IMHO it would make more sense to spend that time developing a CB project generator for Cmake or scons.  That way you have true cross platform build system with the easy of an IDE like Code::Blocks.  I should really investigate this a little more.

takeshimiya

Quote from: Game_Ender on October 17, 2006, 10:44:28 PM
IMHO it would make more sense to spend that time developing a CB project generator for Cmake or scons.  That way you have true cross platform build system with the easy of an IDE like Code::Blocks.  I should really investigate this a little more.

Should be doable, for bakefile too. But first some changes have to come from the compiler framework: settings for debug, optimize, etc. for grouping common flags between compilers.

Self explaining example:
Code (xml) Select
<exe id="myprogram">
  <!-- set target-specific variable: -->
  <set var="SOME_VAR">value</set>
  <!-- three tags: -->
  <sources>file1.c myprogram.c utils.c</sources>
  <include>./includes</include>
  <define>USE_UNICODE</define>
</exe>


Set compiler's optimization level. May be one of off (no optimization), speed (generate fastest code) or size (smallest code):
Code (xml) Select
<set var="OPTIMIZE_FLAG">
  <if cond="BUILD=='release'">speed</if>
  <if cond="BUILD=='debug'">off</if>
</set>
<exe id="myapp">
  <optimize>$(OPTIMIZE_FLAG)</optimize>
  <sources>main.c</sources>
  <sys-lib>GL</sys-lib>
</exe>

ecrerix

Quote from: Game_Ender on October 17, 2006, 10:44:28 PM
IMHO it would make more sense to spend that time developing a CB project generator for Cmake or scons.  That way you have true cross platform build system with the easy of an IDE like Code::Blocks.  I should really investigate this a little more.
you should take a look at http://premake.sourceforge.net/ then.
it's been mentioned in the forums before but apparently the author didn't find the time to check back to announce
the release with code::blocks support (no guarantee if it's still up to date still as I didn't try it out myself yet, but 3 weeks should not have that much changes I guess)

rjmyst3

We on the wxformbuilder team are using premake to generate codeblocks project files and makefiles on both windows and linux. It is fantastic. Easy to use lua scripting and perfect results.

We worked with both bakefile and scons, but we didn't like either as much as we like premake.

[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]