Here's my sample makefile content:
CC=g++
CFLAGS=-c -Wall
...
$(CC) $(CFLAGS) $< -o $@
What does the $<
mean here?
Here's my sample makefile content:
CC=g++
CFLAGS=-c -Wall
...
$(CC) $(CFLAGS) $< -o $@
What does the $<
mean here?
Read the documentation of GNU make. It is explained in the automatic variable section.
$<
The name of the first prerequisite. If the target got its recipe from an implicit rule, this will be the first prerequisite added by the implicit rule