# HG changeset patch # User Tony Theodore # Date 1300272960 -39600 # Node ID 7fb51f6d31afd2ceea003fa7f4d7fcf6795166f7 # Parent 85199de32430914368bcb0f1e8442999f6fd0461 package portaudio: add test program, disable built-in tests, and remove superflous shared flag diff -r 85199de32430 -r 7fb51f6d31af src/portaudio-test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/portaudio-test.c Wed Mar 16 21:56:00 2011 +1100 @@ -0,0 +1,21 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include +#include + +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; +} diff -r 85199de32430 -r 7fb51f6d31af src/portaudio.mk --- a/src/portaudio.mk Mon Mar 14 09:38:38 2011 +0100 +++ b/src/portaudio.mk Wed Mar 16 21:56:00 2011 +1100 @@ -27,6 +27,11 @@ --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