makefile の自動変数

makeで使える自動変数のメモ.

$@ The file name of the target
$ The name of the first prerequisite
libhoge.a:  hoge.o huga.o
   ar curs $@ $<

libhoge.a:  hoge.o huga.o
   ar curs libhoge.a hoge.o huga.o

と展開される.