]>
Commit | Line | Data |
---|---|---|
1 | configuration = debug | |
2 | build_path = .build | |
3 | ||
4 | # These are used to rename the executable to lrc without renaming the package | |
5 | source_binary_name = lyricli | |
6 | target_binary_name = lrc | |
7 | install_path = /usr/local/bin | |
8 | source_binary_path = $(build_path)/$(configuration)/$(source_binary_name) | |
9 | install_binary_path = $(install_path)/$(target_binary_name) | |
10 | ||
11 | # Default to release configuration on install | |
12 | install: configuration = release | |
13 | ||
14 | default: build | |
15 | ||
16 | build: | |
17 | swift build --build-path $(build_path) --configuration $(configuration) | |
18 | ||
19 | install: build | |
20 | cp $(source_binary_path) $(install_binary_path) | |
21 | ||
22 | test: build | |
23 | swift test | |
24 | ||
25 | lint: | |
26 | cd Sources && swiftlint | |
27 | ||
28 | clean: | |
29 | swift build --clean | |
30 | ||
31 | .PHONY: build install test clean lint |