Reputation: 1383
I came across the makefile when I read something about flex
fb3-1: fb3-1.l fb3-1.y fb3-1.h
bison -d fb3-1.y
flex -ofb3-1.lex.c fb3-1.l
cc -o $@ fb3-1.tab.c fb3-1.lex.c fb3-1funcs.c
but what's the meaning of $@? Is it in the shell or some argument of gcc?
Upvotes: 0
Views: 82
Reputation: 212929
$@
is just short-hand for the file name of the current target (fb3-1
in this case).
See the Automatic Variables section of the gnu make manual for full details on this and other useful automatic variables such as $<
.
Upvotes: 1