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

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

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

.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