35 lines
698 B
Makefile
35 lines
698 B
Makefile
.PHONY: default all install watch clean build release distclean
|
|
default: all
|
|
|
|
all: build
|
|
|
|
build: builddir build/bin/annotator
|
|
|
|
GHCFLAGS = -iapp -isrc -Wall -O2 -outputdir build/.obj
|
|
DESTDIR = ~/.local
|
|
BINDIR = ${DESTDIR}/bin
|
|
DOCDIR = ${DESTDIR}/share/doc/annotator
|
|
|
|
builddir:
|
|
mkdir -p build/bin build/.obj
|
|
|
|
build/bin/annotator: app/Main.hs src/*.hs
|
|
ghc --make $(GHCFLAGS) $< -o $@
|
|
|
|
watch:
|
|
@git ls-files src app Makefile | entr make -s build install
|
|
|
|
clean:
|
|
@rm -rf build
|
|
@find . -name "*.hi" -delete
|
|
@find . -name "*.fix" -delete
|
|
|
|
distclean: clean
|
|
@rm -rf dist
|
|
|
|
install: build/bin/annotator
|
|
@install -D -t ${BINDIR} $<
|
|
@install -D -t ${DOCDIR} README.md
|
|
|
|
release: script/make-release
|
|
@$<
|