blob: 83033d2c01db0dcd52529d18b34a25fc0127a720 (
plain)
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
|
#! /bin/sh
# usage: ./build [{dev,prod}]
set -efu
main() {
case ${1-dev} in
dev) build_dev;;
prod) build_prod;;
*) echo "$0: bad mode: $1" >&2; exit 1;;
esac
}
build_dev() {
ghc -Wall \
-i$HOME/stockholm/tv/5pkgs/haskell/xmonad-tv/src \
-isrc \
-odir tmp \
-hidir tmp \
src/main.hs \
-threaded \
-O0 \
-o tmp/main
}
# TODO for prod, don't -i external packages (libraries)
build_prod() {
ghc -Wall \
-i$HOME/stockholm/tv/5pkgs/haskell/xmonad-tv/src \
-isrc \
-odir tmp \
-hidir tmp \
src/main.hs \
-threaded \
-O3 \
-o tmp/main
}
main "$@"
|