PDA

View Full Version : What is the $@ symbol for in a makefile?


jf22901
Aug28-11, 08:32 AM
Hi.

Can anyone please tell me what purpose $@ serves in the dependency line below? I've tried looking online, and in the make and ifort documentation, but can't find anything. :confused:


$(EXECUTABLE) : $(OBJECTS)
ifort $(LOADFLAGS) -o $@ $(OBJECTS) $(LIBRARIES)


where:

OBJECTS = list of object files
LOADFLAGS = -O3 -align dcommons
LIBRARIES = -L$(LIBRARY) -lfft -lnetcdf

Many thanks. :smile:

Filip Larsen
Aug28-11, 09:31 AM
Perhaps you can find what you seek in the GNU make manual:
http://www.gnu.org/software/make/manual/make.html#Automatic-Variables

jf22901
Sep1-11, 09:37 AM
Perhaps you can find what you seek in the GNU make manual:
http://www.gnu.org/software/make/manual/make.html#Automatic-Variables

Brilliant, thanks a lot. If only I'd found that manual sooner!!!