changeset 1527:5717df60d379

package liboauth: add test program and remove check target and associated variables
author Tony Theodore <tonyt@logyst.com>
date Mon, 03 Jan 2011 16:34:14 +1100
parents 7e8f36740d45
children 76279a31ddf6
files src/liboauth-test.c src/liboauth.mk
diffstat 2 files changed, 21 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/liboauth-test.c	Mon Jan 03 16:34:14 2011 +1100
@@ -0,0 +1,14 @@
+/* This file is part of mingw-cross-env.       */
+/* See doc/index.html for further information. */
+
+#include <stdio.h>
+#include <oauth.h>
+
+int main (int argc, char *argv[])
+{
+    (void)argc;
+    (void)argv;
+
+    printf("Nonce: %s", oauth_gen_nonce());
+    return (0);
+}
--- a/src/liboauth.mk	Mon Jan 03 14:03:36 2011 +1100
+++ b/src/liboauth.mk	Mon Jan 03 16:34:14 2011 +1100
@@ -23,10 +23,12 @@
        --host='$(TARGET)' \
        --prefix='$(PREFIX)/$(TARGET)' \
        --disable-shared \
-       --disable-curl \
-       HASH_LIBS="`$(TARGET)-pkg-config --libs libcrypto`" \
-       HASH_CFLAGS="`$(TARGET)-pkg-config --cflags libcrypto`"
+       --disable-curl
    $(MAKE) -C '$(1)' -j '$(JOBS)'
-   $(MAKE) -C '$(1)' -j '$(JOBS)' check
-   $(MAKE) -C '$(1)' -j '$(JOBS)' install
+   $(MAKE) -C '$(1)' -j 1 install
+   
+   '$(TARGET)-gcc' \
+       -W -Wall -Werror -ansi -pedantic \
+       '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-liboauth.exe' \
+       `'$(TARGET)-pkg-config' oauth --cflags --libs`
 endef