-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 1013 Bytes
/
Makefile
File metadata and controls
52 lines (40 loc) · 1013 Bytes
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
include config.mk
JULIA ?= julia
JULIA_CMD ?= $(JULIA) --color=yes --startup-file=no
export JULIA_LOAD_PATH ?= @
export JULIA_PROJECT ?= $(shell pwd)/..
BENCHMARK_NUM_THREADS ?= $(shell ../nthreads.sh)
BENCHMARK_EXCLUSIVE ?= 0
.PHONY: all benchmark plots clean backup print-* dump-*
all: dump-config
$(MAKE) benchmark
$(MAKE) plots
benchmark: build/results.json
build/results.json:
JULIA_NUM_THREADS=$(BENCHMARK_NUM_THREADS) \
JULIA_EXCLUSIVE=$(BENCHMARK_EXCLUSIVE) \
$(JULIA_CMD) run.jl
plots: build/results.png
build/results.png:
$(JULIA_CMD) plot.jl
clean:
rm -fv build/*.*
backup:
test -e build/results.json
mkdir -pv backup
rm -rf tmp/backup
mkdir -pv tmp/backup/build
mv build/* tmp/backup/build/
mv tmp/backup backup/backup-$$(date +%Y-%m-%d-%H%M%S)
print-%:
@echo " "$*=${$*}
dump-config: \
print-JULIA \
print-JULIA_CMD \
print-JULIA_LOAD_PATH \
print-JULIA_PROJECT \
print-BENCHMARK_NUM_THREADS \
print-BENCHMARK_EXCLUSIVE
config.mk:
touch $@
# ln -s default-config.mk $@