|
|
|
|
|
by peterfirefly
567 days ago
|
|
$@ is the name of the target -- the @looks a bit like an old-fashioned target for practice and competition shooting. $< is the name of the input (the file the rule depends on). If the rule depends on more than one input, it is the first one. So you write your dependencies as xxx.c xxx.h yyy.h zzz.h with the C file first. Mnemotechnically, it is "the thing that goes into the build". $^ is the names of all the files the rule depends on. Think of it as a large hat above all the input file names. Many things in make are clumsy and GNU make is a behemoth that does so much more than the original make that it is really hard to learn -- but these shortcuts have really good names! (They are GNU make extensions, btw.) |
|