Makefile: Difference between revisions

m
They're not always harmful.
[unchecked revision][unchecked revision]
(→‎See Also: Added link to the multi-target Makefile.)
m (They're not always harmful.)
Line 79:
Those are subdirectories holding the actual sources. (Or rather, searched for source files automatically, see below.) These could be subprojects, or whatever. We could simply search for source files starting with the current working directory, but if you like to have temporary subdirectories in your project (for testing, keeping reference sources etc.), that wouldn't work.
 
''Note that this is not a recursive approach; there is no Makefile in those subdirectories. Dependencies are hard enough to get right if you use one Makefile. At the bottom of this article is a link to a very good paper on the subject titled "recursive make considered harmful"; not only is a single Makefile easier to maintain (once you learned a couple of tricks), it's can also be more efficient!''
 
=== Sources and Headers ===
Anonymous user