From 9d6b4ab6fee3d65f3a11a5f19c410e5abe4ba322 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 18 May 2010 17:29:24 +0200 Subject: added building of the test library --- tests/library/GNUmakefile | 8 ++++++++ tests/library/test_loader.c | 4 ++-- tests/library/testlib.c | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'tests') 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; } -- cgit v1.2.3-54-g00ecf