开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜