summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2011-03-16 10:56:00 (GMT)
committerTony Theodore <tonyt@logyst.com>2011-03-16 10:56:00 (GMT)
commit80decc9bfa3ce1877286cd996e60ad9dcd525c59 (patch)
tree53540dfb5eb9a7908b0f99e6e603f4691b3d0243
parent9d2dce19694c54b8e40757eaec10e2279100dec8 (diff)
downloadmxe-80decc9bfa3ce1877286cd996e60ad9dcd525c59.zip
mxe-80decc9bfa3ce1877286cd996e60ad9dcd525c59.tar.gz
mxe-80decc9bfa3ce1877286cd996e60ad9dcd525c59.tar.bz2
package portaudio: add test program, disable built-in tests, and remove superflous shared flag
-rw-r--r--src/portaudio-test.c21
-rw-r--r--src/portaudio.mk9
2 files changed, 28 insertions, 2 deletions
diff --git a/src/portaudio-test.c b/src/portaudio-test.c
new file mode 100644
index 0000000..16d6dd0
--- /dev/null
+++ b/src/portaudio-test.c
@@ -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;
+}
diff --git a/src/portaudio.mk b/src/portaudio.mk
index 89109ad..c3f7c16 100644
--- a/src/portaudio.mk
+++ b/src/portaudio.mk
@@ -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