|
@@ -41,12 +41,6 @@ else
|
|
override DEFS+=-DZT_USE_SYSTEM_NATPMP
|
|
override DEFS+=-DZT_USE_SYSTEM_NATPMP
|
|
endif
|
|
endif
|
|
|
|
|
|
-ifeq ($(ZT_DEBUG),1)
|
|
|
|
- LDLIBS+=zeroidc/target/debug/libzeroidc.a -ldl -lssl -lcrypto
|
|
|
|
-else
|
|
|
|
- LDLIBS+=zeroidc/target/release/libzeroidc.a -ldl -lssl -lcrypto
|
|
|
|
-endif
|
|
|
|
-
|
|
|
|
# Use bundled http-parser since distribution versions are NOT API-stable or compatible!
|
|
# Use bundled http-parser since distribution versions are NOT API-stable or compatible!
|
|
# Trying to use dynamically linked libhttp-parser causes tons of compatibility problems.
|
|
# Trying to use dynamically linked libhttp-parser causes tons of compatibility problems.
|
|
ONE_OBJS+=ext/http-parser/http_parser.o
|
|
ONE_OBJS+=ext/http-parser/http_parser.o
|
|
@@ -122,6 +116,7 @@ ifeq ($(CC_MACH),x86_64)
|
|
ZT_USE_X64_ASM_ED25519=1
|
|
ZT_USE_X64_ASM_ED25519=1
|
|
override CFLAGS+=-msse -msse2
|
|
override CFLAGS+=-msse -msse2
|
|
override CXXFLAGS+=-msse -msse2
|
|
override CXXFLAGS+=-msse -msse2
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),amd64)
|
|
ifeq ($(CC_MACH),amd64)
|
|
ZT_ARCHITECTURE=2
|
|
ZT_ARCHITECTURE=2
|
|
@@ -129,6 +124,7 @@ ifeq ($(CC_MACH),amd64)
|
|
ZT_USE_X64_ASM_ED25519=1
|
|
ZT_USE_X64_ASM_ED25519=1
|
|
override CFLAGS+=-msse -msse2
|
|
override CFLAGS+=-msse -msse2
|
|
override CXXFLAGS+=-msse -msse2
|
|
override CXXFLAGS+=-msse -msse2
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),powerpc64le)
|
|
ifeq ($(CC_MACH),powerpc64le)
|
|
ZT_ARCHITECTURE=8
|
|
ZT_ARCHITECTURE=8
|
|
@@ -150,15 +146,19 @@ ifeq ($(CC_MACH),e2k)
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),i386)
|
|
ifeq ($(CC_MACH),i386)
|
|
ZT_ARCHITECTURE=1
|
|
ZT_ARCHITECTURE=1
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),i486)
|
|
ifeq ($(CC_MACH),i486)
|
|
ZT_ARCHITECTURE=1
|
|
ZT_ARCHITECTURE=1
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),i586)
|
|
ifeq ($(CC_MACH),i586)
|
|
ZT_ARCHITECTURE=1
|
|
ZT_ARCHITECTURE=1
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),i686)
|
|
ifeq ($(CC_MACH),i686)
|
|
ZT_ARCHITECTURE=1
|
|
ZT_ARCHITECTURE=1
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),arm)
|
|
ifeq ($(CC_MACH),arm)
|
|
ZT_ARCHITECTURE=3
|
|
ZT_ARCHITECTURE=3
|
|
@@ -174,6 +174,7 @@ ifeq ($(CC_MACH),armhf)
|
|
ZT_ARCHITECTURE=3
|
|
ZT_ARCHITECTURE=3
|
|
override DEFS+=-DZT_NO_TYPE_PUNNING
|
|
override DEFS+=-DZT_NO_TYPE_PUNNING
|
|
ZT_USE_ARM32_NEON_ASM_CRYPTO=1
|
|
ZT_USE_ARM32_NEON_ASM_CRYPTO=1
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),armv6)
|
|
ifeq ($(CC_MACH),armv6)
|
|
ZT_ARCHITECTURE=3
|
|
ZT_ARCHITECTURE=3
|
|
@@ -217,10 +218,12 @@ ifeq ($(CC_MACH),armv7ve)
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),arm64)
|
|
ifeq ($(CC_MACH),arm64)
|
|
ZT_ARCHITECTURE=4
|
|
ZT_ARCHITECTURE=4
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
override DEFS+=-DZT_NO_TYPE_PUNNING -DZT_ARCH_ARM_HAS_NEON -march=armv8-a+crypto -mtune=generic -mstrict-align
|
|
override DEFS+=-DZT_NO_TYPE_PUNNING -DZT_ARCH_ARM_HAS_NEON -march=armv8-a+crypto -mtune=generic -mstrict-align
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),aarch64)
|
|
ifeq ($(CC_MACH),aarch64)
|
|
ZT_ARCHITECTURE=4
|
|
ZT_ARCHITECTURE=4
|
|
|
|
+ ZT_SSO_SUPPORTED=1
|
|
override DEFS+=-DZT_NO_TYPE_PUNNING -DZT_ARCH_ARM_HAS_NEON -march=armv8-a+crypto -mtune=generic -mstrict-align
|
|
override DEFS+=-DZT_NO_TYPE_PUNNING -DZT_ARCH_ARM_HAS_NEON -march=armv8-a+crypto -mtune=generic -mstrict-align
|
|
endif
|
|
endif
|
|
ifeq ($(CC_MACH),mipsel)
|
|
ifeq ($(CC_MACH),mipsel)
|
|
@@ -263,6 +266,14 @@ ifeq ($(ZT_IA32),1)
|
|
ZT_USE_X64_ASM_ED25519=0
|
|
ZT_USE_X64_ASM_ED25519=0
|
|
endif
|
|
endif
|
|
|
|
|
|
|
|
+ifeq ($(ZT_SSO_SUPPORTED), 1)
|
|
|
|
+ ifeq ($(ZT_DEBUG),1)
|
|
|
|
+ LDLIBS+=zeroidc/target/debug/libzeroidc.a -ldl -lssl -lcrypto
|
|
|
|
+ else
|
|
|
|
+ LDLIBS+=zeroidc/target/release/libzeroidc.a -ldl -lssl -lcrypto
|
|
|
|
+ endif
|
|
|
|
+endif
|
|
|
|
+
|
|
# Disable software updates by default on Linux since that is normally done with package management
|
|
# Disable software updates by default on Linux since that is normally done with package management
|
|
override DEFS+=-DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=$(ZT_ARCHITECTURE) -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\""
|
|
override DEFS+=-DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=$(ZT_ARCHITECTURE) -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\""
|
|
|
|
|
|
@@ -371,8 +382,12 @@ debug: FORCE
|
|
make ZT_DEBUG=1 one
|
|
make ZT_DEBUG=1 one
|
|
make ZT_DEBUG=1 selftest
|
|
make ZT_DEBUG=1 selftest
|
|
|
|
|
|
|
|
+ifeq ($(ZT_SSO_SUPPORTED), 1)
|
|
zeroidc: FORCE
|
|
zeroidc: FORCE
|
|
export PATH=/root/.cargo/bin:$$PATH; cd zeroidc && cargo build -j1 $(RUSTFLAGS)
|
|
export PATH=/root/.cargo/bin:$$PATH; cd zeroidc && cargo build -j1 $(RUSTFLAGS)
|
|
|
|
+else
|
|
|
|
+zeroidc:
|
|
|
|
+endif
|
|
|
|
|
|
# Note: keep the symlinks in /var/lib/zerotier-one to the binaries since these
|
|
# Note: keep the symlinks in /var/lib/zerotier-one to the binaries since these
|
|
# provide backward compatibility with old releases where the binaries actually
|
|
# provide backward compatibility with old releases where the binaries actually
|