-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmakefile
56 lines (40 loc) · 1 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
.DEFAULT_GOAL := help
# number of CPU threads
NTHREADS=2
help:
@echo " Use \`make <target>\` where <target> is one of"
@echo " clean remove .stack-work/"
@echo " build build and link (`stack build`)"
@echo " build-profile (`stack build --profile`)"
@echo " test (`stack test`)"
@echo " test-profile (`stack test --profile`)"
clean:
rm -rf .stack-work/
build:
stack build
test:
stack test
build-threaded:
stack build --ghc-options "-threaded -O2"
build-profile:
stack build --profile
# stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"
test-profile:
# stack test --profile
# stack exec $(stack path --dist-dir)/build/spec -- +RTS -h
stack test --ghc-options "+RTS -h -RTS"
test-threaded:
stack test --ghc-options "+RTS -N${NTHREADS} -s -RTS"
all:
make build
make test
rebuild:
make clean
make all
profile:
make clean
make build-profile
make test-profile
threaded:
make build-threaded
make test-threaded