forked from erikd/http-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (28 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
TARGETS = debug-proxy request-rewrite-proxy simple-proxy dist/build/testsuite/testsuite
GHC = cabal exec -- ghc
GHCFLAGS = -Wall -fwarn-tabs
HSRC := $(shell find Network Test -name \*.hs)
all : $(TARGETS)
clean :
find Network Test example -name \*.o -exec rm -f {} \;
find Network Test example -name \*.hi -exec rm -f {} \;
rm -rf $(TARGETS)
check : dist/build/testsuite/testsuite
dist/build/testsuite/testsuite
hlint :
hlint Network Test
init : cabal.sandbox.config
cabal.sandbox.config :
cabal sandbox init
cabal install --dependencies-only
#-------------------------------------------------------------------------------
dist/build/testsuite/testsuite : $(HSRC)
mkdir -p dist/build/testsuite
$(GHC) $(GHCFLAGS) -with-rtsopts="-M64m" -Wall -O2 -threaded Test/testsuite.hs -o $@
simple-proxy : example/simple-proxy.hs $(HSRC)
$(GHC) $(GHCFLAGS) --make $< -o $@
debug-proxy : example/debug-proxy.hs $(HSRC)
$(GHC) $(GHCFLAGS) --make $< -o $@
request-rewrite-proxy : example/request-rewrite-proxy.hs $(HSRC)
$(GHC) $(GHCFLAGS) --make $< -o $@
print-%: ; @echo $*=$($*)