package portaudio: add test program, disable built-in tests, and remove superflous shared flag

This commit is contained in:
Tony Theodore 2011-03-16 21:56:00 +11:00
parent 9d2dce1969
commit 80decc9bfa
2 changed files with 28 additions and 2 deletions

21
src/portaudio-test.c Normal file
View File

@ -0,0 +1,21 @@
/* This file is part of mingw-cross-env. */
/* See doc/index.html for further information. */
#include <portaudio.h>
#include <stdio.h>
int main()
{
int i;
const PaDeviceInfo *device_info;
Pa_Initialize();
printf("Version: %s\n", Pa_GetVersionText());
for( i = 0; i < Pa_GetDeviceCount(); i++ )
{
device_info = Pa_GetDeviceInfo(i);
printf("Device %d: %s %s\n", i, device_info->name, Pa_GetHostApiInfo(device_info->hostApi)->name);
}
Pa_Terminate();
return 0;
}

View File

@ -27,6 +27,11 @@ define $(PKG)_BUILD
--with-host_os=mingw \
--with-winapi=directx \
--with-dxdir=$(PREFIX)/$(TARGET)
$(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)' -j '$(JOBS)' SHARED_FLAGS= TESTS=
$(MAKE) -C '$(1)' -j 1 install
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-portaudio.exe' \
`'$(TARGET)-pkg-config' portaudio-2.0 --cflags --libs`
endef