Commit 6b6e770efbc3203a9376381865a4214604428804

Authored by Loic Dachary
1 parent 414c96ef

gf-complete: add as a submodule

Make gf-complete a git submodule of jerasure to simplify installation
and distribution. The build instructions become:

   git clone http://jerasure.org/jerasure/jerasure
   autogen.sh
   make check

which also includes make check for gf-complete.

Signed-off-by: Loic Dachary <loic@dachary.org>
.gitmodules 0 โ†’ 100644
... ... @@ -0,0 +1,3 @@
  1 +[submodule "gf-complete"]
  2 + path = gf-complete
  3 + url = http://jerasure.org/jerasure/gf-complete.git
... ...
Examples/Makefile.am
1 1 # Jerasure AM file
2 2  
3   -AM_CPPFLAGS = -I$(top_srcdir)/include
  3 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/gf-complete/include
4 4 AM_CFLAGS = $(SIMD_FLAGS)
5 5  
6 6 bin_PROGRAMS = jerasure_01 \
... ... @@ -27,6 +27,8 @@ bin_PROGRAMS = jerasure_01 \
27 27  
28 28 check_PROGRAMS =
29 29  
  30 +export GF_COMPLETE_DIR = $(top_builddir)/gf-complete/tools
  31 +
30 32 TESTS=test_all_gfs.sh encode_decode.sh $(check_PROGRAMS)
31 33  
32 34 dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh
... ... @@ -61,7 +63,7 @@ liberation_01_SOURCES = liberation_01.c
61 63 decoder_SOURCES = decoder.c
62 64 encoder_SOURCES = encoder.c
63 65  
64   -LDADD = ../src/libJerasure.la
  66 +LDADD = $(top_builddir)/src/libJerasure.la $(top_builddir)/gf-complete/src/libgf_complete.la
65 67 decoder_LDADD = $(LDADD) ../src/libtiming.a
66 68 encoder_LDADD = $(LDADD) ../src/libtiming.a
67 69 reed_sol_time_gf_LDADD = $(LDADD) ../src/libtiming.a
... ...
Makefile.am
1 1 # Jerasure Automake file
2 2  
3   -SUBDIRS = src Examples
  3 +SUBDIRS = gf-complete src Examples
4 4  
5 5 EXTRA_DIST = Manual.pdf PERF.txt
... ...
README
... ... @@ -19,8 +19,6 @@ See the file Manual.pdf for the programmer&#39;s manual and tutorial.
19 19  
20 20 See http://jerasure.org/jerasure/gf-complete for GF-Complete.
21 21  
22   -NOTE: You must have GF-Complete installed (or compiled) in order to use Jerasure 2.0.
23   -
24 22 There are two directories of source code:
25 23  
26 24 The src directory contains the jerasure code.
... ... @@ -36,10 +34,10 @@ http://www.kaymgee.com/Kevin_Greenan/Software_files/jerasure.tar.gz
36 34 Installing if you are allowed to install GF-Complete on your machine:
37 35 (You can skip the autoreconf step if you're using a tarball distribution.)
38 36  
39   -1.) Install GF-Complete
40   -2.) autoreconf --force --install (*skip* if you are building from tarball)
  37 +1.) git clone http://jerasure.org/jerasure/jerasure
  38 +2.) autogen.sh
41 39 3.) ./configure
42   -4.) make
  40 +4.) make -j4 check
43 41 5.) sudo make install
44 42  
45 43 This will install the library into your machine's lib directory,
... ... @@ -50,46 +48,18 @@ The configuration process assumes shared objects are searched for in
50 48 search path at configuration time. For example:
51 49 ./configure LD_LIBRARY_PATH=/usr/local/lib
52 50  
53   -------------------------------------------------------------
54   -
55   -Installing if you can compile GF-Complete, but you cannot install it:
56   -
57   -1.) Install GF-Complete. Let's suppose the full path to GF-Complete is
58   - in the environment variable GFP
59   -2A.) On Linux, set the environment variable LD_LIBRARY_PATH so that it
60   - includes $GFP/src/.libs
61   -2B.) On a mac, set the environment variable DYLD_LIBRARY_PATH so that it
62   - includes $GFP/src/.libs
63   -2.) ./configure LDFLAGS=-L$GFP/src/.libs/ CPPFLAGS=-I$GFP/include
64   -3.) make
65   -
66 51 The examples will be in the directory Examples. The include files will
67 52 be in the directory include, and the library will be called libJerasure.a
68 53 in the directory src/.libs.
69 54  
70 55 ------------------------------------------------------------
71 56  
72   -As long as GF-Complete is installed, Jerasure 2.0 can be used just as previous
73   -versions. There is no need to define custom Galois Fields. Jerasure will
74   -determine the default field to use, if one is not specified.
75   -
76 57 If you would like to explore a using a different Galois Field implementation,
77   -please see the manual.
  58 +please see the manual at gf-complete/Manual.pdf.
78 59  
79 60 ------------------------------------------------------------
80 61  
81   -Testing GF-Complete
82   -
83   -If the GF-Complete tools are installed in /usr/local/bin
84   -
85   - make check
86   -
87   -If the GF-Complete tools are installed elsewhere
88   -
89   - make GF_COMPLETE_DIR=$(pwd)/../gf-complete/tools check
90   -
91 62 To run some tests with valgrind
92 63  
93 64 make VALGRIND='valgrind --tool=memcheck --quiet' \
94   - GF_COMPLETE_DIR=$(pwd)/../gf-complete/tools \
95 65 check
... ...
autogen.sh 0 โ†’ 100755
... ... @@ -0,0 +1,13 @@
  1 +#!/bin/sh -x
  2 +
  3 +set -e
  4 +
  5 +if test -d ".git" ; then
  6 + if ! git submodule sync || ! git submodule update --init; then
  7 + echo "Error: could not initialize submodule projects"
  8 + echo " Network connectivity might be required."
  9 + exit 1
  10 + fi
  11 +fi
  12 +
  13 +autoreconf --force --install
... ...
configure.ac
... ... @@ -20,16 +20,10 @@ LT_INIT([disable-static])
20 20 # Checks for programs.
21 21 AC_PROG_CC
22 22  
23   -# Checks for libraries.
24   -AC_CHECK_LIB([gf_complete], [gf_init_easy], [],
25   - [AC_MSG_FAILURE(
26   - [You need to have gf_complete installed.
27   - gf_complete is available from http://jerasure.org/jerasure/gf-complete])
28   - ])
  23 +AC_CONFIG_SUBDIRS([gf-complete])
29 24  
30 25 # Checks for header files.
31 26 AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h])
32   -AC_CHECK_HEADERS([gf_complete.h gf_general.h gf_method.h gf_rand.h])
33 27  
34 28 # Checks for typedefs, structures, and compiler characteristics.
35 29 AC_TYPE_UINT32_T
... ...
gf-complete 0 โ†’ 160000
... ... @@ -0,0 +1 @@
  1 +Subproject commit 5f31e2719d4b66f1d5354b7424a81bf3423de7b7
... ...
src/Makefile.am
1 1 # Jerasure AM file
2 2  
3   -AM_CPPFLAGS = -I$(top_srcdir)/include
  3 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/gf-complete/include
4 4 AM_CFLAGS = $(SIMD_FLAGS)
5 5  
6 6 lib_LTLIBRARIES = libJerasure.la
7 7 libJerasure_la_SOURCES = galois.c jerasure.c reed_sol.c cauchy.c liberation.c
8   -libJerasure_la_LDFLAGS = -version-info 2:0:0
  8 +libJerasure_la_LDFLAGS = -version-info 2:0:0 -L$(top_builddir)/gf-complete/src/.libs
9 9 libJerasure_la_LIBADD = -lgf_complete
10 10 include_HEADERS = ../include/jerasure.h
11 11  
... ...