Reputation: 1037
In this issue, CFLAGS set as path:
In this issue, CFLAGS set as compile option:
How to use LDFLAGS in makefile
I am confused.
Upvotes: 0
Views: 2587
Reputation: 16341
CFLAGS stands for compiler flags. LDFLAGS is for linker flags.
CFLAGS is used to pass flags to tell the compiler information on how to build a file(s).
In your link it is used to pass the path of header file so that the compiler knows where to find them. This is done with the -I
flag and is used like this: -I<path>
. There are many flags you can pass to the compiler. Some common ones are:
gcc -c fred.c -o fred.o
or gcc fred.c -o fred
-I.
includes the current directory. -Ianother/sub/dir
includes ./another/sub/dir. Note there is no space after the -I.Your best bet is to start with a really basic tutorial (don't worry it gets advance quite quickly):
Upvotes: 1