News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Problems with custom makefiles

Started by timt, June 02, 2005, 03:13:37 PM

Previous topic - Next topic

timt

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?

rickg22

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

Thanks for the reply! It works properly now (actually it is in the Settings->Compiler->Other tab).