I have a sample make file which has a rule like the below. I just wanted to know what is the use of the $ in this $*.c
I am not sure whether it is also a macro as much of my Google search points to. Any suggestions is helpful. Thanks!
insert.o: insert.c
$(CC) $(DBUG) -c $*.c
$*is usually the stem that matches in an implicit rule. See the gnu make special varibles at http://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html for more detail.For an explicit rule like you have, there is no stem, so
$*evaluates to the source file minus the extension, ie,insert, assuming the extension is a recognised one. Otherwise it evaluates to nothing.