5 Years
Discussion Span
Last Post by mike_2000_17

First hit on google: makefile tutorial. Do you have any specific question?

Remember that makefiles are space-tab sensitive (a very annoying aspect of makefile syntax), meaning that the number of spaces and tabs (and where tabs appear rather than spaces) is important.

Frankly, writing makefiles directly by hand is out-right torture. Most people use something else to generate the makefiles (and that's what most IDEs do under-the-hood too). I recommend something like CMake which is just as light-weight as make, but has a much simpler and more intuitive syntax. It is good to be familiar with makefile syntax mostly as a skill for being able to diagnose problems (read makefiles) and do some quick fixes in the makefiles, but actually writing a makefile from scratch is rather unusual, even the more masochistic people use a tool like autoconf (which is only marginally better than makefiles).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.