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