Why Makefiles over IDEs?

Why would I use makefiles over ides? Is either one any more scalable for a project?

I've been reading a lot about makefiles, But they seem more dependant on variables such as the compiler than an ide. Can makefiles be used to make large scale applications, like steam, at a low memory cost?
Last edited on
I guess both ways would require me to know the general design of my project. Makefiles seems possibly more tedious though. is Makefile OS dependant?
Last edited on
makefiles and IDEs are not comparable, your question can't be answered. Some IDEs use makefiles others automate the build process in different ways.

Some IDEs can be used to create makefiles.

I believe you have a misunderstanding about what a makefile is.
is Makefile OS dependant?
Makefiles are make-dependent. That is, the depend on the make program that you're using.

Makefiles are more flexible for projects with complex build procedures; e.g. files that are passed to a program to generate code. IDEs are usually capable of accommodating such procedures but require more setting up to do it properly. A build rule in a Makefile is just one or two lines.
But to be correct, yes, makefiles are OS-dependant. Which is why people find them such a pain.

They are most typical of *nix environments, and to help manage complexity between those environments, are often managed with the automake and autoconf tools, which will build you scary-looking makefiles that make sure your project compiles properly on any flavor of *nix (including OSX).

Outside of nixen (typically meaning on Windows), you need another set of makefiles, or you require your users to use a *nix emulation layer, like Cygwin or MinGW, which can mitigate most (but not all) of the difficulties in OS architecture. (For compiling. It does nothing for your code unless you specifically design the makefiles to handle the platform-specific branches in your source code, as needed.)

Many efforts to make a better make exist, all with varying degress of success, but make is so entrenched that you will always have it available. (Correct me if I'm wrong, but I don't think there are very many systems left where gmake is not available over the [inferior] system makes.)

Some of the more popular make replacements are CMake, Scons, and Jam.

(Here, I figured I'd google just in case I missed anything. Here's some good reading: http://freecode.com/articles/make-alternatives)

Yes, it's a mess.
[qoute] are often managed with the automake and autoconf tools,[/quote] well, indirectly, at least for autoconf. it generates a configure script which generates a makefile.

Some of the more popular make replacements are CMake
forgive my ignorance, but wouldnt cmake be an autoconf replacement? i thought cmake generated makefiles based on the os, libraries used, compiler, and ide
@LittleBobbyTables I was under that impression as well, but to be honest I've only used CMake whilst blindly following instructions on how to get different open source software to compile.
forgive my ignorance, but wouldnt cmake be an autoconf replacement?

Well, yes. CMake is a replacement for automake/autoconf, but only to a degree. But like them, it generates makefiles, so the correct use is cmake;make.

You can't escape make. Just move it somewhere you don't have to really look at it.
You can't escape make. Just move it somewhere you don't have to really look at it.
That's a really good way to put it.
Thanks all. I think I'll just stick to using ide's for now.
Topic archived. No new replies allowed.