🛠️🐜 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.

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