Makefile.in 6.8 KB

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