[sheepdog] [PATCH 2/2] create static library for user linking
Liu Yuan
namei.unix at gmail.com
Tue May 5 07:13:36 CEST 2015
From: Liu Yuan <liuyuan at cmss.chinamobile.com>
Some use case might want to statically linked to the sheepdog library.
Howto:
$ gcc your_prog.c -lpthread /path/to/libsheepdog.a
Note, 'make install' will install libsheepdog.a into /usr/lib/ along with
libsheepdog.so.
Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
---
lib/Makefile.am | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 975954c..dec81c7 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -16,6 +16,14 @@ libsheepdog_la_CPPFLAGS = $(AM_CPPFLAGS) -DNO_SHEEPDOG_LOGGER
pkginclude_HEADERS = ../include/sheepdog_proto.h shared/sheepdog.h \
../include/util.h ../include/list.h
+
+lib_LIBRARIES = libsheepdog.a
+
+libsheepdog_a_SOURCES = shared/sheep.c shared/vdi.c util.c
+
+libsheepdog_a_CPPFLAGS = $(AM_CPPFLAGS) -DNO_SHEEPDOG_LOGGER
+
+
libsd_a_DEPENDENCIES =
noinst_LIBRARIES = libisa.a libsd.a
--
1.9.1
More information about the sheepdog
mailing list