Author Topic: How to export a makefile  (Read 11621 times)

Offline kelo81

  • Multiple posting newcomer
  • *
  • Posts: 86
How to export a makefile
« on: March 22, 2007, 01:47:44 pm »
Hello fellows, I've been using Codeblocks to create my project under Windows and Linux, by using multiple targets. The problem is that I want to get a makefile from the linux project, because I need codeblocks to edit the project, but not to compile. I mean, if I want to redistribute my project (the sources), I don't want to force the users to use codeblocks to compile it. Is there any way to export a makefile from a project?, this is not an executable, but a shared lib (*.so) and I don't know how to make it; and also, I want to avoid writting a big file by including all hte project sources  :? .
Thanks in advance, this is a really great project!!
Ezequiel Ruiz
Tango/04 consultant
www.tango04.com

Offline kelo81

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: How to export a makefile
« Reply #1 on: March 22, 2007, 07:31:44 pm »
If codeblocks doesn't have the posibility to do dat, it might be a tool or something else that allows to automatically create makefiles with predefined targets right? Like shared *.so libs, or dinamic DLL for windows, or *.exe ; all from the *.cpp sources. Do anyone know any method to do something like that?

Ezequiel Ruiz
Tango/04 consultant
www.tango04.com

Offline DoMeN

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: How to export a makefile
« Reply #2 on: March 23, 2007, 08:49:33 am »
As far as I know C::B doesn't support that (I think that someone else asked this question on forum a while ago).

Check out Autotools but I'm not vrey familiar with them so I'm not shore if this is what you are looking for.

r. Domen

Offline kelo81

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: How to export a makefile
« Reply #3 on: March 23, 2007, 11:13:38 am »
Thanks, I'll check it.
However, I think it's an intresting feature to be added, a plugin that generates makefiles from codeblocks projects... unfortunately I have not enought knowledge to program that :( .
Ezequiel Ruiz
Tango/04 consultant
www.tango04.com

jazz

  • Guest
Re: How to export a makefile
« Reply #4 on: March 28, 2007, 08:21:22 am »
I think it's interesting that there is a menu option under 'Build' on the menu bar that says 'Export Makefile' but it is grayed out.  :?  (I'm using SVN 3703)

I too would like to supply a Makefile with my source instead of forcing people to use codeblocks when they don't need to.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to export a makefile
« Reply #5 on: March 28, 2007, 10:47:08 am »
I think it's interesting that there is a menu option under 'Build' on the menu bar that says 'Export Makefile' but it is grayed out.  :?  (I'm using SVN 3703)
The is left over from RC2. And RC2 is (in addition) the last version that supports the export of Makefiles. This feature has been disabled due to the massive internal changes that caused a stop of this functionality. This will return maybe in the future but it makes no sense to re-implement at that time.
So: If you want to export Makefiles, install RC2 (e.g. in parallel in *another* directory) and use this version for the export. Sure you will have issues with the project files (as the format has changed several times since than) but this can be resolved...
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline kelo81

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: How to export a makefile
« Reply #6 on: March 28, 2007, 01:58:12 pm »
But I suppose you won't enable this feature for the RC3 right?, I mean, is this included in a roadmap, or a TODO for an X.x version?
Ezequiel Ruiz
Tango/04 consultant
www.tango04.com

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to export a makefile
« Reply #7 on: March 28, 2007, 02:02:06 pm »
But I suppose you won't enable this feature for the RC3 right?
That's right it's very unlikely this will be re-enabled anytime soon due to the changes still to come... The reason in plain simple: We would have to do another re-write otherwise.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline kelo81

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: How to export a makefile
« Reply #8 on: March 28, 2007, 06:55:29 pm »
ok thanks!!  :D
Ezequiel Ruiz
Tango/04 consultant
www.tango04.com

jazz

  • Guest
Re: How to export a makefile
« Reply #9 on: April 02, 2007, 09:50:16 am »
I think it's interesting that there is a menu option under 'Build' on the menu bar that says 'Export Makefile' but it is grayed out.  :?  (I'm using SVN 3703)
The is left over from RC2. And RC2 is (in addition) the last version that supports the export of Makefiles. This feature has been disabled due to the massive internal changes that caused a stop of this functionality. This will return maybe in the future but it makes no sense to re-implement at that time.
So: If you want to export Makefiles, install RC2 (e.g. in parallel in *another* directory) and use this version for the export. Sure you will have issues with the project files (as the format has changed several times since than) but this can be resolved...
With regards, Morten.

Ah.. ok..  That's good enough for me.  I mean if I can get C:B to export it once it shouldn't be too hard for me to maintain after that.  Thanks! :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Suggestion: Standalone "cbmake" tool
« Reply #10 on: May 25, 2007, 01:56:58 am »
Why not create a "cbmake" commandline executable (without all the unnecessary code, even wxwidgets) that "makes" a .prj or even a whole .workspace? I think it would be quite useful, our build system has grown quite powerful, with its pre and post-build steps and support for workspaces, that it could rival other make-like tools out there.

Another reason to support this, is that (well maybe it's just me) it seems that the interface kinda slows down during the compilation process. That, and I noticed that the "export makefile" is still greyed out  :lol: it would be wise to remove it from 1.0 if we're not implementing it soon anyway.

What do you think?

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: How to export a makefile
« Reply #11 on: May 25, 2007, 03:44:41 pm »
I think everyone agrees what it would be great if CB was a little more decoupled.  That is really the only way this will get done, the build system has to be rewriten to not depend on wxWidgets then it will be trivial to create a standalone tool like VisualStudio and XCode have to build Code::Blocks project files.  Of course I don't think making the build system not depend on wxWidgets will be trivial.

Offline kelo81

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: How to export a makefile
« Reply #12 on: May 25, 2007, 04:02:58 pm »
I'll wait for it. By the moment, I'm using premake to build makefiles premake.sourceforge.net

Have a nice week-end!  :D
Ezequiel Ruiz
Tango/04 consultant
www.tango04.com

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: How to export a makefile
« Reply #13 on: May 26, 2007, 12:13:22 am »
The build system doesn't have to be wxWidgets independent. It could just use wxBase :D