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

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