On 03/12/19 16:26, David Grayson wrote:
The INCPATH and LIBPATH variables you have defined are probably
redundant: gcc should automatically be searching those directories for
header files and libraries already. (You can run `gcc
-print-search-dirs | grep libraries` to see which directories are
searched for libraries. You can run `gcc -E -v test.c` to see where it
is searching for header files.)
YEAH, that worked. All are already in gcc search path.
My Makefile with INCPATH and LIBPATH come from SDL tutorial, but are
redundant and add complexity
$ gcc -E -v test.c 2>&1 > /dev/null | grep -A 10 "#include"
show well the includes directories
But the syntax to run pkg-config in your Makefile
would be:
$(shell pkg-config --cflags --libs sdl2)
work well. This is simple and solve the trouble.
I don't think you need to detect the operating system in your Makefile.
It's easy enough to do it with a few #ifdef directives in your source
file if you need to.
the code was already identical on all platforms, it use only portable
libraries
thank you very much,
--
Valerio
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users