From: Michael Orlitzky Date: Sat, 15 Oct 2011 22:27:19 +0000 (-0400) Subject: Clean up the makefile a little bit and add an 'hpc' target. X-Git-Tag: 0.0.1~95 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=spline3.git;a=commitdiff_plain;h=f390abd1832938411a581d595c847a7a1aeeb237 Clean up the makefile a little bit and add an 'hpc' target. --- diff --git a/makefile b/makefile index fdac2f8..888c138 100644 --- a/makefile +++ b/makefile @@ -16,14 +16,14 @@ 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} +GHC_OPTS += $(OPTIMIZATIONS) +GHC_OPTS += $(GHC_WARNINGS) +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 +35,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)