diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2010-05-18 17:29:24 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2010-05-18 17:29:24 +0200 |
commit | 9d6b4ab6fee3d65f3a11a5f19c410e5abe4ba322 (patch) | |
tree | 77c5af1b4bf80c0eea8a23844cfb1872d211aba5 /tests | |
parent | 78420e31a260353b1c34ca019c0c8cabd292cca6 (diff) | |
download | wolfbones-9d6b4ab6fee3d65f3a11a5f19c410e5abe4ba322.tar.gz wolfbones-9d6b4ab6fee3d65f3a11a5f19c410e5abe4ba322.tar.bz2 |
added building of the test library
Diffstat (limited to 'tests')
-rw-r--r-- | tests/library/GNUmakefile | 8 | ||||
-rw-r--r-- | tests/library/test_loader.c | 4 | ||||
-rw-r--r-- | tests/library/testlib.c | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/tests/library/GNUmakefile b/tests/library/GNUmakefile index 18ae8aa..18e69f7 100644 --- a/tests/library/GNUmakefile +++ b/tests/library/GNUmakefile @@ -9,6 +9,14 @@ INCLUDE_LIBS = \ TEST_BINS = \ test_loader$(EXE) +DYNAMIC_LIB = testlib.so +DYNAMIC_LIB_MAJOR = 0 +DYNAMIC_LIB_MINOR = 0 +DYNAMIC_LIB_PATCH = 0 + +OBJS = \ + testlib.o + -include $(TOPDIR)/makefiles/gmake/sub.mk local_all: diff --git a/tests/library/test_loader.c b/tests/library/test_loader.c index 46d2ad0..6088c92 100644 --- a/tests/library/test_loader.c +++ b/tests/library/test_loader.c @@ -25,10 +25,10 @@ int main( void ) { wolf_error_t error; char errbuf[512]; - library = wolf_library_load( "testlib.so", &error ); + library = wolf_library_load( "./testlib.so.0.0.0", &error ); if( error != WOLF_OK ) { fprintf( stderr, "Error %d loading the library: %s\n", - error, wolf_libary_errmsg( error, library, errbuf, 512 ) ); + error, wolf_library_errmsg( error, library, errbuf, 512 ) ); return EXIT_FAILURE; } diff --git a/tests/library/testlib.c b/tests/library/testlib.c index ee97b87..f8e457a 100644 --- a/tests/library/testlib.c +++ b/tests/library/testlib.c @@ -1,3 +1,5 @@ +int multiply_by_two( int a ); + int multiply_by_two( int a ) { return a * 2; } |