mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-05 20:41:44 -07:00
allow debug & release builds of Rust
This commit is contained in:
parent
0ab5cce878
commit
1375e3e2f5
2 changed files with 18 additions and 6 deletions
10
make-mac.mk
10
make-mac.mk
|
@ -75,6 +75,8 @@ ifeq ($(ZT_DEBUG),1)
|
|||
ARCH_FLAGS=
|
||||
CFLAGS+=-Wall -g $(INCLUDES) $(DEFS) $(ARCH_FLAGS)
|
||||
STRIP=echo
|
||||
RUSTFLAGS=
|
||||
RUST_VARIANT=debug
|
||||
# The following line enables optimization for the crypto code, since
|
||||
# C25519 in particular is almost UNUSABLE in heavy testing without it.
|
||||
node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g $(INCLUDES) $(DEFS)
|
||||
|
@ -82,6 +84,8 @@ else
|
|||
CFLAGS?=-Ofast -fstack-protector-strong
|
||||
CFLAGS+=$(ARCH_FLAGS) -Wall -flto -fPIE -mmacosx-version-min=$(MACOS_VERSION_MIN) -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
|
||||
STRIP=strip
|
||||
RUSTFLAGS=--release
|
||||
RUST_VARIANT=release
|
||||
endif
|
||||
|
||||
ifeq ($(ZT_TRACE),1)
|
||||
|
@ -117,9 +121,9 @@ zerotier-one: one
|
|||
zeroidc: zeroidc/target/libzeroidc.a
|
||||
|
||||
zeroidc/target/libzeroidc.a: FORCE
|
||||
cd zeroidc && MACOSX_DEPLOYMENT_TARGET=$(MACOS_VERSION_MIN) cargo build --target=x86_64-apple-darwin --release
|
||||
cd zeroidc && MACOSX_DEPLOYMENT_TARGET=$(MACOS_VERSION_MIN) cargo build --target=aarch64-apple-darwin --release
|
||||
cd zeroidc && lipo -create target/x86_64-apple-darwin/release/libzeroidc.a target/aarch64-apple-darwin/release/libzeroidc.a -output target/libzeroidc.a
|
||||
cd zeroidc && MACOSX_DEPLOYMENT_TARGET=$(MACOS_VERSION_MIN) cargo build --target=x86_64-apple-darwin $(RUSTFLAGS)
|
||||
cd zeroidc && MACOSX_DEPLOYMENT_TARGET=$(MACOS_VERSION_MIN) cargo build --target=aarch64-apple-darwin $(RUSTFLAGS)
|
||||
cd zeroidc && lipo -create target/x86_64-apple-darwin/$(RUST_VARIANT)/libzeroidc.a target/aarch64-apple-darwin/$(RUST_VARIANT)/libzeroidc.a -output target/libzeroidc.a
|
||||
|
||||
central-controller:
|
||||
make ARCH_FLAGS="-arch x86_64" ZT_CONTROLLER=1 one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue