bin: Enable static compile targets for more bins

This commit is contained in:
parazyd
2023-11-02 15:08:39 +01:00
parent e11470fe02
commit c423816da5
5 changed files with 25 additions and 13 deletions

View File

@@ -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 = \

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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: