diff options
author | tv <tv@krebsco.de> | 2021-03-14 22:32:35 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2021-03-14 22:32:35 +0100 |
commit | d151f66a8500f1b0a6aa2224f19e18062b172931 (patch) | |
tree | 24199e10c9ebc72b898188a0f2bdcf4b2e6ee244 /build | |
parent | 032cb86ff8108eb4915a692015da344a41f78506 (diff) |
wipwip
Diffstat (limited to 'build')
-rwxr-xr-x | build | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,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 "$@" |