-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMakefile
59 lines (41 loc) · 1.27 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
VERSION := $(shell ./build-scripts/read-version.sh)
progname := ngless
distdir := ngless-${VERSION}
prefix=/usr/local
deps=$(prefix)/share/$(progname)
exec=$(prefix)/bin
all: ngless
ngless:
stack build $(STACKOPTS)
modules:
cd Modules && $(MAKE)
static:
stack build $(STACKOPTS) --ghc-options='-fPIC' --force-dirty --flag NGLess:static
fast:
stack build --fast --work-dir .stack-work-fast $(STACKOPTS)
check:
stack test --work-dir .stack-work-check $(STACKOPTS)
fastcheck:
stack test --fast --work-dir .stack-work-fastcheck $(STACKOPTS)
dist: ngless-${VERSION}.tar.gz
# Synonym
tests: check
all_tests: check
PATH=$(stack path --bin-path):${PATH} ./run-tests.sh
bench:
stack bench --work-dir .stack-work-bench $(STACKOPTS)
profile:
stack build $(STACKOPTS) --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"
install: ngless $(MEGAHIT_BINS)
mkdir -p $(exec)
mkdir -p $(deps)/bin
stack --local-bin-path $(exec) install $(STACKOPTS)
clean:
stack clean $(STACKOPTS)
distclean: clean
ngless-${VERSION}.tar.gz: ngless
mkdir -p $(distdir)/share $(distdir)/bin
stack build $(STACKOPTS)
cp dist/build/$(progname)/$(progname) $(distdir)/bin
rm -rf $(distdir)
.PHONY: all build clean check tests all_tests distclean dist static fast fastcheck modules