aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 72331fabce49c3e90ba8602022fc06c07f13b68a (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 bar -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