Author Topic: I need to export the makefile but I can't find the option  (Read 3601 times)

matthieu

  • Guest
I need to export the makefile but I can't find the option
« on: October 16, 2006, 08:46:29 am »
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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9506
Re: I need to export the makefile but I can't find the option
« Reply #1 on: October 16, 2006, 10:05:33 am »
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: I need to export the makefile but I can't find the option
« Reply #2 on: October 17, 2006, 10:44:28 pm »
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.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: I need to export the makefile but I can't find the option
« Reply #3 on: October 17, 2006, 11:00:30 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
  1. <exe id="myprogram">
  2.   <!-- set target-specific variable: -->
  3.   <set var="SOME_VAR">value</set>
  4.   <!-- three tags: -->
  5.   <sources>file1.c myprogram.c utils.c</sources>
  6.   <include>./includes</include>
  7.   <define>USE_UNICODE</define>
  8. </exe>

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

ecrerix

  • Guest
Re: I need to export the makefile but I can't find the option
« Reply #4 on: October 17, 2006, 11:06:23 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)

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: I need to export the makefile but I can't find the option
« Reply #5 on: October 18, 2006, 01:10:35 am »
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.

« Last Edit: October 18, 2006, 01:13:27 am by rjmyst3 »