This repository was archived by the owner on Dec 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 11target
2+ /rust- * .tar.gz
Original file line number Diff line number Diff line change 1+ RUST_VERSION = 1.16.0
2+ DOCKER_IMAGE = alexcrichton/rust-slave-dist:2015-10-20b
3+ RUST_TARBALL = rust-$(RUST_VERSION ) -x86_64-unknown-linux-gnu.tar.gz
4+ RUST_SOURCE = https://static.rust-lang.org/dist/$(RUST_TARBALL )
5+
6+ ifeq ($(shell uname -s) ,Darwin)
7+ all : linux darwin
8+
9+ darwin : target/x86_64-apple-darwin/release/linkerd-tcp
10+
11+ target/x86_64-apple-darwin/release/linkerd-tcp :
12+ cargo build --release --verbose --target=x86_64-apple-darwin
13+
14+ else
15+ all : linux
16+ endif
17+
18+ linux : $(RUST_TARBALL ) target/x86_64-unknown-linux-gnu/release/linkerd-tcp
19+
20+ $(RUST_TARBALL ) :
21+ curl -L -o $(RUST_TARBALL ) $(RUST_SOURCE )
22+
23+ target/x86_64-unknown-linux-gnu/release/linkerd-tcp : $(RUST_TARBALL )
24+ docker pull $(DOCKER_IMAGE )
25+ @docker run \
26+ --rm -v $(shell pwd) :/rust/app \
27+ -u root \
28+ -w /rust/app \
29+ --entrypoint =/bin/bash \
30+ $(DOCKER_IMAGE ) \
31+ -exc "cd /tmp && \
32+ (gzip -dc /rust/app/$(RUST_TARBALL ) | tar xf -) && \
33+ ./rust-$(RUST_VERSION ) -x86_64-unknown-linux-gnu/install.sh --without=rust-docs && \
34+ cd /rust/app && \
35+ cargo build --release --verbose --target=x86_64-unknown-linux-gnu"
36+
37+ clean :
38+ -rm -rf target
39+
40+ distclean : clean
41+ -rm -f $(RUST_TARBALL )
Original file line number Diff line number Diff line change @@ -99,6 +99,18 @@ Try running the image with:
9999docker run -v ` pwd`/example.yml:/example.yml linkerd/linkerd-tcp:latest /example.yml
100100```
101101
102+ To build linkerd/linkerd-tcp stand-alone binaries for Linux (requires docker), run:
103+
104+ ``` bash
105+ make linux
106+ ```
107+
108+ To build linkerd/linkerd-tcp stand-alone binaries for macOS (requires macOS host), run:
109+
110+ ``` bash
111+ make darwin
112+ ```
113+
102114## License ##
103115
104116Copyright 2017, Buoyant Inc. All rights reserved.
You can’t perform that action at this time.
0 commit comments