Re: gcc -MM and Makefiles

From: George Greer (
Date: 09/17/99

On Fri, 17 Sep 1999, Zeavon wrote:

>Does anyone have an easy way to add the $(CC) -c $(CFLAGS) ....  line in
>the appropriate plraces?

You don't really need the ($CC) lines in GNU make (maybe others).  It's
smart enough to figure out that a .c file becomes a .o file.  You need the
final link rule though.

When in doubt, use the wildcard syntax which looks like:

%.o: %.c
        $(CC) ..blah..

You'll need $@ or $< if you do the above.  I don't remember which and don't
have my fancy Makefiles handy (at home).

George Greer            | Death's Gate Scripts   |

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST