diff --git a/src/erasure-code/jerasure/Makefile.am b/src/erasure-code/jerasure/Makefile.am
index adcb95d..8099208 100644
--- a/src/erasure-code/jerasure/Makefile.am
+++ b/src/erasure-code/jerasure/Makefile.am
@@ -1,52 +1,17 @@
 # jerasure plugin
 noinst_HEADERS += \
-  erasure-code/jerasure/gf-complete/include/gf_complete.h \
-  erasure-code/jerasure/gf-complete/include/gf_general.h \
-  erasure-code/jerasure/gf-complete/include/gf_int.h \
-  erasure-code/jerasure/gf-complete/include/gf_method.h \
-  erasure-code/jerasure/gf-complete/include/gf_rand.h \
-  erasure-code/jerasure/gf-complete/include/gf_w16.h \
-  erasure-code/jerasure/gf-complete/include/gf_w32.h \
-  erasure-code/jerasure/gf-complete/include/gf_w4.h \
-  erasure-code/jerasure/gf-complete/include/gf_w64.h \
-  erasure-code/jerasure/gf-complete/include/gf_w8.h \
-  erasure-code/jerasure/jerasure/include/cauchy.h \
-  erasure-code/jerasure/jerasure/include/galois.h \
-  erasure-code/jerasure/jerasure/include/jerasure.h \
-  erasure-code/jerasure/jerasure/include/liberation.h \
-  erasure-code/jerasure/jerasure/include/reed_sol.h \
   erasure-code/jerasure/ErasureCodeJerasure.h
 
 jerasure_sources = \
   erasure-code/ErasureCode.cc \
-  erasure-code/jerasure/jerasure/src/cauchy.c \
-  erasure-code/jerasure/jerasure/src/galois.c \
-  erasure-code/jerasure/jerasure/src/jerasure.c \
-  erasure-code/jerasure/jerasure/src/liberation.c \
-  erasure-code/jerasure/jerasure/src/reed_sol.c \
-  erasure-code/jerasure/gf-complete/src/gf_wgen.c \
-  erasure-code/jerasure/gf-complete/src/gf_method.c \
-  erasure-code/jerasure/gf-complete/src/gf_w16.c \
-  erasure-code/jerasure/gf-complete/src/gf.c \
-  erasure-code/jerasure/gf-complete/src/gf_w32.c \
-  erasure-code/jerasure/gf-complete/src/gf_w64.c \
-  erasure-code/jerasure/gf-complete/src/gf_w128.c \
-  erasure-code/jerasure/gf-complete/src/gf_general.c \
-  erasure-code/jerasure/gf-complete/src/gf_w4.c \
-  erasure-code/jerasure/gf-complete/src/gf_rand.c \
-  erasure-code/jerasure/gf-complete/src/gf_w8.c \
   erasure-code/jerasure/ErasureCodePluginJerasure.cc \
   erasure-code/jerasure/ErasureCodeJerasure.cc
 
 erasure-code/jerasure/ErasureCodePluginJerasure.cc: ./ceph_ver.h
 
 libec_jerasure_generic_la_SOURCES = ${jerasure_sources}
-libec_jerasure_generic_la_CFLAGS = ${AM_CFLAGS}  \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
-libec_jerasure_generic_la_CXXFLAGS= ${AM_CXXFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+libec_jerasure_generic_la_CFLAGS = ${AM_CFLAGS}
+libec_jerasure_generic_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_jerasure_generic_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_generic_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
 if LINUX
@@ -55,20 +20,11 @@ endif
 
 erasure_codelib_LTLIBRARIES += libec_jerasure_generic.la
 
-libec_jerasure_neon_la_SOURCES = ${jerasure_sources}                                       \
-                                  erasure-code/jerasure/gf-complete/src/neon/gf_w4_neon.c  \
-                                  erasure-code/jerasure/gf-complete/src/neon/gf_w8_neon.c  \
-                                  erasure-code/jerasure/gf-complete/src/neon/gf_w16_neon.c \
-                                  erasure-code/jerasure/gf-complete/src/neon/gf_w32_neon.c \
-                                  erasure-code/jerasure/gf-complete/src/neon/gf_w64_neon.c
+libec_jerasure_neon_la_SOURCES = ${jerasure_sources}
 libec_jerasure_neon_la_CFLAGS = ${AM_CFLAGS}  \
-	${ARM_NEON_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	${ARM_NEON_FLAGS}
 libec_jerasure_neon_la_CXXFLAGS= ${AM_CXXFLAGS} \
-	${ARM_NEON_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	${ARM_NEON_FLAGS}
 libec_jerasure_neon_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_neon_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
 if LINUX
@@ -84,16 +40,12 @@ libec_jerasure_sse3_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSE_FLAGS} \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
-	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	${INTEL_SSSE3_FLAGS}
 libec_jerasure_sse3_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${INTEL_SSE_FLAGS} \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
-	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	${INTEL_SSSE3_FLAGS}
 libec_jerasure_sse3_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_sse3_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
 if LINUX
@@ -111,18 +63,14 @@ libec_jerasure_sse4_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
-	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	${INTEL_SSE4_2_FLAGS}
 libec_jerasure_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${INTEL_SSE_FLAGS} \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
-	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	${INTEL_SSE4_2_FLAGS}
 libec_jerasure_sse4_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_sse4_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
 if LINUX
diff --git a/src/erasure-code/shec/ErasureCodePluginShec.cc b/src/erasure-code/shec/ErasureCodePluginShec.cc
index d2b72f5..acbd172 100644
--- a/src/erasure-code/shec/ErasureCodePluginShec.cc
+++ b/src/erasure-code/shec/ErasureCodePluginShec.cc
@@ -71,7 +71,7 @@ public:
 };
 
 extern "C" {
-#include "jerasure/include/galois.h"
+#include "galois.h"
 
 extern gf_t *gfp_array[];
 extern int  gfp_is_composite[];
diff --git a/src/erasure-code/shec/ErasureCodeShec.cc b/src/erasure-code/shec/ErasureCodeShec.cc
index 2180328..c84ffc7 100644
--- a/src/erasure-code/shec/ErasureCodeShec.cc
+++ b/src/erasure-code/shec/ErasureCodeShec.cc
@@ -28,8 +28,8 @@
 #include "crush/CrushWrapper.h"
 #include "osd/osd_types.h"
 extern "C" {
-#include "jerasure/include/jerasure.h"
-#include "jerasure/include/galois.h"
+#include "jerasure.h"
+#include "galois.h"
 
 extern int calc_determinant(int *matrix, int dim);
 extern int* reed_sol_vandermonde_coding_matrix(int k, int m, int w);
diff --git a/src/erasure-code/shec/Makefile.am b/src/erasure-code/shec/Makefile.am
index 6b658d5..3281c60 100644
--- a/src/erasure-code/shec/Makefile.am
+++ b/src/erasure-code/shec/Makefile.am
@@ -4,49 +4,19 @@ shec_sources = \
 	erasure-code/shec/ErasureCodePluginShec.cc \
 	erasure-code/shec/ErasureCodeShec.cc \
 	erasure-code/shec/ErasureCodeShecTableCache.cc \
-	erasure-code/shec/determinant.c \
-	erasure-code/jerasure/jerasure/src/cauchy.c \
-	erasure-code/jerasure/jerasure/src/galois.c \
-	erasure-code/jerasure/jerasure/src/jerasure.c \
-	erasure-code/jerasure/jerasure/src/liberation.c \
-	erasure-code/jerasure/jerasure/src/reed_sol.c \
-	erasure-code/jerasure/gf-complete/src/gf_wgen.c \
-	erasure-code/jerasure/gf-complete/src/gf_method.c \
-	erasure-code/jerasure/gf-complete/src/gf_w16.c \
-	erasure-code/jerasure/gf-complete/src/gf.c \
-	erasure-code/jerasure/gf-complete/src/gf_w32.c \
-	erasure-code/jerasure/gf-complete/src/gf_w64.c \
-	erasure-code/jerasure/gf-complete/src/gf_w128.c \
-	erasure-code/jerasure/gf-complete/src/gf_general.c \
-	erasure-code/jerasure/gf-complete/src/gf_w4.c \
-	erasure-code/jerasure/gf-complete/src/gf_rand.c \
-	erasure-code/jerasure/gf-complete/src/gf_w8.c
+	erasure-code/shec/determinant.c
 
 noinst_HEADERS += \
 	erasure-code/shec/ErasureCodeShec.h \
-	erasure-code/shec/ErasureCodeShecTableCache.h \
-	erasure-code/jerasure/jerasure/include/cauchy.h \
-	erasure-code/jerasure/jerasure/include/galois.h \
-	erasure-code/jerasure/jerasure/include/jerasure.h \
-	erasure-code/jerasure/jerasure/include/liberation.h \
-	erasure-code/jerasure/jerasure/include/reed_sol.h \
-	erasure-code/jerasure/gf-complete/include/gf_int.h \
-	erasure-code/jerasure/gf-complete/include/gf_complete.h \
-	erasure-code/jerasure/gf-complete/include/gf_rand.h \
-	erasure-code/jerasure/gf-complete/include/gf_method.h \
-	erasure-code/jerasure/gf-complete/include/gf_general.h
+	erasure-code/shec/ErasureCodeShecTableCache.h
 
 erasure-code/shec/ErasureCodePluginShec.cc: ./ceph_ver.h
 
 libec_shec_generic_la_SOURCES = ${shec_sources}
 libec_shec_generic_la_CFLAGS = ${AM_CFLAGS}  \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_generic_la_CXXFLAGS= ${AM_CXXFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_generic_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -57,22 +27,13 @@ endif
 
 erasure_codelib_LTLIBRARIES += libec_shec_generic.la
 
-libec_shec_neon_la_SOURCES = ${shec_sources} \
-	erasure-code/jerasure/gf-complete/src/neon/gf_w4_neon.c \
-	erasure-code/jerasure/gf-complete/src/neon/gf_w8_neon.c \
-	erasure-code/jerasure/gf-complete/src/neon/gf_w16_neon.c \
-	erasure-code/jerasure/gf-complete/src/neon/gf_w32_neon.c \
-	erasure-code/jerasure/gf-complete/src/neon/gf_w64_neon.c
+libec_shec_neon_la_SOURCES = ${shec_sources}
 libec_shec_neon_la_CFLAGS = ${AM_CFLAGS}  \
 	${ARM_NEON_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_neon_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${ARM_NEON_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_neon_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -91,8 +52,6 @@ libec_shec_sse3_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_sse3_la_CXXFLAGS= ${AM_CXXFLAGS} \
@@ -100,8 +59,6 @@ libec_shec_sse3_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_sse3_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -122,8 +79,6 @@ libec_shec_sse4_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
 	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
@@ -133,8 +88,6 @@ libec_shec_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
 	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 libec_shec_sse4_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
diff --git a/src/erasure-code/shec/determinant.c b/src/erasure-code/shec/determinant.c
index 15b62c9..bf5d290 100755
--- a/src/erasure-code/shec/determinant.c
+++ b/src/erasure-code/shec/determinant.c
@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "jerasure/include/galois.h"
+#include "galois.h"
 
 void print_matrix(int *mat, int dim)
 {
diff --git a/src/test/erasure-code/Makefile.am b/src/test/erasure-code/Makefile.am
index bdce080..11895ae 100644
--- a/src/test/erasure-code/Makefile.am
+++ b/src/test/erasure-code/Makefile.am
@@ -166,12 +166,8 @@ check_TESTPROGRAMS += unittest_erasure_code
 unittest_erasure_code_jerasure_SOURCES = \
 	test/erasure-code/TestErasureCodeJerasure.cc \
 	${jerasure_sources}
-unittest_erasure_code_jerasure_CFLAGS = $(AM_CFLAGS) \
-	-Ierasure-code/jerasure/gf-complete/include \
-	-Ierasure-code/jerasure/jerasure/include
-unittest_erasure_code_jerasure_CXXFLAGS = $(UNITTEST_CXXFLAGS) \
-	-Ierasure-code/jerasure/gf-complete/include \
-	-Ierasure-code/jerasure/jerasure/include
+unittest_erasure_code_jerasure_CFLAGS = $(AM_CFLAGS)
+unittest_erasure_code_jerasure_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_erasure_code_jerasure_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 if LINUX
 unittest_erasure_code_jerasure_LDADD += -ldl
@@ -232,13 +228,9 @@ unittest_erasure_code_shec_SOURCES = \
 	test/erasure-code/TestErasureCodeShec.cc \
 	${shec_sources}
 unittest_erasure_code_shec_CFLAGS = ${libec_shec_la_CFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
@@ -251,13 +243,9 @@ unittest_erasure_code_shec_all_SOURCES = \
 	test/erasure-code/TestErasureCodeShec_all.cc \
 	${shec_sources}
 unittest_erasure_code_shec_all_CFLAGS = ${libec_shec_la_CFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_all_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_all_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
@@ -270,13 +258,9 @@ unittest_erasure_code_shec_thread_SOURCES = \
 	test/erasure-code/TestErasureCodeShec_thread.cc \
 	${shec_sources}
 unittest_erasure_code_shec_thread_CFLAGS = ${libec_shec_la_CFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_thread_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_thread_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
@@ -289,13 +273,9 @@ unittest_erasure_code_shec_arguments_SOURCES = \
 	test/erasure-code/TestErasureCodeShec_arguments.cc \
 	${shec_sources}
 unittest_erasure_code_shec_arguments_CFLAGS = ${libec_shec_la_CFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_arguments_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
 	-I$(srcdir)/erasure-code/jerasure \
 	-I$(srcdir)/erasure-code/shec
 unittest_erasure_code_shec_arguments_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
