From 5f38c7ddcb0e1d0b703d121b54d960d45886e006 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Mon, 5 Oct 2009 13:47:22 +0200 Subject: Added it0008-executable-dep-lib-shared test --- .../lib-shared/pom.xml | 74 ++++++++++++++++++++++ .../lib-shared/src/main/c/HelloWorldLib.c | 7 ++ .../lib-shared/src/main/include/HelloWorldLib.h | 9 +++ .../lib-shared/src/test/c/HelloWorldTest.c | 9 +++ 4 files changed, 99 insertions(+) create mode 100644 src/it/it0008-executable-dep-lib-shared/lib-shared/pom.xml create mode 100644 src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/c/HelloWorldLib.c create mode 100644 src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/include/HelloWorldLib.h create mode 100644 src/it/it0008-executable-dep-lib-shared/lib-shared/src/test/c/HelloWorldTest.c (limited to 'src/it/it0008-executable-dep-lib-shared/lib-shared') diff --git a/src/it/it0008-executable-dep-lib-shared/lib-shared/pom.xml b/src/it/it0008-executable-dep-lib-shared/lib-shared/pom.xml new file mode 100644 index 0000000..4c46296 --- /dev/null +++ b/src/it/it0008-executable-dep-lib-shared/lib-shared/pom.xml @@ -0,0 +1,74 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.nar + it0008-pom + 1.0-SNAPSHOT + + + it0008-lib-shared + nar + + Maven NAR Shared Library + 1.0-SNAPSHOT + + Simple shared library and test file + + http://maven.apache.org/ + + + + install + + + maven-nar-plugin + true + + + + shared + + + + + HelloWorldTest + shared + + + + + + maven-surefire-plugin + + true + + + + + diff --git a/src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/c/HelloWorldLib.c b/src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/c/HelloWorldLib.c new file mode 100644 index 0000000..9f65143 --- /dev/null +++ b/src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/c/HelloWorldLib.c @@ -0,0 +1,7 @@ +#include +#include "HelloWorldLib.h" + +char* HelloWorldLib_sayHello() { + return "Hello NAR LIB World!"; +} + diff --git a/src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/include/HelloWorldLib.h b/src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/include/HelloWorldLib.h new file mode 100644 index 0000000..e801bec --- /dev/null +++ b/src/it/it0008-executable-dep-lib-shared/lib-shared/src/main/include/HelloWorldLib.h @@ -0,0 +1,9 @@ +#ifndef HelloWorldLib_H +#define HelloWorldLib_H + +#ifdef WIN32 +__declspec(dllexport) +#endif +extern char* HelloWorldLib_sayHello(); + +#endif diff --git a/src/it/it0008-executable-dep-lib-shared/lib-shared/src/test/c/HelloWorldTest.c b/src/it/it0008-executable-dep-lib-shared/lib-shared/src/test/c/HelloWorldTest.c new file mode 100644 index 0000000..4aa35d8 --- /dev/null +++ b/src/it/it0008-executable-dep-lib-shared/lib-shared/src/test/c/HelloWorldTest.c @@ -0,0 +1,9 @@ +#include +#include "HelloWorldLib.h" + +int main(int argc, char *argv[]) { + printf("%s\n", HelloWorldLib_sayHello()); + return 0; +} + + -- cgit v1.2.3