-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
41 lines (32 loc) · 1 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
.PHONY: all release build test profile clean help
all: release
build: ## development build
@nim c src/ll.nim
test: ## run test suite
@nimble -y test --verbose
profile: ## run profiler
@nimble profile
release: ## release build, optimised for speed
@nimble -y build \
-d:release \
--gc:arc \
--deepCopy:on \
--nilseqs:on \
--verbose \
--opt:speed \
# --passC:-Ofast \
# --threads:off \
# --threadanalysis:off
install: release ## create a release build and install to /usr/local/bin
@mv ./ll /usr/local/bin/ll
clean: ## remove build artefacts
@find . -type d -iname 'nimcache' | xargs rm -rf
@rm -f ll
@rm -f src/ll
help: ## display this help
@echo "Options:"
@grep -E '^[a-zA-Z%_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'
@grep -E '^[a-zA-Z%_-]+:.*?##@deprecated.*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?##@deprecated "}; {printf " \033[31m%-18s\033[0m [deprecated] %s\n", $$1, $$2}'
# catch-all
%:
@: