Home > Back-end >  What does the "@" symbol mean in a makefile when after an -I flag such as -I @mathinc@?
What does the "@" symbol mean in a makefile when after an -I flag such as -I @mathinc@?

Time:10-27

I'm trying to understand the following line in a Makefile.in file:

CXXFLAGS = -O3 -DNDEBUG -std=c 11 -Wno-deprecated-declarations -Isrc -I @mathinc@

I know the -I flag adds a directory to the list of places where the compiler will search for included files but what does @mathinc@ mean?

CodePudding user response:

Note that the file is called Makefile.in -- this signifies that it is input to another file (or transformation).

In short, configure will run and determine, say, where the relevant include files are for @mathinc -- likely some math headers. After you run configure it will produce Makefile (no trailing .in) based on what it finds. Do inspect that file.

configure scripts are created in a system called autoconf which, like all build systems, has its fans and its haters. There are some decent tutorials as for example this one.

  • Related