Author Topic: makefiles etc.  (Read 9255 times)

delete123

  • Guest
makefiles etc.
« on: February 26, 2009, 08:17:30 am »
hello!

i want to compile my program which i wrote in code::blocks from command line with a simple command like "make". almost every source package you can download has some make or equivalent function. i have seen many of those automatic build mechanisms but don't know what fits best and even don't know them all. furthermore i do not want to edit those makefiles by hand. code::blocks compiles with a hit to "build", so it has to use some equivalent system internally too. does it have some makefile auto generation function? what's the best way to achieve this? i don't know where to start.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: makefiles etc.
« Reply #1 on: February 26, 2009, 09:32:06 am »
Reading the wiki would help to understand C::B's own build system, it's not makefile based.
http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks

You can use a makefile, the main makefile should be placed in the projects root directory.
To use a makefile-based project with C::B, just create an empty project with the wizard, place your source-tree with the main-makefile inside the projects root-dir and check "This is a custom Makefile" in the projects properties.
Make sure the make commands used by C::B are set correctly for your project (see projects build options tab "Make commands").
And of course you can search the forum, there are some threads about this, especially in the last time, because of changes to the makefile-based build-system.

C::B does not ship with a makefile generator. But you can search the forum for cbMakeGen (or cbMekfileGen I don't remember exactly).
« Last Edit: February 26, 2009, 11:06:08 am by jens »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: makefiles etc.
« Reply #2 on: February 26, 2009, 10:08:40 am »
is there somewhere a summary of ways to make makefiles? i haven't found a good one yet.

You will surely find some in the web using your preferred search engine.

This is not the right forum to ask for.

Questions not related to C::B are not allowed here, and therefore violating our forum rules, sorry.

Topic locked !