Makefile: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Syntax highlighting, tabs (as per make), a bit of formatting.
Solar (talk | contribs)
m A quick brush-up of links.
Line 13:
= Makefile tutorial =
 
The 'make' manual will tell you about the hundreds of things you can do with a Makefile, but it doesn't give you an example for a ''good'' Makefile. The following examples are mostly shaped after the real-life [http://pdclib.rootdirectorye43.de/trac.fcgi/browser/trunk/Makefileeu PDCLib] Makefile I used at the time, and showshows some of the "tricks" used therein that may not be that obvious to the make beginner.
 
The Makefile creates only one project-wide linker library, but it should be easy to expand it for multiple binaries/libraries.
Line 259:
 
* [[User:Solar/Makefile]]<br />A more complex example capable of building multiple executables and libraries from a single Makefile.
* [http://www.rootdirectory.de/wiki/JAWS JAWS], a pre-configured [http://www.cmake.org CMake] setup which, while not geared toward OS development, is a definite step forward from "naked" Makefiles.
* [http://aegis.sourceforge.net/auug97.pdf Recursive Make Considered Harmful] by Peter Miller<br />A paper detailing why the traditional approach of recursive make invocations harms performance and reliability.
* [http://www.xs4all.nl/~evbergen/nonrecursive-make.html Implementing non-recursive make] by Emile van Bergen<br />Further input on the subject of non-recursive, low-maintenance Makefile creation.