From: Michael Orlitzky Date: Mon, 26 Dec 2011 18:04:41 +0000 (-0500) Subject: Cabalize the project. X-Git-Tag: 0.0.1~14 X-Git-Url: https://gitweb.michael.orlitzky.com/?p=hath.git;a=commitdiff_plain;h=041d33c0e5ac9c0e9733f42cd96aa2fba07a043f Cabalize the project. --- diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/hath.cabal b/hath.cabal new file mode 100644 index 0000000..ca43858 --- /dev/null +++ b/hath.cabal @@ -0,0 +1,46 @@ +name: hath +version: 0.0 +cabal-version: >= 1.8 +author: Michael Orlitzky +maintainer: Michael Orlitzky +synopsis: + Hath manipulates network blocks in CIDR notation. +build-type: Simple + + +executable hath + build-depends: + base == 4.4.*, + HUnit == 1.2.*, + QuickCheck == 2.4.* + + main-is: + Main.hs + + hs-source-dirs: + src/ + + ghc-options: + -Wall + -fwarn-hi-shadowing + -fwarn-missing-signatures + -fwarn-name-shadowing + -fwarn-orphans + -fwarn-type-defaults + -fwarn-tabs + -fwarn-incomplete-record-updates + -fwarn-monomorphism-restriction + -fwarn-unused-do-bind + -funbox-strict-fields + -fexcess-precision + -fno-spec-constr-count + -rtsopts + -threaded + -optc-O3 + -optc-march=native + -O2 + + ghc-prof-options: + -prof + -auto-all + -caf-all diff --git a/makefile b/makefile index 8605a89..7eb2938 100644 --- a/makefile +++ b/makefile @@ -1,27 +1,17 @@ -GHC_WARNINGS := -Wall -GHC_WARNINGS += -fwarn-hi-shadowing -GHC_WARNINGS += -fwarn-missing-signatures -GHC_WARNINGS += -fwarn-name-shadowing -GHC_WARNINGS += -fwarn-orphans -GHC_WARNINGS += -fwarn-type-defaults - -BIN=hath - .PHONY : test -all: $(BIN) - -$(BIN): src/*.hs - ghc -O2 $(GHC_WARNINGS) --make -o bin/${BIN} src/*.hs +hath: src/*.hs + runghc Setup.hs clean + runghc Setup.hs configure --user + runghc Setup.hs build profile: src/*.hs - ghc -O2 $(GHC_WARNINGS) -prof -auto-all --make -o bin/$(BIN) src/*.hs + runghc Setup.hs clean + runghc Setup.hs configure --user --enable-executable-profiling + runghc Setup.hs build clean: - rm -f bin/$(BIN) - rm -f src/*.hi - rm -f src/*.o - rm -f *.prof + runghc Setup.hs clean test: runghc -i"src" test/TestSuite.hs