Using variables
It defines and uses a variable like that. do not forget the parentheses.
Code:
TEX = 1.tex
LATEX = latex-interaction = nonstopmode-shell-escape
all:
$ (LATEX) $ (TEX)
You can use a variable in the definition of another variable.
Code:
MORE = A.tex B.tex
TEX = 1.tex 2.tex 3.tex 4.tex $ (MORE
The following example is equivalent (but do not copy provided).
Code:
TEX = 1.tex 2.tex 3.tex 4.tex $ (MORE)
MORE = A.tex B.tex
When make knows how to create a file from another without being told (eg, a *. o file from a *. c), we can still control its behavior using some variables.
Code:
CC = gcc
CXX = g + +
CPP = $ (CC)-E
CFLAGS =-Wall-O2 -I/usr/X11R6/include
CXXFLAGS =
LDFLAGS =
Bookmarks