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