-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
60 lines (41 loc) · 1.12 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#/usr/bin/make -f
INSTALL_PROGRAM = install -D -m 0755
INSTALL_DATA = install -D -m 0644
prefix = ${DESTDIR}/usr
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
datarootdir = $(prefix)/share
libdir = $(exec_prefix)/lib
zshcpl = $(datarootdir)/zsh/site-functions
BIN_D := trawld
BIN_C := trawlcat
BIN_DB := trawldb
MESON = meson
all: build
distclean: clean
clean:
-cargo clean
build-arch: build
build-independent: build
binary: build
binary-arch: build
binary-independent: build
build:
cargo build --release
install:
$(INSTALL_PROGRAM) "./target/release/$(BIN_C)" "$(bindir)/$(BIN_C)"
$(INSTALL_PROGRAM) "./target/release/$(BIN_D)" "$(bindir)/$(BIN_D)"
$(INSTALL_PROGRAM) "./target/release/$(BIN_DB)" "$(bindir)/$(BIN_DB)"
$(INSTALL_DATA) "./$(BIN_D).service" "$(libdir)/systemd/user/$(BIN_D).service"
uninstall:
rm -f "$(bindir)/$(BIN_C)"
rm -f "$(bindir)/$(BIN_D)"
rm -f "$(bindir)/$(BIN_DB)"
rm -f "$(libdir)/systemd/user/$(BIN_D).service"
run-test:
cargo test -- --test-threads=1
code-coverage:
cargo build --bin $(BIN_D)
cargo targe/debug/$(BIN_D) &
cargo tarpaulin -b -- --test-threads 1
killall $(BIN_D)