Special macros
In addition to those macros which you can create yourself, there are a
few macros which are used internally by the make program. Here are
some of those, listed below:
-
CC
-
Contains the current C compiler. Defaults to cc.
-
CFLAGS
-
Special options which are added to the built-in C rule. (See next page.)
-
$@
-
Full name of the current target.
-
$?
-
A list of files for current dependency which are out-of-date.
-
$<
-
The source file of the current (single) dependency.
You can also manipulate the way these macros are evaluated, as follows,
assuming that OBJS = data.o io.o main.o, using $(OBJS:.o=.c)
within the Makefile substitutes .o at the end with .c, giving you
the following result: data.c io.c main.c
PreviousNextIndex
Last updated on Wednesday, June 21, 1995 by
Ben
Y. Yoshino
Copyright © 1995 University of Hawai`i, College of Engineering,
Computer Facility
All rights reserved.