Author Topic: Problems with custom makefiles  (Read 5469 times)

timt

  • Guest
Problems with custom makefiles
« on: June 02, 2005, 03:13:37 pm »
I've just installed CodeBlocks 1.0 final beta (on linux) and am playing around with it.

One of the first things I did was create a project a import some existing source files into it.  These files have a Makefile, which works correctly on its own.  I have checked the "This is a custom Makefile" box in the Project options.  I've read the FAQ, specifically Q2.4 about compiling with custom Makefiles.  At the end of that section of the FAQ it says "Also make sure that "GNU make" is the selected build method for the specific compiler."   I assume this means that under Settings -> Compiler -> Programs tab, "make" should be listed for the "Make program" option.  But I'm not sure if I should also replace "g++" with "make" in the "C++ compiler" option?

Actually, it still doesn't work either way.  If I leave g++ as the C++ compiler, my custom Makefile does not get used so I get a load of link errors.  If I replace g++ with make in the C++ compiler option,  I get the following compile-time error:

make: invalid option -- c

This "c" option is nothing to do with my Makefile - it must be something the CodeBlocks is adding somewhere.

Has anyone else experienced this problem?  Am I doing something wrong, or is this a bug?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Problems with custom makefiles
« Reply #1 on: June 02, 2005, 06:07:15 pm »
Quote

At the end of that section of the FAQ it says "Also make sure that "GNU make" is the selected build method for the specific compiler." I assume this means that under Settings -> Compiler -> Programs tab, "make" should be listed for the "Make program" option.


No, it means that the compiler's build method (in ADVANCED options) is set to "Use Makefiles" instead of "Use compiler directly".

Hope that helps. :)

timt

  • Guest
Problems with custom makefiles
« Reply #2 on: June 03, 2005, 10:36:29 am »
Thanks for the reply! It works properly now (actually it is in the Settings->Compiler->Other tab).