]> gitweb.michael.orlitzky.com - mailbox-count.git/blobdiff - makefile
makefile: move ghc-options from the cabal file into the makefile.
[mailbox-count.git] / makefile
index 6a99594b9b3afb28aec8d8b378a2a2f6f5add8da..420039b64e75f02396647aa8f5d0846f5077d4df 100644 (file)
--- a/makefile
+++ b/makefile
@@ -2,11 +2,20 @@ PN            = mailbox-count
 BIN           = dist/build/$(PN)/$(PN)
 SRCS          = $(shell find src/ -type f -name '*.hs')
 
+HCFLAGS += -Weverything \
+           -Wno-implicit-prelude \
+           -Wno-safe \
+           -Wno-unsafe \
+           -Wno-all-missed-specialisations \
+           -rtsopts \
+           -threaded
+
+
 .PHONY : dist hlint
 
 $(BIN): $(PN).cabal $(SRCS)
        runghc Setup.hs configure --user
-       runghc Setup.hs build
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
 doc: $(PN).cabal $(SRCS)
        runghc Setup.hs hscolour --all
@@ -24,12 +33,12 @@ TEST_SRCS := $(shell find test/ -type f -name '*.hs')
 
 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
        runghc Setup.hs configure --user --enable-tests --prefix=/
-       runghc Setup.hs build
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
 
 $(DOCTESTS_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
        runghc Setup.hs configure --user --enable-tests
-       runghc Setup.hs build
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
 check: $(BIN) $(TESTSUITE_BIN) $(DOCTESTS_BIN)
        runghc Setup.hs test