🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

262 lines
8.0 KiB

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