Makefile $@ variable-what is it used for?
I am new to learning make files.I was reading this post.
cou开发者_Python百科ld anyone please tell me what is $@
variable used for inside a makefile?
The $@
stands for the target of the current rule. More info here.
It's used to refer to the target, for example:
test:
gcc -o $@ $@.c
Would compile program test
from test.c
if you ran make test
精彩评论