1 # Makefile to build the SDL tests
16 testaudiocapture$(EXE) \
17 testaudiohotplug$(EXE) \
19 testautomation$(EXE) \
21 testcustomcursor$(EXE) \
22 testdisplayinfo$(EXE) \
24 testdrawchessboard$(EXE) \
29 testfilesystem$(EXE) \
30 testgamecontroller$(EXE) \
33 testhittesting$(EXE) \
37 testintersections$(EXE) \
44 testmultiaudio$(EXE) \
51 testrendercopyex$(EXE) \
52 testrendertarget$(EXE) \
60 testspriteminimal$(EXE) \
73 @OPENGL_TARGETS@ += testgl2$(EXE) testshader$(EXE)
74 @OPENGLES1_TARGETS@ += testgles$(EXE)
75 @OPENGLES2_TARGETS@ += testgles2$(EXE)
78 all: Makefile $(TARGETS) copydatafiles
80 Makefile: $(srcdir)/Makefile.in
81 $(SHELL) config.status $@
83 checkkeys$(EXE): $(srcdir)/checkkeys.c
84 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
86 loopwave$(EXE): $(srcdir)/loopwave.c
87 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
89 loopwavequeue$(EXE): $(srcdir)/loopwavequeue.c
90 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
92 testresample$(EXE): $(srcdir)/testresample.c
93 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
95 testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c
96 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
98 testautomation$(EXE): $(srcdir)/testautomation.c \
99 $(srcdir)/testautomation_audio.c \
100 $(srcdir)/testautomation_clipboard.c \
101 $(srcdir)/testautomation_events.c \
102 $(srcdir)/testautomation_keyboard.c \
103 $(srcdir)/testautomation_main.c \
104 $(srcdir)/testautomation_mouse.c \
105 $(srcdir)/testautomation_pixels.c \
106 $(srcdir)/testautomation_platform.c \
107 $(srcdir)/testautomation_rect.c \
108 $(srcdir)/testautomation_render.c \
109 $(srcdir)/testautomation_rwops.c \
110 $(srcdir)/testautomation_sdltest.c \
111 $(srcdir)/testautomation_stdlib.c \
112 $(srcdir)/testautomation_surface.c \
113 $(srcdir)/testautomation_syswm.c \
114 $(srcdir)/testautomation_timer.c \
115 $(srcdir)/testautomation_video.c \
116 $(srcdir)/testautomation_hints.c
117 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
119 testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
120 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
122 testaudiohotplug$(EXE): $(srcdir)/testaudiohotplug.c
123 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
125 testaudiocapture$(EXE): $(srcdir)/testaudiocapture.c
126 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
128 testatomic$(EXE): $(srcdir)/testatomic.c
129 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
131 testintersections$(EXE): $(srcdir)/testintersections.c
132 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
134 testrelative$(EXE): $(srcdir)/testrelative.c
135 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
137 testhittesting$(EXE): $(srcdir)/testhittesting.c
138 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
140 testdraw2$(EXE): $(srcdir)/testdraw2.c
141 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
143 testdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c
144 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
146 testdropfile$(EXE): $(srcdir)/testdropfile.c
147 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
149 testerror$(EXE): $(srcdir)/testerror.c
150 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
152 testevdev$(EXE): $(srcdir)/testevdev.c
153 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
155 testfile$(EXE): $(srcdir)/testfile.c
156 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
158 testgamecontroller$(EXE): $(srcdir)/testgamecontroller.c
159 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
161 testgesture$(EXE): $(srcdir)/testgesture.c
162 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
164 testgl2$(EXE): $(srcdir)/testgl2.c
165 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
167 testgles$(EXE): $(srcdir)/testgles.c
168 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
170 testgles2$(EXE): $(srcdir)/testgles2.c
171 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
173 testhaptic$(EXE): $(srcdir)/testhaptic.c
174 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
175 testhotplug$(EXE): $(srcdir)/testhotplug.c
176 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
177 testrumble$(EXE): $(srcdir)/testrumble.c
178 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
180 testthread$(EXE): $(srcdir)/testthread.c
181 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
183 testiconv$(EXE): $(srcdir)/testiconv.c
184 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
186 testime$(EXE): $(srcdir)/testime.c
187 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @SDL_TTF_LIB@
189 testjoystick$(EXE): $(srcdir)/testjoystick.c
190 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
192 testkeys$(EXE): $(srcdir)/testkeys.c
193 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
195 testloadso$(EXE): $(srcdir)/testloadso.c
196 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
198 testlock$(EXE): $(srcdir)/testlock.c
199 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
201 ifeq (@ISMACOSX@,true)
202 testnative$(EXE): $(srcdir)/testnative.c \
203 $(srcdir)/testnativecocoa.m \
204 $(srcdir)/testnativex11.c
205 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@
208 ifeq (@ISWINDOWS@,true)
209 testnative$(EXE): $(srcdir)/testnative.c \
210 $(srcdir)/testnativew32.c
211 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
215 testnative$(EXE): $(srcdir)/testnative.c \
216 $(srcdir)/testnativex11.c
217 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
220 #there's probably a better way of doing this
221 ifeq (@ISMACOSX@,false)
222 ifeq (@ISWINDOWS@,false)
223 ifeq (@ISUNIX@,false)
229 testoverlay2$(EXE): $(srcdir)/testoverlay2.c $(srcdir)/testyuv_cvt.c
230 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
232 testplatform$(EXE): $(srcdir)/testplatform.c
233 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
235 testpower$(EXE): $(srcdir)/testpower.c
236 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
238 testfilesystem$(EXE): $(srcdir)/testfilesystem.c
239 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
241 testrendertarget$(EXE): $(srcdir)/testrendertarget.c
242 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
244 testscale$(EXE): $(srcdir)/testscale.c
245 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
247 testsem$(EXE): $(srcdir)/testsem.c
248 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
250 testsensor$(EXE): $(srcdir)/testsensor.c
251 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
253 testshader$(EXE): $(srcdir)/testshader.c
254 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
256 testshape$(EXE): $(srcdir)/testshape.c
257 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
259 testsprite2$(EXE): $(srcdir)/testsprite2.c
260 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
262 testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c
263 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
265 teststreaming$(EXE): $(srcdir)/teststreaming.c
266 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
268 testtimer$(EXE): $(srcdir)/testtimer.c
269 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
271 testurl$(EXE): $(srcdir)/testurl.c
272 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
274 testver$(EXE): $(srcdir)/testver.c
275 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
277 testviewport$(EXE): $(srcdir)/testviewport.c
278 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
280 testwm2$(EXE): $(srcdir)/testwm2.c
281 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
283 testyuv$(EXE): $(srcdir)/testyuv.c $(srcdir)/testyuv_cvt.c
284 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
286 torturethread$(EXE): $(srcdir)/torturethread.c
287 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
289 testrendercopyex$(EXE): $(srcdir)/testrendercopyex.c
290 $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
292 testmessage$(EXE): $(srcdir)/testmessage.c
293 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
295 testdisplayinfo$(EXE): $(srcdir)/testdisplayinfo.c
296 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
298 testqsort$(EXE): $(srcdir)/testqsort.c
299 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
301 testbounds$(EXE): $(srcdir)/testbounds.c
302 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
304 testcustomcursor$(EXE): $(srcdir)/testcustomcursor.c
305 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
307 controllermap$(EXE): $(srcdir)/controllermap.c
308 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
310 testvulkan$(EXE): $(srcdir)/testvulkan.c
311 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
313 testlocale$(EXE): $(srcdir)/testlocale.c
314 $(CC) -o $@ $? $(CFLAGS) $(LIBS)
323 rm -f config.status config.cache config.log
324 rm -rf $(srcdir)/autom4te*
327 %.bmp: $(srcdir)/%.bmp
330 %.wav: $(srcdir)/%.wav
333 %.dat: $(srcdir)/%.dat
337 copydatafiles: copybmpfiles copywavfiles copydatfiles
338 .PHONY : copydatafiles
340 copybmpfiles: $(foreach bmp,$(wildcard $(srcdir)/*.bmp),$(notdir $(bmp)))
341 .PHONY : copybmpfiles
343 copywavfiles: $(foreach wav,$(wildcard $(srcdir)/*.wav),$(notdir $(wav)))
344 .PHONY : copywavfiles
346 copydatfiles: $(foreach dat,$(wildcard $(srcdir)/*.dat),$(notdir $(dat)))
347 .PHONY : copydatfiles