Makefile.in 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. # Makefile to build the SDL tests
  2. srcdir = @srcdir@
  3. CC = @CC@
  4. EXE = @EXE@
  5. CFLAGS = @CFLAGS@ -g
  6. LIBS = @LIBS@
  7. TARGETS = \
  8. checkkeys$(EXE) \
  9. controllermap$(EXE) \
  10. loopwave$(EXE) \
  11. loopwavequeue$(EXE) \
  12. testatomic$(EXE) \
  13. testaudiocapture$(EXE) \
  14. testaudiohotplug$(EXE) \
  15. testaudioinfo$(EXE) \
  16. testautomation$(EXE) \
  17. testbounds$(EXE) \
  18. testcustomcursor$(EXE) \
  19. testdisplayinfo$(EXE) \
  20. testdraw2$(EXE) \
  21. testdrawchessboard$(EXE) \
  22. testdropfile$(EXE) \
  23. testerror$(EXE) \
  24. testevdev$(EXE) \
  25. testfile$(EXE) \
  26. testfilesystem$(EXE) \
  27. testgamecontroller$(EXE) \
  28. testgesture$(EXE) \
  29. testhaptic$(EXE) \
  30. testhittesting$(EXE) \
  31. testhotplug$(EXE) \
  32. testiconv$(EXE) \
  33. testime$(EXE) \
  34. testintersections$(EXE) \
  35. testjoystick$(EXE) \
  36. testkeys$(EXE) \
  37. testloadso$(EXE) \
  38. testlocale$(EXE) \
  39. testlock$(EXE) \
  40. testmessage$(EXE) \
  41. testmultiaudio$(EXE) \
  42. testnative$(EXE) \
  43. testoverlay2$(EXE) \
  44. testplatform$(EXE) \
  45. testpower$(EXE) \
  46. testqsort$(EXE) \
  47. testrelative$(EXE) \
  48. testrendercopyex$(EXE) \
  49. testrendertarget$(EXE) \
  50. testresample$(EXE) \
  51. testrumble$(EXE) \
  52. testscale$(EXE) \
  53. testsem$(EXE) \
  54. testsensor$(EXE) \
  55. testshape$(EXE) \
  56. testsprite2$(EXE) \
  57. testspriteminimal$(EXE) \
  58. teststreaming$(EXE) \
  59. testthread$(EXE) \
  60. testtimer$(EXE) \
  61. testurl$(EXE) \
  62. testver$(EXE) \
  63. testviewport$(EXE) \
  64. testvulkan$(EXE) \
  65. testwm2$(EXE) \
  66. testyuv$(EXE) \
  67. torturethread$(EXE) \
  68. @OPENGL_TARGETS@ += testgl2$(EXE) testshader$(EXE)
  69. @OPENGLES1_TARGETS@ += testgles$(EXE)
  70. @OPENGLES2_TARGETS@ += testgles2$(EXE)
  71. all: Makefile $(TARGETS) copydatafiles
  72. Makefile: $(srcdir)/Makefile.in
  73. $(SHELL) config.status $@
  74. checkkeys$(EXE): $(srcdir)/checkkeys.c
  75. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  76. loopwave$(EXE): $(srcdir)/loopwave.c
  77. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  78. loopwavequeue$(EXE): $(srcdir)/loopwavequeue.c
  79. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  80. testresample$(EXE): $(srcdir)/testresample.c
  81. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  82. testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c
  83. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  84. testautomation$(EXE): $(srcdir)/testautomation.c \
  85. $(srcdir)/testautomation_audio.c \
  86. $(srcdir)/testautomation_clipboard.c \
  87. $(srcdir)/testautomation_events.c \
  88. $(srcdir)/testautomation_keyboard.c \
  89. $(srcdir)/testautomation_main.c \
  90. $(srcdir)/testautomation_mouse.c \
  91. $(srcdir)/testautomation_pixels.c \
  92. $(srcdir)/testautomation_platform.c \
  93. $(srcdir)/testautomation_rect.c \
  94. $(srcdir)/testautomation_render.c \
  95. $(srcdir)/testautomation_rwops.c \
  96. $(srcdir)/testautomation_sdltest.c \
  97. $(srcdir)/testautomation_stdlib.c \
  98. $(srcdir)/testautomation_surface.c \
  99. $(srcdir)/testautomation_syswm.c \
  100. $(srcdir)/testautomation_timer.c \
  101. $(srcdir)/testautomation_video.c \
  102. $(srcdir)/testautomation_hints.c
  103. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  104. testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
  105. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  106. testaudiohotplug$(EXE): $(srcdir)/testaudiohotplug.c
  107. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  108. testaudiocapture$(EXE): $(srcdir)/testaudiocapture.c
  109. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  110. testatomic$(EXE): $(srcdir)/testatomic.c
  111. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  112. testintersections$(EXE): $(srcdir)/testintersections.c
  113. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  114. testrelative$(EXE): $(srcdir)/testrelative.c
  115. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  116. testhittesting$(EXE): $(srcdir)/testhittesting.c
  117. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  118. testdraw2$(EXE): $(srcdir)/testdraw2.c
  119. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  120. testdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c
  121. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  122. testdropfile$(EXE): $(srcdir)/testdropfile.c
  123. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  124. testerror$(EXE): $(srcdir)/testerror.c
  125. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  126. testevdev$(EXE): $(srcdir)/testevdev.c
  127. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  128. testfile$(EXE): $(srcdir)/testfile.c
  129. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  130. testgamecontroller$(EXE): $(srcdir)/testgamecontroller.c
  131. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  132. testgesture$(EXE): $(srcdir)/testgesture.c
  133. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
  134. testgl2$(EXE): $(srcdir)/testgl2.c
  135. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
  136. testgles$(EXE): $(srcdir)/testgles.c
  137. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
  138. testgles2$(EXE): $(srcdir)/testgles2.c
  139. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
  140. testgles2_sdf$(EXE): $(srcdir)/testgles2_sdf.c
  141. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
  142. testhaptic$(EXE): $(srcdir)/testhaptic.c
  143. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  144. testhotplug$(EXE): $(srcdir)/testhotplug.c
  145. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  146. testrumble$(EXE): $(srcdir)/testrumble.c
  147. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  148. testthread$(EXE): $(srcdir)/testthread.c
  149. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  150. testiconv$(EXE): $(srcdir)/testiconv.c
  151. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  152. testime$(EXE): $(srcdir)/testime.c
  153. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @SDL_TTF_LIB@
  154. testjoystick$(EXE): $(srcdir)/testjoystick.c
  155. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  156. testkeys$(EXE): $(srcdir)/testkeys.c
  157. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  158. testloadso$(EXE): $(srcdir)/testloadso.c
  159. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  160. testlock$(EXE): $(srcdir)/testlock.c
  161. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  162. ifeq (@ISMACOSX@,true)
  163. testnative$(EXE): $(srcdir)/testnative.c \
  164. $(srcdir)/testnativecocoa.m \
  165. $(srcdir)/testnativex11.c
  166. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@
  167. endif
  168. ifeq (@ISWINDOWS@,true)
  169. testnative$(EXE): $(srcdir)/testnative.c \
  170. $(srcdir)/testnativew32.c
  171. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  172. endif
  173. ifeq (@ISUNIX@,true)
  174. testnative$(EXE): $(srcdir)/testnative.c \
  175. $(srcdir)/testnativex11.c
  176. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
  177. endif
  178. #there's probably a better way of doing this
  179. ifeq (@ISMACOSX@,false)
  180. ifeq (@ISWINDOWS@,false)
  181. ifeq (@ISUNIX@,false)
  182. testnative$(EXE): ;
  183. endif
  184. endif
  185. endif
  186. testoverlay2$(EXE): $(srcdir)/testoverlay2.c $(srcdir)/testyuv_cvt.c
  187. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  188. testplatform$(EXE): $(srcdir)/testplatform.c
  189. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  190. testpower$(EXE): $(srcdir)/testpower.c
  191. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  192. testfilesystem$(EXE): $(srcdir)/testfilesystem.c
  193. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  194. testrendertarget$(EXE): $(srcdir)/testrendertarget.c
  195. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  196. testscale$(EXE): $(srcdir)/testscale.c
  197. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  198. testsem$(EXE): $(srcdir)/testsem.c
  199. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  200. testsensor$(EXE): $(srcdir)/testsensor.c
  201. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  202. testshader$(EXE): $(srcdir)/testshader.c
  203. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
  204. testshape$(EXE): $(srcdir)/testshape.c
  205. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  206. testsprite2$(EXE): $(srcdir)/testsprite2.c
  207. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  208. testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c
  209. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
  210. teststreaming$(EXE): $(srcdir)/teststreaming.c
  211. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
  212. testtimer$(EXE): $(srcdir)/testtimer.c
  213. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  214. testurl$(EXE): $(srcdir)/testurl.c
  215. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  216. testver$(EXE): $(srcdir)/testver.c
  217. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  218. testviewport$(EXE): $(srcdir)/testviewport.c
  219. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  220. testwm2$(EXE): $(srcdir)/testwm2.c
  221. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  222. testyuv$(EXE): $(srcdir)/testyuv.c $(srcdir)/testyuv_cvt.c
  223. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  224. torturethread$(EXE): $(srcdir)/torturethread.c
  225. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  226. testrendercopyex$(EXE): $(srcdir)/testrendercopyex.c
  227. $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
  228. testmessage$(EXE): $(srcdir)/testmessage.c
  229. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  230. testdisplayinfo$(EXE): $(srcdir)/testdisplayinfo.c
  231. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  232. testqsort$(EXE): $(srcdir)/testqsort.c
  233. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  234. testbounds$(EXE): $(srcdir)/testbounds.c
  235. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  236. testcustomcursor$(EXE): $(srcdir)/testcustomcursor.c
  237. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  238. controllermap$(EXE): $(srcdir)/controllermap.c
  239. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  240. testvulkan$(EXE): $(srcdir)/testvulkan.c
  241. $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
  242. testlocale$(EXE): $(srcdir)/testlocale.c
  243. $(CC) -o $@ $? $(CFLAGS) $(LIBS)
  244. clean:
  245. rm -f $(TARGETS)
  246. distclean: clean
  247. rm -f Makefile
  248. rm -f config.status config.cache config.log
  249. rm -rf $(srcdir)/autom4te*
  250. ifneq ($(srcdir), .)
  251. %.bmp: $(srcdir)/%.bmp
  252. cp $< $@
  253. %.wav: $(srcdir)/%.wav
  254. cp $< $@
  255. %.dat: $(srcdir)/%.dat
  256. cp $< $@
  257. endif
  258. copydatafiles: copybmpfiles copywavfiles copydatfiles
  259. .PHONY : copydatafiles
  260. copybmpfiles: $(foreach bmp,$(wildcard $(srcdir)/*.bmp),$(notdir $(bmp)))
  261. .PHONY : copybmpfiles
  262. copywavfiles: $(foreach wav,$(wildcard $(srcdir)/*.wav),$(notdir $(wav)))
  263. .PHONY : copywavfiles
  264. copydatfiles: $(foreach dat,$(wildcard $(srcdir)/*.dat),$(notdir $(dat)))
  265. .PHONY : copydatfiles