diff options
author | tv <tv@krebsco.de> | 2021-06-04 00:37:48 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2021-06-04 00:37:48 +0200 |
commit | f51618000e1d96543e5e0ad72219855e9dea42d8 (patch) | |
tree | dc63bb05e748c008f2d816f4079e659dffe0cafb /build | |
parent | 032cb86ff8108eb4915a692015da344a41f78506 (diff) |
wipwip2
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 "$@" |