-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (66 loc) · 2.07 KB
/
Makefile
File metadata and controls
80 lines (66 loc) · 2.07 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
LOCATION = src/performance_tests
OPT_FLAGS = -O3 -msse2
PREAMBLE = rm -rf _build; mkdir _build
OCAML_VER = 4.02.3
OCAML_LIB = $(SHELL ~)/.opam/$(OCAML_VER)/lib/ocaml
OCAML_OPT = -O3
cache_line_no_opt:
$(PREAMBLE)
cp $(LOCATION)/cache_line_no_opt.c _build
cd _build && gcc cache_line_no_opt.c -o cache_line
cp _build/cache_line .
cache_line_opt:
$(PREAMBLE)
cp $(LOCATION)/cache_line_opt.c _build
cd _build && gcc cache_line_opt.c $(OPT_FLAGS) -o cache_line
cp _build/cache_line .
cache_size:
$(PREAMBLE)
cp $(LOCATION)/cache_size.c _build
cd _build && gcc cache_size.c $(OPT_FLAGS) -o cache_size
cp _build/cache_size .
pipeline_no_opt:
$(PREAMBLE)
cp $(LOCATION)/pipeline_no_opt.c _build
cd _build && gcc pipeline_no_opt.c -o pipeline
cp _build/pipeline .
pipeline_opt:
$(PREAMBLE)
cp $(LOCATION)/pipeline_opt.c _build
cd _build && gcc pipeline_opt.c $(OPT_FLAGS) -o pipeline
cp _build/pipeline .
pipeline2_no_opt:
$(PREAMBLE)
cp $(LOCATION)/pipeline2.c _build
cd _build && gcc pipeline2.c -o pipeline
cp _build/pipeline .
pipeline2_opt:
$(PREAMBLE)
cp $(LOCATION)/pipeline2.c _build
cd _build && gcc pipeline2.c $(OPT_FLAGS) -o pipeline
cp _build/pipeline .
thread:
$(PREAMBLE)
cp $(LOCATION)/thread.c _build
cd _build && gcc -lpthread thread.c $(OPT_FLAGS) -o thread
cp _build/thread .
ocaml_native:
$(PREAMBLE)
cp src/ocaml_integration/ocaml_native* _build
cd _build && ocamlfind ocamlopt ocaml_native.ml -package bigarray -linkpkg -o ocaml
cp _build/ocaml .
ocaml_no_opt:
$(PREAMBLE)
cp src/ocaml_integration/ocaml_no_opt* _build
cd _build && gcc -c ocaml_no_opt_c.c -I$(OCAML_LIB)
cd _build && ocamlfind ocamlopt ocaml_no_opt_ml.ml -package bigarray -linkpkg -cclib ocaml_no_opt_c.o -o ocaml
cp _build/ocaml .
ocaml_opt:
$(PREAMBLE)
cp src/ocaml_integration/ocaml_opt* _build
cd _build && gcc -c $(OPT_FLAGS) ocaml_opt_c.c -I$(OCAML_LIB)
cd _build && ocamlfind ocamlopt ocaml_opt_ml.ml $(OCAML_OPT) -package bigarray -linkpkg -cclib ocaml_opt_c.o -o ocaml
cp _build/ocaml .
clean:
rm -rf _build
rm -rf cache_line cache_size pipeline thread ocaml