X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=makefile;h=82ddbdd7f223c4ed791640b5cbabf930559e7bd6;hb=02a34bf79286cd63edcc62e8610fe045feb1dd68;hp=7523e3ae20e44f16ec9657a7533f9dea605a41cd;hpb=aa0d923bb292eb248821467c4693c6c8948740cb;p=spline3.git diff --git a/makefile b/makefile index 7523e3a..82ddbdd 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,29 +12,43 @@ GHC_WARNINGS += -fwarn-incomplete-record-updates GHC_WARNINGS += -fwarn-monomorphism-restriction GHC_WARNINGS += -fwarn-unused-do-bind -BIN := spline3 -GHC_OPTS := $(GHC_WARNINGS) -odir /tmp -hidir /tmp --make -o bin/${BIN} +OPTIMIZATIONS := -O2 +OPTIMIZATIONS += -fexcess-precision +OPTIMIZATIONS += -fno-spec-constr-count + +GHC_OPTS := $(OPTIMIZATIONS) \ + $(GHC_WARNINGS) \ + -odir $(TMPDIR) \ + -hidir $(TMPDIR) \ + --make \ + -rtsopts \ + -threaded \ + -o bin/${BIN} .PHONY : test publish_doc doc src_html hlint $(BIN): src/*.hs - ghc -O2 $(GHC_OPTS) src/*.hs + ghc -fllvm $(GHC_OPTS) src/*.hs + +gcc: src/*.hs + ghc -optc-O2 -optc-march=native $(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 -fllvm $(GHC_OPTS) -prof -auto-all -caf-all src/*.hs + +profile-gcc: src/*.hs + ghc -optc-O2 -optc-march=native $(GHC_OPTS) -prof -auto-all -caf-all src/*.hs clean: rm -f bin/$(BIN) - rm -f src/*.hi - rm -f src/*.o - rm -f src/Tests/*.hi - rm -f src/Tests/*.o + rm -f $(TMPDIR)/*.hi + rm -f $(TMPDIR)/*.o rm -f *.prof rm -rf doc/html/*