mirror of
https://github.com/mii443/FINAL.git
synced 2025-08-22 15:05:36 +00:00
Compile library and tests separately
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,6 +30,7 @@
|
|||||||
*.exe
|
*.exe
|
||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
test
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
6
FINAL.h
Normal file
6
FINAL.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "params.h"
|
||||||
|
#include "sampler.h"
|
||||||
|
#include "keygen.h"
|
||||||
|
#include "fft.h"
|
||||||
|
#include "ntruhe.h"
|
||||||
|
#include "lwehe.h"
|
7
Makefile
7
Makefile
@ -7,8 +7,11 @@ all: clean test
|
|||||||
clean:
|
clean:
|
||||||
$(RM) test test.o lwehe.o ntruhe.o fft.o sampler.o keygen.o
|
$(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
|
test: FINAL.h libfinal.a
|
||||||
$(CCX) $(CCXFLAGS) -o test test.cpp ntruhe.o lwehe.o keygen.o fft.o sampler.o $(DEPS)
|
$(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
|
ntruhe.o: include/ntruhe.h keygen.o sampler.o lwehe.o src/ntruhe.cpp
|
||||||
$(CCX) $(CCXFLAGS) -c src/ntruhe.cpp
|
$(CCX) $(CCXFLAGS) -c src/ntruhe.cpp
|
||||||
|
9
test.cpp
9
test.cpp
@ -1,12 +1,5 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "params.h"
|
|
||||||
#include "sampler.h"
|
|
||||||
#include "keygen.h"
|
|
||||||
#include "fft.h"
|
|
||||||
#include "ntruhe.h"
|
|
||||||
#include "lwehe.h"
|
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -15,6 +8,8 @@
|
|||||||
|
|
||||||
#include <NTL/ZZX.h>
|
#include <NTL/ZZX.h>
|
||||||
|
|
||||||
|
#include "FINAL.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NTL;
|
using namespace NTL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user