SRC=$(wildcard '*.c')
This is just your original file name ending in .c ie file1.c, file2.c file3.c, etc.
at
test: $(SRC) gcc -o $@ $^ $(CFLAGS) $(LIBS)
$ - way to define variables in Makefile
$ @ is your goal, in your case it is a "test".
$ ^ - a list of all the prerequisites of the rule, including the names of the directories in which they were found
$ <- list of all dependencies
ref: https://www.gnu.org/software/make/manual/make.html#Automatic-Variables
Rahul Oct 26 '16 at 19:16 2016-10-26 19:16
source share