diff options
-rw-r--r-- | src/liboauth-test.c | 14 | ||||
-rw-r--r-- | src/liboauth.mk | 12 |
2 files changed, 21 insertions, 5 deletions
diff --git a/src/liboauth-test.c b/src/liboauth-test.c new file mode 100644 index 0000000..74e5974 --- /dev/null +++ b/src/liboauth-test.c @@ -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); +} diff --git a/src/liboauth.mk b/src/liboauth.mk index cbd50ed..b9967cf 100644 --- a/src/liboauth.mk +++ b/src/liboauth.mk @@ -23,10 +23,12 @@ define $(PKG)_BUILD --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 |