-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (42 loc) · 1.13 KB
/
Makefile
File metadata and controls
56 lines (42 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
PACKAGES=zarith,cryptokit,mpi,unix
FLAGS=-g -package $(PACKAGES) -I lib
LIBS=\
Algebra Multiparty \
ElGamal Paillier OT OT4 SHE \
Beaver GarbledCircuits GMW Replicated23 Shamir \
PSI SigmaZKP ORAM
PROGS=\
Millionaires_Beaver \
Millionaires_GMW \
Millionaires_Shamir \
Millionaires_SHE \
Millionaires_Yao \
ObliviousRAM \
Poets \
Threshold \
Vote1 Vote2
LIBS_CMX=$(patsubst %,lib/%.cmx,$(LIBS))
PROGS_EXE=$(patsubst %,%.exe,$(PROGS))
all: $(PROGS_EXE)
test/%.exe: test/%.ml lib/seccomp.cmxa
ocamlfind opt -o $@ -linkpkg $(FLAGS) lib/seccomp.cmxa $<
%.exe: examples/%.ml lib/seccomp.cmxa
ocamlfind opt -o $@ -linkpkg $(FLAGS) lib/seccomp.cmxa $<
lib/seccomp.cmxa: $(LIBS_CMX)
ocamlfind opt -o $@ -a $(LIBS_CMX)
%.cmx: %.ml
ocamlfind opt -c $(FLAGS) $<
%.cmi: %.mli
ocamlfind opt -c $(FLAGS) $<
test: FORCE test/tests.exe test/mptests.exe
./test/tests.exe
mpirun -np 6 test/mptests.exe
depend:
ocamldep -I lib examples/*.ml tests/*.ml lib/*.mli lib/*.ml > .depend
include .depend
clean::
rm -f *.exe
for d in lib examples test; do \
(cd $$d && rm -f *.cm? *.cmxa *.[oa] *.exe *~); \
done
FORCE: