aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: b41fa0eb14f7cf9afb17afbccfcd0def9e568ea7 (plain) (blame)
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
PREFIX ?= $(HOME)/.local

.PHONY: build
build: .build/release/bar

.build/release/bar:
	swift build -c release

.PHONY: run
run:
	swift run menu -c debug

.PHONY: clean
clean:
	@rm -rf .build .docc-build .docs

.PHONY: install
install: build
	@install -d $(PREFIX)/bin/
	@install -Dm755 .build/release/bar $(PREFIX)/bin/

.PHONY: uninstall
uninstall:
	@rm -f $(PREFIX)/bin/bar

.PHONY: docs
docs: .build/release/bar
	@$(MAKE) -C Sources/bar/bar.docc build

.PHONY: docs-preview
docs-preview: .build/release/bar
	@$(MAKE) -C Sources/bar/bar.docc preview