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