forked from darkrenaissance/darkfi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (48 loc) · 1.35 KB
/
Copy pathMakefile
File metadata and controls
63 lines (48 loc) · 1.35 KB
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
.POSIX:
PREFIX = /usr/local
DLURL = https://testnet.cashier.dark.fi
CARGO = cargo
DLTOOL = wget -nv --show-progress -O-
#DLTOOL = curl
# Here it's possible to append "cashierd" and "gatewayd".
BINS = drk darkfid
# Dependencies which should force the binaries to be rebuilt
BINDEPS = \
Cargo.toml \
$(shell find src -type f) \
$(shell find token -type f) \
$(shell find sql -type f)
all: $(BINS) mint.params spend.params
$(BINS): $(BINDEPS)
$(CARGO) build --release --all-features --bin $@
cp target/release/$@ $@
%.params:
$(DLTOOL) $(DLURL)/$@ > $@
test:
$(CARGO) test --release --all-features
fix:
$(CARGO) fix --release --all-features --allow-dirty
clippy:
$(CARGO) clippy --release --all-features
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(PREFIX)/share/darkfi
mkdir -p $(DESTDIR)$(PREFIX)/share/doc/darkfi
cp -f $(BINS) $(DESTDIR)$(PREFIX)/bin
for i in $(BINS); \
do \
cp -f example/config/$$i.toml $(DESTDIR)$(PREFIX)/share/doc/darkfi; \
done;
cp -f mint.params spend.params $(DESTDIR)$(PREFIX)/share/darkfi
uninstall:
for i in $(BINS); \
do \
rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
done;
rm -rf $(DESTDIR)$(PREFIX)/share/doc/darkfi
rm -rf $(DESTDIR)$(PREFIX)/share/darkfi
clean:
rm -f $(BINS) mint.params spend.params
distclean: clean
rm -rf target
.PHONY: all test fix clippy install uninstall clean distclean