X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=makefile;h=21106112f130c0d2cc2177706d8e5ac3b37a34ab;hb=e8d14e24769eb587c8d0fc6811d1b383f8039d86;hp=22a98a7d95d7ea1e7ff692994ca5bf6c505fa0ee;hpb=d341837e57bf39aa20fbeaf53ac4330478596b1c;p=spline3.git diff --git a/makefile b/makefile index 22a98a7..2110611 100644 --- a/makefile +++ b/makefile @@ -1,3 +1,6 @@ +BIN := spline3 +TMPDIR := /tmp + GHC_WARNINGS := -Wall GHC_WARNINGS += -fwarn-hi-shadowing GHC_WARNINGS += -fwarn-missing-signatures @@ -9,9 +12,12 @@ GHC_WARNINGS += -fwarn-incomplete-record-updates GHC_WARNINGS += -fwarn-monomorphism-restriction GHC_WARNINGS += -fwarn-unused-do-bind -BIN := spline3 -TMPDIR := /tmp -GHC_OPTS := $(GHC_WARNINGS) \ +OPTIMIZATIONS := -O2 +OPTIMIZATIONS += -fexcess-precision +OPTIMIZATIONS += -fno-spec-constr-count + +GHC_OPTS := $(OPTIMIZATIONS) \ + $(GHC_WARNINGS) \ -odir $(TMPDIR) \ -hidir $(TMPDIR) \ --make \ @@ -23,15 +29,21 @@ GHC_OPTS := $(GHC_WARNINGS) \ .PHONY : test publish_doc doc src_html hlint $(BIN): src/*.hs - ghc -O2 $(GHC_OPTS) src/*.hs + ghc -optc-O3 -optc-march=native $(GHC_OPTS) src/*.hs + +llvm: src/*.hs + ghc -fllvm $(GHC_OPTS) src/*.hs all: $(BIN) test_src test_src: src/Tests/*.hs - ghc -O2 $(GHC_OPTS) src/*.hs src/Tests/*.hs + ghc $(GHC_OPTS) src/*.hs src/Tests/*.hs profile: src/*.hs - ghc -O2 $(GHC_OPTS) -prof -auto-all src/*.hs + ghc -optc-O3 -optc-march=native $(GHC_OPTS) -prof -auto-all -caf-all src/*.hs + +profile-llvm: src/*.hs + ghc -fllvm $(GHC_OPTS) -prof -auto-all -caf-all src/*.hs clean: rm -f bin/$(BIN)