4.4 Suffix rules

back: macros
forward: a minimal gnu autotools project
 
fastback: introducing makefiles
up: introducing makefiles
fastforward: a minimal gnu autotools project
top: autoconf, automake, and libtool
contents: table of contents
index: index
about: about this document

To simplify a `Makefile' , there is a special kind of rule syntax known as a suffix rule . This is a wildcard pattern that can match targets. Our first `Makefile' used some. Here is one:

 
 .c.o: $(CC) $(CFLAGS) -c $< -o $@ 

Unless a more specific rule matches the target being sought, this rule will match any target that ends in `.o' . These files are said to always be dependent on `.c' . With some background material now presented, let's take a look at these tools in use.


This document was generated by Gary V. Vaughan on May, 24 2001 using texi2html


GNU Autoconf, Automake and Libtool
GNU Autoconf, Automake, and Libtool
ISBN: 1578701902
EAN: 2147483647
Year: 2002
Pages: 290

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net