-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (35 loc) · 903 Bytes
/
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
43
44
45
46
47
48
49
CABAL=cabal
GHC_GET_PKG=ghc-pkg list --simple-output
GET_VER=cut -d- -f2
AESON_VERSION = $(shell $(GHC_GET_PKG) aeson | $(GET_VER))
SNAP_VERSION = $(shell $(GHC_GET_PKG) snap | $(GET_VER))
all: prod
clean:
rm -rf dist/build/
install-snap:
ifndef SNAP_VERSION
$(CABAL) install snap
endif
install-aeson:
ifndef AESON_VERSION
$(CABAL) install aeson
endif
install-deps: install-snap install-aeson
print-versions:
@echo Aeson version: $(AESON_VERSION)
@echo Snap version: $(SNAP_VERSION)
config-dev: install-deps print-versions
$(CABAL) configure
config-prod: install-deps print-versions
$(CABAL) configure -f "-development"
build: clean
$(CABAL) build
prod: config-prod build
dist/build/server/server --port=8888 +RTS -N2
dev: config-dev build
dist/build/server/server --port=8000 +RTS -N2
test: config-prod build
./run-tests
.PHONY: solve
solve: .PHONY
./solve-all-rounds | sort