sdl-config
is a tool that is used to configure and determine the compiler and linker
flags that should be used to compile and link progams, libraries, and
plugins that use SDL. It is also used internally by the m4 macros that are
included with SDL.
OPTIONS
--cflags
Print the compiler flags that are necessary to compile a program or library
that uses SDL.
--exec-prefix=DIR
If specified, use
DIR
instead of the installation exec prefix that SDL was build with when
computing the output for the --cflags, --libs, --library-libs, and
--plugin-libs options. This option must be specified before any of the
--cflags, --libs, --library-libs, and --plugin-libs options.
--libs
Print the linker flags that are necessary to link a program that uses SDL.
--library-libs
Print the linker flags that are necessary to link a library that uses SDL.
(This excludes any static objects required for linking, since these must be
linked only by executable programs.)
--plugin-libs
Print the linker flags that are necessary to link an SDL-using object that
is to be accessed via
dlopen(3).
This may include static objects with PIC symbol information. This option
should
not
be used for ordinary shared libraries or standalone applications.
--prefix=DIR
If specified, use PREFIX instead of the installation prefix that SDL was
built with when computing the output for the --cflags, --libs,
--library-libs, and --plugin-libs options. This option is also used for
the exec prefix if --exec-prefix was not specified. This option must be
specified before any of the --cflags, --libs, --library-libs, and
--plugin-libs options.
--version
Prints the currently installed version of SDL on standard output.
EXAMPLES
gcc -o main.o $(sdl-config --cflags) main.c
is how you might use
sdl-config
to compile a C source file for an executable program.
gcc -o my_app $(sdl-config --libs) main.o util.o
is how you might use
sdl-config
to link compiled objects into an executable program.