mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-07 22:04:03 -05:00
Intended to address tau RefID "Gifn1u". There are still a few things that require nightly. - cargo +nightly fmt - fuzzing
42 lines
990 B
Makefile
42 lines
990 B
Makefile
.POSIX:
|
|
|
|
# Install prefix
|
|
PREFIX = $(HOME)/.cargo
|
|
|
|
# Cargo binary
|
|
CARGO = cargo
|
|
|
|
# Compile target
|
|
RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2)
|
|
# Uncomment when doing musl static builds
|
|
#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes
|
|
|
|
SRC = \
|
|
Cargo.toml \
|
|
../../Cargo.toml \
|
|
$(shell find src -type f -name '*.rs') \
|
|
$(shell find ../../src -type f -name '*.rs') \
|
|
|
|
BIN = vanityaddr
|
|
|
|
all: $(BIN)
|
|
|
|
$(BIN): $(SRC)
|
|
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@
|
|
cp -f ../../target/$(RUST_TARGET)/release/$@ $@
|
|
cp -f ../../target/$(RUST_TARGET)/release/$@ ../../$@
|
|
|
|
clean:
|
|
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN)
|
|
rm -f $(BIN) ../../$(BIN)
|
|
|
|
install: all
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN)
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
|
|
|
|
.PHONY: all clean install uninstall
|