summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: d7ece7f76f3735d9c9922f05c6257603ca68112f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.PHONY: _default
_default: ghci

.PHONY: clean
clean:
	@find * -type f \( -name \*.o -o -name \*.hi \) -exec rm -v \{\} \;

.PHONY: ghci
ghci: shell.nix
	nix-shell --argstr compiler ghc801 --command 'exec ghci -Wall -fobject-code -isrc'

.PHONY: install
install:
	$(error to install run "make result && nix-env -i ./result")

.PHONY: result
result: shell.nix
	nix-build ./shell.nix

shell.nix: $(wildcard *.cabal)
	cabal2nix --shell . > $@