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

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