[sheepdog] [PATCH v2 8/8] shared lib: kick it run

Liu Yuan namei.unix at gmail.com
Wed Apr 8 04:19:39 CEST 2015


From: Liu Yuan <liuyuan at cmss.chinamobile.com>

Add the final makefile stuff

Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
---
 configure.ac    |  4 +++-
 lib/Makefile.am | 14 ++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 3635dc8..cae4771 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,8 @@ AC_CANONICAL_HOST
 
 AC_LANG([C])
 
+LT_INIT
+
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
 
 if make --help 2>&1 | grep -q no-print-directory; then
@@ -77,11 +79,11 @@ if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
 fi
 
 AC_PROG_CC
+AC_PROG_LIBTOOL
 AM_PROG_AS
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
-AC_PROG_RANLIB
 AC_CHECK_PROGS([GROFF], [groff])
 
 AM_MISSING_PROG(AUTOM4TE, autom4te, $missing_dir)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 697c5ba..ecbdac8 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,6 +2,20 @@ MAINTAINERCLEANFILES    = Makefile.in
 
 AM_CPPFLAGS                = -I$(top_builddir)/include -I$(top_srcdir)/include
 
+lib_LTLIBRARIES         = libsheepdog.la
+
+libsheepdog_la_DEPENDENCIES =
+
+libsheepdog_la_SOURCES  = shared/sheep.c shared/vdi.c util.c
+
+libsheepdog_la_LDFLAGS  = -avoid-version -shared -module -export-dynamic \
+			  -export-symbols-regex 'sd_'
+# Workaround for Objects ‘created with both libtool and without’ problem
+libsheepdog_la_CPPFLAGS = $(AM_CPPFLAGS) -DNO_SHEEPDOG_LOGGER
+
+pkginclude_HEADERS      = ../include/sheepdog_proto.h shared/sheepdog.h \
+			  ../include/util.h ../include/list.h
+
 libsheepdog_a_DEPENDENCIES =
 
 noinst_LIBRARIES	= libisa.a libsheepdog.a
-- 
1.9.1




More information about the sheepdog mailing list