diff --git a/Makefile b/Makefile index c6ab18d9d..faa975233 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ CARGO = cargo +nightly # Compile target for system binaries 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" +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes # Binaries to be built BINS = \ diff --git a/bin/darkirc/Makefile b/bin/darkirc/Makefile index d0997ccf8..eeea17883 100644 --- a/bin/darkirc/Makefile +++ b/bin/darkirc/Makefile @@ -6,18 +6,21 @@ PREFIX = $(HOME)/.cargo # Cargo binary CARGO = cargo +nightly +# Compile target +RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) + SRC = \ Cargo.toml \ ../../Cargo.toml \ - $(shell find src -type f) \ - $(shell find ../../src -type f) \ + $(shell find src -type f -name '*.rs') \ + $(shell find ../../src -type f -name '*.rs') \ BIN = ../../darkirc all: $(BIN) $(BIN): $(SRC) - $(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package darkirc + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package darkirc cp -f ../../target/$(RUST_TARGET)/release/darkirc $@ android: diff --git a/bin/lilith/Makefile b/bin/lilith/Makefile index 6f6d51193..64e99e8e8 100644 --- a/bin/lilith/Makefile +++ b/bin/lilith/Makefile @@ -6,18 +6,21 @@ PREFIX = $(HOME)/.cargo # Cargo binary CARGO = cargo +nightly +# Compile target +RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) + SRC = \ Cargo.toml \ ../../Cargo.toml \ - $(shell find src -type f) \ - $(shell find ../../src -type f) \ + $(shell find src -type f -name '*.rs') \ + $(shell find ../../src -type f -name '*.rs') \ BIN = ../../lilith all: $(BIN) $(BIN): $(SRC) - $(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package lilith + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package lilith cp -f ../../target/$(RUST_TARGET)/release/lilith $@ clean: diff --git a/bin/tau/taud/Makefile b/bin/tau/taud/Makefile index fd2d3283c..928b4c3d1 100644 --- a/bin/tau/taud/Makefile +++ b/bin/tau/taud/Makefile @@ -6,18 +6,21 @@ PREFIX = $(HOME)/.cargo # Cargo binary CARGO = cargo +nightly +# Compile target +RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) + SRC = \ Cargo.toml \ ../../../Cargo.toml \ - $(shell find src -type f) \ - $(shell find ../../../src -type f) \ + $(shell find src -type f -name '*.rs') \ + $(shell find ../../../src -type f -name '*.rs') \ BIN = ../../../taud all: $(BIN) $(BIN): $(SRC) - $(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package taud + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package taud cp -f ../../../target/$(RUST_TARGET)/release/taud $@ clean: diff --git a/bin/vanityaddr/Makefile b/bin/vanityaddr/Makefile index 1eb9e8b4c..ac24d9786 100644 --- a/bin/vanityaddr/Makefile +++ b/bin/vanityaddr/Makefile @@ -6,18 +6,21 @@ PREFIX = $(HOME)/.cargo # Cargo binary CARGO = cargo +nightly +# Compile target +RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) + SRC = \ Cargo.toml \ ../../Cargo.toml \ - $(shell find src -type f) \ - $(shell find ../../src -type f) \ + $(shell find src -type f -name '*.rs') \ + $(shell find ../../src -type f -name '*.rs') \ BIN = ../../vanityaddr all: $(BIN) $(BIN): $(SRC) - $(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package vanityaddr + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package vanityaddr cp -f ../../target/$(RUST_TARGET)/release/vanityaddr $@ clean: