summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2009-11-15 20:26:16 +0000
committerStef Walter <stef@memberwebs.com>2009-11-15 20:30:45 +0000
commit363a869b000ee1c9337bc0086108f6a5960da326 (patch)
tree04b9d0575a5bab921699d76a8d1c9b2640d779a8 /src/Makefile.am
parent6c610fd305c965e7ab83d3ffc0ab0e94733f01e6 (diff)
Allow use of p11-tests as a library.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d1c5d8a..e86bd04 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,9 +1,11 @@
AM_CFLAGS = -I$(top_srcdir)
-bin_PROGRAMS = p11-tests
+include_HEADERS = \
+ p11-tests.h
-p11_tests_LDADD = -ldl -lpthread
-p11_tests_SOURCES = \
+lib_LTLIBRARIES = libp11-tests.la
+
+libp11_tests_la_SOURCES = \
certificate.c \
check.c \
config.c \
@@ -13,9 +15,20 @@ p11_tests_SOURCES = \
module.c \
msg.c \
object.c \
- p11-tests.c \
+ p11-tests-lib.c \
+ p11-tests-lib.h \
rsa.c \
session.c \
slot.c \
test-data.c
+libp11_tests_la_LDFLAGS = \
+ -no-undefined -export-symbols-regex 'p11_tests_'
+
+bin_PROGRAMS = p11-tests
+p11_tests_LDADD = \
+ -ldl -lpthread \
+ libp11-tests.la
+
+p11_tests_SOURCES = \
+ p11-tests.c