summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libdca-test.c23
-rw-r--r--src/libdca.mk5
2 files changed, 28 insertions, 0 deletions
diff --git a/src/libdca-test.c b/src/libdca-test.c
new file mode 100644
index 0000000..3028f34
--- /dev/null
+++ b/src/libdca-test.c
@@ -0,0 +1,23 @@
+/*
+ * This file is part of MXE.
+ * See index.html for further information.
+ */
+
+#include <stdint.h>
+#include <dca.h>
+
+int main(int argc, char *argv[])
+{
+ dca_state_t *state;
+
+ (void)argc;
+ (void)argv;
+
+ state = dca_init(0);
+ if (!state) {
+ return 1;
+ }
+
+ dca_free(state);
+ return 0;
+}
diff --git a/src/libdca.mk b/src/libdca.mk
index 5da8841..1a9174c 100644
--- a/src/libdca.mk
+++ b/src/libdca.mk
@@ -23,4 +23,9 @@ define $(PKG)_BUILD
--prefix='$(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=
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libdca.exe' \
+ `'$(TARGET)-pkg-config' libdca --cflags --libs`
endef