]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - makefile
Remove all "otherwise -> error" cases for performance reasons.
[spline3.git] / makefile
index fdac2f8c868b711c1f8839b030d9ff18bb344998..5ae5bbbe6abf74f3b1fb3deac20581681660bc9b 100644 (file)
--- a/makefile
+++ b/makefile
@@ -13,18 +13,22 @@ GHC_WARNINGS += -fwarn-monomorphism-restriction
 GHC_WARNINGS += -fwarn-unused-do-bind
 
 OPTIMIZATIONS := -O2
+OPTIMIZATIONS += -funbox-strict-fields
 OPTIMIZATIONS += -fexcess-precision
 OPTIMIZATIONS += -fno-spec-constr-count
 
-GHC_OPTS := $(OPTIMIZATIONS) \
-           $(GHC_WARNINGS)  \
-            -odir $(TMPDIR)  \
-            -hidir $(TMPDIR) \
-            --make           \
-            -rtsopts         \
-            -threaded        \
-            -o bin/${BIN}
+REPA_INCLUDES := -ivendor/repa-head/repa/dist/build/
+REPA_INCLUDES += -ivendor/repa-head/repa-io/dist/build
 
+GHC_OPTS += $(OPTIMIZATIONS)
+GHC_OPTS += $(GHC_WARNINGS)
+GHC_OPTS += $(REPA_INCLUDES)
+GHC_OPTS += -odir $(TMPDIR)
+GHC_OPTS += -hidir $(TMPDIR)
+GHC_OPTS += --make
+GHC_OPTS += -rtsopts
+GHC_OPTS += -threaded
+GHC_OPTS += -o bin/${BIN}
 
 .PHONY : test publish_doc doc src_html hlint
 
@@ -35,10 +39,13 @@ llvm: src/*.hs
        ghc -fllvm -optlo-O3 -optlc-O3 $(GHC_OPTS) src/*.hs
 
 profile: src/*.hs
-       ghc  -optc-O3 -optc-march=native $(GHC_OPTS) -prof -auto-all -caf-all src/*.hs
+       GHC_OPTS="-prof -auto-all -caf-all" make
 
 profile-llvm: src/*.hs
-       ghc -fllvm $(GHC_OPTS) -prof -auto-all -caf-all src/*.hs
+       GHC_OPTS="-fllvm -prof -auto-all -caf-all" make llvm
+
+hpc: src/*.hs
+       GHC_OPTS="-fhpc" make
 
 clean:
        rm -f bin/$(BIN)