From: Michael Orlitzky Date: Sat, 3 Sep 2011 14:56:03 +0000 (-0400) Subject: Add some C optimizations. X-Git-Tag: 0.0.1~172 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=spline3.git;a=commitdiff_plain;h=dd58892d526586bc436b88d18a54b954be032761 Add some C optimizations. Minor makefile cleanup. --- diff --git a/makefile b/makefile index 6820e5a..74b7b95 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,30 +12,34 @@ 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 +OPTIMIZATIONS += -optc-O2 +OPTIMIZATIONS += -optc-march=native + +GHC_OPTS := $(OPTIMIZATIONS) \ + $(GHC_WARNINGS) \ -odir $(TMPDIR) \ -hidir $(TMPDIR) \ --make \ -rtsopts \ -threaded \ - -fno-spec-constr-count \ -o bin/${BIN} .PHONY : test publish_doc doc src_html hlint $(BIN): src/*.hs - ghc -O2 $(GHC_OPTS) src/*.hs + ghc $(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 $(GHC_OPTS) -prof -auto-all src/*.hs clean: rm -f bin/$(BIN)