tags:

views:

26

answers:

1

Please explain $@ $^ $ in the makefile below

LIBS  = -lkernel32 -luser32 -lgdi32 -lopengl32
CFLAGS = -Wall

# (This should be the actual list of C files)
SRC=$(wildcard '*.c')

test: $(SRC)
    gcc -o $@ $^ $(CFLAGS) $(LIBS)
A: 

This is what these two symbols mean: - $@ is the target i.e. test - $^ expands the wild card list as specified in SRC=$(wildcard '*.c')

tommieb75