Reputation: 67221
I am new to learning make files.I was reading this post.
could anyone please tell me what is $@
variable used for inside a makefile?
Upvotes: 5
Views: 5672
Reputation: 70497
It's used to refer to the target, for example:
test:
gcc -o $@ [email protected]
Would compile program test
from test.c
if you ran make test
Upvotes: 4
Reputation: 213526
The $@
stands for the target of the current rule. More info here.
Upvotes: 7