-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (50 loc) · 1003 Bytes
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
##
# pmm
#
# @file
# @version 0.5.1
SRC = *.nim
SRCDIR = src
BIN = pmm
MAN = pmm.1
PREFIX := /usr/local
DESTDIR :=
.PHONY: default
default: release
.PHONY: all
all: pretty release man docs
.PHONY: release
release:
nimble build '--cc:clang -d:release --opt:size -d:strip --experimental:strictEffects --panics:on' -y
.PHONY: static
static:
nimble build '--cc:clang -d:release --passL:-static --opt:size -d:strip --experimental:strictEffects --panics:on' -y
.PHONY: debug
debug:
nimble build '--cc:clang --experimental:strictEffects --panics:on' --verbose
.PHONY: clean
clean:
rm -f ./${BIN}
.PHONY: run
run:
./${BIN}
.PHONY: docs
docs:
nimble doc ${SRCDIR}/${SRC}
.PHONY: pretty
pretty:
nimpretty ${SRCDIR}/${SRC}
.PHONY: test
test:
nimble test
.PHONY: install
install:
install -Dm 755 ${MAN} $(DESTDIR)$(PREFIX)/man/${MAN}
install -Dm 755 ${BIN} $(DESTDIR)$(PREFIX)/bin/${BIN}
.PHONY: man
man:
pandoc pmm.1.md -s -t man -o pmm.1
.PHONY: testman
testman: man
man ./${MAN}
# end