Differences between version 67 and previous revision of MakefileHowto.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 67 | Last edited on Friday, May 8, 2009 11:46:24 am | by StairWay | Revert |
Older page: | version 66 | Last edited on Friday, May 8, 2009 11:43:36 am | by StairWay | Revert |
@@ -267,9 +267,9 @@
----
!!Automatic dependency calculation
-Based on manuals and [research papers | http://www.besttermpapers
.com], if you are creating a Makefile for C/C++ gcc can calculate dependency information for you. The quickest way to get this going is to add the -MD flag to your CFLAGS first. You will then need to know the names of the .d files in your makefile. I do something like this:
+Based on manuals and [research papers | http://www.besttermpaper
.com], if you are creating a Makefile for C/C++ gcc can calculate dependency information for you. The quickest way to get this going is to add the -MD flag to your CFLAGS first. You will then need to know the names of the .d files in your makefile. I do something like this:
<verbatim>
DEPS := $(patsubst %.o,%.d,$(OBJS))
</verbatim>