http://www.freedesktop.org/wiki/Software/pkg-config/
http://hg.libsdl.org/SDL/file/d6a8fa507a45/sdl2.pc.in
usage:
# pkg-config --cflags sdl2
-D_REENTRANT -I/usr/include/SDL2
# pkg-config --libs sdl2
-lSDL2 -lpthread
build log:
Code: Select all
$ premake4 gmake
Building configurations...
Running action 'gmake'...
Generating Makefile...
Generating build/TEngine.make...
Generating build/physfs.make...
Generating build/minilua.make...
Generating build/buildvm.make...
Generating build/luajit2.make...
Generating build/luasocket.make...
Generating build/fov.make...
Generating build/lpeg.make...
Generating build/luaprofiler.make...
Generating build/tcodimport.make...
Generating build/expatstatic.make...
Generating build/lxp.make...
Generating build/luamd5.make...
Generating build/luazlib.make...
Generating build/luabitop.make...
Generating build/te4-bzip.make...
Done.
$ config='release' make verbose=1
==== Building physfs (release) ====
physfsrwops.c
cc -MMD -MP -DGLEW_STATIC -DNDEBUG=1 -DPHYSFS_SUPPORTS_ZIP -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/opt/SDL-2.0/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm -O2 -fomit-frame-pointer -O2 -o "../obj/Release/physfs/physfsrwops.o" -MF ../obj/Release/physfs/physfsrwops.d -c "../src/physfs/physfsrwops.c"
In file included from ../src/physfs/physfsrwops.h:27:0,
from ../src/physfs/physfsrwops.c:24:
../src/tSDL.h:7:17: fatal error: SDL.h: No such file or directory
#include <SDL.h>
^
compilation terminated.
make[1]: *** [../obj/Release/physfs/physfsrwops.o] Error 1
make: *** [physfs] Error 2