[sheepdog] [PATCH v1 2/3] sheep: modify Makefile to build isa-l into util

Robin Dong robin.k.dong at gmail.com
Fri Sep 19 08:01:14 CEST 2014


From: Robin Dong <sanbai at taobao.com>

Add build script in util/Makefile to compose isa-l into sheepdog binary.

Signed-off-by: Robin Dong <sanbai at taobao.com>
---
 lib/Makefile.am | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index 5204879..a43076e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,11 +2,31 @@ MAINTAINERCLEANFILES    = Makefile.in
 
 AM_CPPFLAGS                = -I$(top_builddir)/include -I$(top_srcdir)/include
 
-noinst_LIBRARIES	= libsheepdog.a
+libsheepdog_a_DEPENDENCIES =
+
+noinst_LIBRARIES	= libisa.a libsheepdog.a
+
+libisa_a_SOURCES	= $(shell find isa-l/ -type f -regex ".*\.\(c\|h\|asm\)") \
+			  isa-l/erasure_code/Makefile \
+			  isa-l/Makefile \
+			  isa-l/Makefile.nmake \
+			  isa-l/make.inc
 
 libsheepdog_a_SOURCES	= event.c logger.c net.c util.c rbtree.c strbuf.c \
 			  sha1.c option.c work.c sockfd_cache.c fec.c sd_inode.c
 
+libsheepdog_a_LIBADD	= isa-l/bin/ec_base.o \
+			  isa-l/bin/ec_highlevel_func.o \
+			  isa-l/bin/ec_multibinary.o \
+			  isa-l/bin/gf_2vect_dot_prod_sse.o \
+		  	  isa-l/bin/gf_3vect_dot_prod_sse.o \
+		  	  isa-l/bin/gf_4vect_dot_prod_sse.o \
+			  isa-l/bin/gf_5vect_dot_prod_sse.o \
+			  isa-l/bin/gf_6vect_dot_prod_sse.o \
+			  isa-l/bin/gf_vect_dot_prod_sse.o \
+			  isa-l/bin/gf_vect_mul_avx.o \
+			  isa-l/bin/gf_vect_mul_sse.o
+
 if BUILD_SHA1_HW
 libsheepdog_a_SOURCES	+= sha1_ssse3.S
 endif
@@ -21,3 +41,9 @@ check-syntax:
 
 check-style:
 	@$(CHECK_STYLE) $(libsheepdog_a_SOURCES)
+
+libisa.a:
+	cd isa-l/ && $(MAKE) && cd ..
+
+clean:
+	cd isa-l/ && $(MAKE) clean && cd ..
-- 
1.9.1




More information about the sheepdog mailing list