mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
54 lines
1.0 KiB
Makefile
54 lines
1.0 KiB
Makefile
.POSIX:
|
|
|
|
# Install prefix
|
|
PREFIX = /usr/local
|
|
|
|
# Cargo binary
|
|
CARGO = cargo
|
|
|
|
# Binaries to be built
|
|
BINS = drk darkfid gatewayd zkas
|
|
|
|
# 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 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
|