From 967ce78a571d3fe1193436c4c77a8ada423ea3c1 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 26 Jan 2017 15:02:03 -0800 Subject: [PATCH] Add static build option so we can build a static Linux binary for ancient distros (wheezy, etc.) --- make | 1 + make-linux.mk | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 make diff --git a/make b/make new file mode 100644 index 000000000..33d39bf89 --- /dev/null +++ b/make @@ -0,0 +1 @@ +kqq \ No newline at end of file diff --git a/make-linux.mk b/make-linux.mk index 9a37856e9..8ee0f88c2 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -100,6 +100,11 @@ ifeq ($(CC_MACH),aarch64) endif DEFS+=-DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=$(ZT_ARCHITECTURE) -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" +# Define this to build a static binary, which is needed to make this runnable on a few ancient Linux distros +ifeq ($(ZT_STATIC),1) + override LDFLAGS+=-static +endif + all: one one: $(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o osdep/LinuxDropPrivileges.o