sdl2-config.1 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. .TH sdl2-config 1 "2012-02-20" "SDL 2.0"
  2. .SH NAME
  3. sdl2-config \- script to get information about the installed version of SDL
  4. .SH SYNOPSIS
  5. .B sdl2-config
  6. [ --prefix=
  7. .IR DIR ]
  8. [ --exec-prefix=
  9. .IR DIR ]
  10. [ --version ] [ --libs | --library-libs | --plugin-libs ] [ --cflags ]
  11. .SH DESCRIPTION
  12. .B sdl2-config
  13. is a tool that is used to configure and determine the compiler and linker
  14. flags that should be used to compile and link programs, libraries, and
  15. plugins that use SDL. It is also used internally by the m4 macros that are
  16. included with SDL.
  17. .SH OPTIONS
  18. .TP
  19. .B --cflags
  20. Print the compiler flags that are necessary to compile a program or library
  21. that uses SDL.
  22. .TP
  23. .BI --exec-prefix= DIR
  24. If specified, use
  25. .I DIR
  26. instead of the installation exec prefix that SDL was build with when
  27. computing the output for the --cflags, --libs, --library-libs, and
  28. --plugin-libs options. This option must be specified before any of the
  29. --cflags, --libs, --library-libs, and --plugin-libs options.
  30. .TP
  31. .B --libs
  32. Print the linker flags that are necessary to link a program that uses SDL.
  33. .TP
  34. .B --static-libs
  35. Print the linker flags that are necessary to statically link a program that uses SDL.
  36. .TP
  37. .B --library-libs
  38. Print the linker flags that are necessary to link a library that uses SDL.
  39. (This excludes any static objects required for linking, since these must be
  40. linked only by executable programs.)
  41. .TP
  42. .B --plugin-libs
  43. Print the linker flags that are necessary to link an SDL-using object that
  44. is to be accessed via
  45. .IR dlopen (3).
  46. This may include static objects with PIC symbol information. This option
  47. should
  48. .B not
  49. be used for ordinary shared libraries or standalone applications.
  50. .TP
  51. .BI --prefix= DIR
  52. If specified, use PREFIX instead of the installation prefix that SDL was
  53. built with when computing the output for the --cflags, --libs,
  54. --library-libs, and --plugin-libs options. This option is also used for
  55. the exec prefix if --exec-prefix was not specified. This option must be
  56. specified before any of the --cflags, --libs, --library-libs, and
  57. --plugin-libs options.
  58. .TP
  59. .B --version
  60. Prints the currently installed version of SDL on standard output.
  61. .SH EXAMPLES
  62. .TP
  63. gcc -o main.o $(sdl2-config --cflags) main.c
  64. is how you might use
  65. .B sdl2-config
  66. to compile a C source file for an executable program.
  67. .TP
  68. gcc -o my_app $(sdl2-config --libs) main.o util.o
  69. is how you might use
  70. .B sdl2-config
  71. to link compiled objects into an executable program.
  72. .TP
  73. gcc -o libSDL_nifty-2.0.so.0.0.1 $(sdl --library-libs) read.o write.o munge.o
  74. is how you might use
  75. .B sdl2-config
  76. to link compiled objects into a shared library.
  77. .TP
  78. gcc -o libnifty_xmms.so $(sdl --plugin-libs) stream.o blit.o deinterlace.o
  79. is how you might use
  80. .B sdl2-config
  81. to link compiled objects into a plugin for use by another program.
  82. .SH AUTHOR
  83. The Simple DirectMedia Layer (SDL) library was written by Sam Lantinga.
  84. .PP
  85. This manual page was written by Branden Robinson, originally for Progeny
  86. Linux Systems, Inc., and the Debian Project.