Makefile.in 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. # Makefile to build and install the SDL library
  2. top_builddir = .
  3. srcdir = @srcdir@
  4. objects = build
  5. gen = gen
  6. prefix = @prefix@
  7. exec_prefix = @exec_prefix@
  8. bindir = @bindir@
  9. libdir = @libdir@
  10. includedir = @includedir@
  11. datarootdir = @datarootdir@
  12. datadir = @datadir@
  13. auxdir = @ac_aux_dir@
  14. distpath = $(srcdir)/..
  15. distdir = SDL2-@SDL_VERSION@
  16. distfile = $(distdir).tar.gz
  17. @SET_MAKE@
  18. SHELL = @SHELL@
  19. CC = @CC@
  20. INCLUDE = @INCLUDE@
  21. CFLAGS = @BUILD_CFLAGS@
  22. EXTRA_CFLAGS = @EXTRA_CFLAGS@
  23. LDFLAGS = @BUILD_LDFLAGS@
  24. EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
  25. LIBTOOL = @LIBTOOL@
  26. INSTALL = @INSTALL@
  27. AR = @AR@
  28. RANLIB = @RANLIB@
  29. RC = @RC@
  30. LINKER = @LINKER@
  31. LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
  32. TARGET = libSDL2.la
  33. OBJECTS = @OBJECTS@
  34. GEN_HEADERS = @GEN_HEADERS@
  35. GEN_OBJECTS = @GEN_OBJECTS@
  36. VERSION_OBJECTS = @VERSION_OBJECTS@
  37. SDLMAIN_TARGET = libSDL2main.la
  38. SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
  39. SDLTEST_TARGET = libSDL2_test.la
  40. SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
  41. WAYLAND_SCANNER = @WAYLAND_SCANNER@
  42. WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
  43. INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
  44. SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
  45. GEN_DIST = SDL2.spec
  46. ifneq ($V,1)
  47. RUN_CMD_AR = @echo " AR " $@;
  48. RUN_CMD_CC = @echo " CC " $@;
  49. RUN_CMD_CXX = @echo " CXX " $@;
  50. RUN_CMD_LTLINK = @echo " LTLINK" $@;
  51. RUN_CMD_RANLIB = @echo " RANLIB" $@;
  52. RUN_CMD_RC = @echo " RC " $@;
  53. RUN_CMD_GEN = @echo " GEN " $@;
  54. LIBTOOL += --quiet
  55. endif
  56. HDRS = \
  57. SDL.h \
  58. SDL_assert.h \
  59. SDL_atomic.h \
  60. SDL_audio.h \
  61. SDL_bits.h \
  62. SDL_blendmode.h \
  63. SDL_clipboard.h \
  64. SDL_cpuinfo.h \
  65. SDL_egl.h \
  66. SDL_endian.h \
  67. SDL_error.h \
  68. SDL_events.h \
  69. SDL_filesystem.h \
  70. SDL_gamecontroller.h \
  71. SDL_gesture.h \
  72. SDL_haptic.h \
  73. SDL_hidapi.h \
  74. SDL_hints.h \
  75. SDL_joystick.h \
  76. SDL_keyboard.h \
  77. SDL_keycode.h \
  78. SDL_loadso.h \
  79. SDL_locale.h \
  80. SDL_log.h \
  81. SDL_main.h \
  82. SDL_messagebox.h \
  83. SDL_metal.h \
  84. SDL_misc.h \
  85. SDL_mouse.h \
  86. SDL_mutex.h \
  87. SDL_name.h \
  88. SDL_opengl.h \
  89. SDL_opengl_glext.h \
  90. SDL_opengles.h \
  91. SDL_opengles2_gl2ext.h \
  92. SDL_opengles2_gl2.h \
  93. SDL_opengles2_gl2platform.h \
  94. SDL_opengles2.h \
  95. SDL_opengles2_khrplatform.h \
  96. SDL_pixels.h \
  97. SDL_platform.h \
  98. SDL_power.h \
  99. SDL_quit.h \
  100. SDL_rect.h \
  101. SDL_render.h \
  102. SDL_rwops.h \
  103. SDL_scancode.h \
  104. SDL_sensor.h \
  105. SDL_shape.h \
  106. SDL_stdinc.h \
  107. SDL_surface.h \
  108. SDL_system.h \
  109. SDL_syswm.h \
  110. SDL_thread.h \
  111. SDL_timer.h \
  112. SDL_touch.h \
  113. SDL_types.h \
  114. SDL_version.h \
  115. SDL_video.h \
  116. SDL_vulkan.h \
  117. begin_code.h \
  118. close_code.h
  119. SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)
  120. LT_AGE = @LT_AGE@
  121. LT_CURRENT = @LT_CURRENT@
  122. LT_RELEASE = @LT_RELEASE@
  123. LT_REVISION = @LT_REVISION@
  124. LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
  125. all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
  126. $(srcdir)/configure: $(srcdir)/configure.ac
  127. @echo "Warning, configure is out of date, please re-run autogen.sh"
  128. Makefile: $(srcdir)/Makefile.in
  129. $(SHELL) config.status $@
  130. Makefile.in:;
  131. $(objects)/.created:
  132. $(SHELL) $(auxdir)/mkinstalldirs $(objects)
  133. touch $@
  134. update-revision:
  135. $(SHELL) $(auxdir)/updaterev.sh
  136. .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
  137. $(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS)
  138. $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
  139. $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
  140. $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
  141. $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
  142. $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
  143. install: all install-bin install-hdrs install-lib install-data
  144. install-bin:
  145. ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
  146. $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
  147. $(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
  148. endif
  149. install-hdrs: update-revision
  150. $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
  151. for file in $(HDRS) $(SDLTEST_HDRS); do \
  152. $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
  153. done
  154. $(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
  155. if test -f include/SDL_revision.h; then \
  156. $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
  157. else \
  158. $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
  159. fi
  160. install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
  161. $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
  162. $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
  163. $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
  164. $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
  165. install-data:
  166. $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
  167. $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
  168. $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
  169. $(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
  170. ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
  171. $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
  172. $(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
  173. $(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
  174. endif
  175. uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
  176. uninstall-bin:
  177. rm -f $(DESTDIR)$(bindir)/sdl2-config
  178. uninstall-hdrs:
  179. for file in $(HDRS) $(SDLTEST_HDRS); do \
  180. rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
  181. done
  182. rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
  183. rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
  184. -rmdir $(DESTDIR)$(includedir)/SDL2
  185. uninstall-lib:
  186. $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
  187. rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
  188. rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
  189. uninstall-data:
  190. rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
  191. rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
  192. rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
  193. rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
  194. clean:
  195. rm -rf $(objects)
  196. rm -rf $(gen)
  197. if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
  198. distclean: clean
  199. rm -f Makefile Makefile.rules sdl2-config
  200. rm -f config.status config.cache config.log libtool
  201. rm -rf $(srcdir)/autom4te*
  202. find $(srcdir) \( \
  203. -name '*~' -o \
  204. -name '*.bak' -o \
  205. -name '*.old' -o \
  206. -name '*.rej' -o \
  207. -name '*.orig' -o \
  208. -name '.#*' \) \
  209. -exec rm -f {} \;
  210. if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
  211. dist $(distfile):
  212. $(SHELL) $(auxdir)/mkinstalldirs $(distdir)
  213. (cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
  214. tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
  215. find $(distdir) \( \
  216. -name '*~' -o \
  217. -name '*.bak' -o \
  218. -name '*.old' -o \
  219. -name '*.rej' -o \
  220. -name '*.orig' -o \
  221. -name '.#*' \) \
  222. -exec rm -f {} \;
  223. if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
  224. (cd $(distdir); build-scripts/updaterev.sh)
  225. tar cvf - $(distdir) | gzip --best >$(distfile)
  226. rm -rf $(distdir)
  227. rpm: $(distfile)
  228. rpmbuild -ta $?