Skip to content

Commit

Permalink
Allow to specify a target in the Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
breard-r committed Oct 10, 2020
1 parent 41d343e commit 8267490
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- In the configuration, `root_certificates` has been added to the `global` and `endpoint` sections as an array of strings representing the path to root certificate files.
- At compilation, it is now possible to statically link OpenSSL using the `openssl_vendored` feature.

- In the Makefile, it is now possible to specify which target triple to build for.

## [0.12.0] - 2020-09-26

Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DATADIR = $(DATAROOTDIR)
MAN5DIR = $(DATADIR)/man/man5
MAN8DIR = $(DATADIR)/man/man8
SYSCONFDIR = /etc
TARGET_DIR = ./target/release
TARGET_DIR = ./target/$(TARGET)/release
MAN_SRC_DIR = ./man/en
MAN_DST_DIR = $(TARGET_DIR)/man

Expand All @@ -18,11 +18,19 @@ update:
cargo update

acmed:
cargo build --release --manifest-path "acmed/Cargo.toml" --no-default-features --features "$(FEATURES)"
if test -n "$(TARGET)"; then \
cargo build --release --manifest-path "acmed/Cargo.toml" --no-default-features --features "$(FEATURES)" --target "$(TARGET)"; \
else \
cargo build --release --manifest-path "acmed/Cargo.toml" --no-default-features --features "$(FEATURES)"; \
fi
strip "$(TARGET_DIR)/acmed"

tacd:
cargo build --release --manifest-path "tacd/Cargo.toml" --no-default-features --features "$(FEATURES)"
if test -n "$(TARGET)"; then \
cargo build --release --manifest-path "tacd/Cargo.toml" --no-default-features --features "$(FEATURES)" --target "$(TARGET)"; \
else \
cargo build --release --manifest-path "tacd/Cargo.toml" --no-default-features --features "$(FEATURES)"; \
fi
strip "$(TARGET_DIR)/tacd"

man:
Expand Down

0 comments on commit 8267490

Please sign in to comment.