-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
74 lines (59 loc) · 2.35 KB
/
Makefile
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
.PHONY: all lib clean deps test quicktest
.PHONY: utils_tests pointpatch_tests
#summary ----------------------------------------
all: lib
# --------------------------------------------------------------------------------
# Building
# --------------------------------------------------------------------------------
# Build the 3rd-party dependencies for the core libs:
# This is currently implied-by/redundant with the "lib" target.
deps:
# Distorm is an in-place build:
(cd deps/distorm/make/linux && make)
build:
$(info --------------------------------------------)
$(info Building Liteinst )
$(info --------------------------------------------)
(make lib)
$(info )
(cd apps/benchmarks; make bench)
run:
(cd apps/benchmarks; make run)
# (cd microbenchmarks/toggle_throughput; ./run.sh)
# (cd microbenchmarks/injection_costs; ./run.sh)
summarize:
(cd scripts; ./summarize.py)
(cp scripts/layouts/layouts results/Layout_Distribution-Table2/; cd results/Layout_Distribution-Table2; \
./layouts raw/*; rm layouts)
plot: summarize
(cd scripts/plotting; make run)
lib:
$(CXX) --version || echo ok
$(CC) --version || echo ok
(cd utils/src && make CC=$(CC) CXX=$(CXX) && make install )
(cd libpointpatch/src && make CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS) -DNDEBUG -DWAIT_SPIN_RDTSC" && make install )
(cd libliteinst/src && make CC=$(CC) CXX=$(CXX) && make install )
(cd libliteprof/src && make CC=$(CC) CXX=$(CXX) && make install )
(cd libcallpatch/src && make CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS) -DNDEBUG" && make install )
# Run all available tests, this is our regression testing / continuous
# integration target:
test: quicktest
# Only the fast-running tests:
quicktest: lib utils_tests
utils_tests:
(cd utils/tests && make test)
pointpatch_tests:
(cd libpointpatch/tests && make test )
# --------------------------------------------------------------------------------
# Docker concerns:
# --------------------------------------------------------------------------------
docker_cleanup:
# Remove any dangling ones as a general cleanup measure:
docker rmi $(docker images -q --filter "dangling=true") || echo ok
clean:
rm -rf build results
(cd utils/src/ && make clean)
(cd libliteinst/src/ && make clean)
(cd libliteprof/src/ && make clean)
(cd deps/distorm/make/linux && make clean)
(cd apps/benchmarks && make clean)