diff --git a/.gitignore b/.gitignore index 0279ec5..695fdbf 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ *.exe *.out *.app +test # IDE *.code-workspace diff --git a/FINAL.h b/FINAL.h new file mode 100644 index 0000000..fe93650 --- /dev/null +++ b/FINAL.h @@ -0,0 +1,6 @@ +#include "params.h" +#include "sampler.h" +#include "keygen.h" +#include "fft.h" +#include "ntruhe.h" +#include "lwehe.h" \ No newline at end of file diff --git a/Makefile b/Makefile index 6fc87ab..8f941c5 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,11 @@ all: clean test clean: $(RM) test test.o lwehe.o ntruhe.o fft.o sampler.o keygen.o -test: include/params.h ntruhe.o lwehe.o keygen.o fft.o sampler.o - $(CCX) $(CCXFLAGS) -o test test.cpp ntruhe.o lwehe.o keygen.o fft.o sampler.o $(DEPS) +test: FINAL.h libfinal.a + $(CCX) $(CCXFLAGS) -o test test.cpp libfinal.a $(DEPS) + +libfinal.a: include/params.h ntruhe.o lwehe.o keygen.o fft.o sampler.o + $(AR) -q libfinal.a ntruhe.o lwehe.o keygen.o fft.o sampler.o ntruhe.o: include/ntruhe.h keygen.o sampler.o lwehe.o src/ntruhe.cpp $(CCX) $(CCXFLAGS) -c src/ntruhe.cpp diff --git a/test.cpp b/test.cpp index b09aff5..811a4c5 100644 --- a/test.cpp +++ b/test.cpp @@ -1,12 +1,5 @@ #include #include -#include "params.h" -#include "sampler.h" -#include "keygen.h" -#include "fft.h" -#include "ntruhe.h" -#include "lwehe.h" - #include #include #include @@ -15,6 +8,8 @@ #include +#include "FINAL.h" + using namespace std; using namespace NTL;