--- /dev/null
+name: hath
+version: 0.0
+cabal-version: >= 1.8
+author: Michael Orlitzky
+maintainer: Michael Orlitzky <michael@orlitzky.com>
+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
-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