]> gitweb.michael.orlitzky.com - spline3.git/blob - makefile
src/{Cube,FunctionValues}.hs: add explicit Cardinal imports.
[spline3.git] / makefile
1 PN = spline3
2 BIN = dist/build/$(PN)/$(PN)
3 SRCS := $(shell find src/ -type f -name '*.hs')
4
5 BIN = dist/build/spline3/spline3
6 DOCTESTS_BIN = dist/build/doctests/doctests
7 TESTSUITE_BIN = dist/build/testsuite/testsuite
8
9 .PHONY : test doc dist hlint
10
11 $(BIN): $(PN).cabal $(SRCS)
12 runghc Setup.hs configure \
13 --user \
14 --prefix=/ \
15 --flags=${FLAGS}
16 runghc Setup.hs build
17
18 $(DOCTESTS_BIN): $(SRCS) test/Doctests.hs
19 runghc Setup.hs configure \
20 --user \
21 --prefix=/ \
22 --flags=${FLAGS} \
23 --enable-tests
24 runghc Setup.hs build
25
26 $(TESTSUITE_BIN): $(SRCS) test/TestSuite.hs
27 runghc Setup.hs configure \
28 --user \
29 --prefix=/ \
30 --flags=${FLAGS} \
31 --enable-tests
32 runghc Setup.hs build
33
34 llvm: $(PN).cabal $(SRCS)
35 FLAGS="llvm" make
36
37 profile: $(SRCS)
38 runghc Setup.hs configure \
39 --user \
40 --prefix=/ \
41 --enable-executable-profiling
42 runghc Setup.hs build
43
44 clean:
45 runghc Setup.hs clean
46 rm -rf dist/
47 rm -f *.prof
48 rm -f .hpc
49
50 test: $(PN).cabal $(TESTSUITE_BIN) $(DOCTESTS_BIN) $(BIN)
51 runghc Setup.hs test
52
53 dist:
54 runghc Setup.hs configure --prefix=/
55 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
56
57 doc: dist/doc
58
59 dist/doc: $(PN).cabal $(SRCS)
60 runghc Setup.hs configure --user --prefix=/ --flags=${FLAGS}
61 runghc Setup.hs hscolour --all
62 runghc Setup.hs haddock --all \
63 --hyperlink-source \
64 --haddock-options="--ignore-all-exports"
65
66 hlint:
67 hlint --ignore="Use camelCase" \
68 --ignore="Redundant bracket" \
69 --color \
70 src