私はメイクファイルについて学んでいて、いくつかの構文と SUFFIXES の仕組みについて少し混乱しています。
CPP = g++
OFLAG = -o
.SUFFIXES : .o .cpp .c
.cpp.o :
$(CPP) $(CPPFLAGS) -c $<
.c.o :
$(CPP) $(CPPFLAGS) -c $<
all: \
Return \
Declare \
Ifthen \
Guess \
Guess2 \
Return: Return.o
$(CPP) $(OFLAG)Return Return.o
Deckare: Declare.o
$(CPP) $(OFLAG)Declare Declare.o
# follow same format for other executables
Return.o: Return.cpp
Declare.o: Declare.cpp
# follow same format for other executables
「.SUFFIXES : .o .cpp .c」という行は実際に何をするのでしょうか?
$< の意味がよくわかりません。
CPPFLAGS はどこから来たのですか? (make だけの特別な構文ですか?)。