test/Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sun, 07 Jul 2019 09:10:56 -0700
changeset 12928 3c4a4b1077cd
parent 12731 23fc3ac93cf5
permissions -rw-r--r--
Fixed bug 4710 - audio/alsa: avoid configuring hardware parameters with only a single period

Anthony Pesch

The previous code first configured the period size using snd_pcm_hw_par-
ams_set_period_size_near. Then, it further narrowed the configuration
space by calling snd_pcm_hw_params_set_buffer_size_near using a buffer
size of 2 times the _requested_ period size in order to try and get a
configuration with only 2 periods. If the configured period size was
larger than the requested size, the second call could inadvertently
narrow the configuration space to contain only a single period.

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