summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-01-26 15:02:03 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-01-26 15:02:03 -0800
commit967ce78a571d3fe1193436c4c77a8ada423ea3c1 (patch)
treeb7a010e067414aeb96cf1bf797c1191c12ec27fa
parent902e03bccc105d96e34c938d2df5fc54f9ea66ff (diff)
downloadinfinitytier-967ce78a571d3fe1193436c4c77a8ada423ea3c1.tar.gz
infinitytier-967ce78a571d3fe1193436c4c77a8ada423ea3c1.zip
Add static build option so we can build a static Linux binary for ancient distros (wheezy, etc.)
-rw-r--r--make1
-rw-r--r--make-linux.mk5
2 files changed, 6 insertions, 0 deletions
diff --git a/make b/make
new file mode 100644
index 00000000..33d39bf8
--- /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 9a37856e..8ee0f88c 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