forked from darkrenaissance/darkfi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (40 loc) · 1.07 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
.POSIX:
# Install prefix
PREFIX = /usr/local
# Cargo binary
CARGO = cargo
# Binaries to be built
BINS = drk darkfid gatewayd
# Common dependencies which should force the binaries to be rebuilt
BINDEPS = \
Cargo.toml \
$(shell find bin/*/src -type f) \
$(shell find bin -type f -name '*.toml') \
$(shell find zkas -type f) \
$(shell find src -type f) \
$(shell find sql -type f) \
$(shell find contrib/token -type f)
all: $(BINS)
$(BINS): $(BINDEPS)
$(CARGO) build --all-features --release --package $@
cp -f target/release/$@ $@
check:
$(CARGO) hack check --release --feature-powerset --all
fix:
$(CARGO) clippy --release --all-features --fix --allow-dirty --all
clippy:
$(CARGO) clippy --release --all-features --all
test:
$(CARGO) test --release --all-features --all
$(CARGO) run --release --features=node --example tx
clean:
rm -f $(BINS)
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f $(BINS) $(DESTDIR)$(PREFIX)/bin
uninstall:
for i in $(BINS); \
do \
rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
done;
.PHONY: all check fix clippy test clean install uninstall