commit 4348d9d0addb2b1f2941deca6d411e5584736075 parent 920c4203bb1742b894830e07003702cc00119f8c Author: Jared Tobin <jared@jtobin.ca> Date: Fri, 30 Nov 2012 22:48:06 +1300 Add build script for examples. Diffstat:
A | Examples/code/build_examples.sh | | | 25 | +++++++++++++++++++++++++ |
1 file changed, 25 insertions(+), 0 deletions(-)
diff --git a/Examples/code/build_examples.sh b/Examples/code/build_examples.sh @@ -0,0 +1,25 @@ +#!/bin/bash +EXAMPLES_DIR=/Users/jtobin/projects/flat-mcmc/Examples/code +DEST_DIR=/Users/jtobin/projects/flat-mcmc/Examples/demos +GHC_ARGS="-O2 +RTS -fllvm -threaded -rtsopts" + +cd $EXAMPLES_DIR + +# Compile examples +for file in *hs +do + ghc $file -O2 -fllvm -threaded -rtsopts +done + +# Strip the binaries and move to destination +BINS=$(ls *[^.hs]) + +for bin in $BINS +do + strip $bin + mv $bin $DEST_DIR +done + +# Clean up +rm *.hi *.o +