summaryrefslogtreecommitdiff
path: root/make-linux.mk
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-01 21:55:48 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-01 21:55:48 -0700
commitfd81a7fe637a1499eec443364cd6566c0c4265e3 (patch)
treeea599a2bbc8cba3168b238f0a5bb21f2683b4ef3 /make-linux.mk
parent65b7893a8a1bffa454376d851e4a43a4cd9b8519 (diff)
downloadinfinitytier-fd81a7fe637a1499eec443364cd6566c0c4265e3.tar.gz
infinitytier-fd81a7fe637a1499eec443364cd6566c0c4265e3.zip
On Linux auto-detect presence of http-parser and lz4 and link against system libs instead of ext/ builtins (for RPM and DEB packaging effort)
Diffstat (limited to 'make-linux.mk')
-rw-r--r--make-linux.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/make-linux.mk b/make-linux.mk
index 3ead1be2..9ab2ee8e 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -38,6 +38,19 @@ LDLIBS?=
include objects.mk
+# On Linux we auto-detect the presence of some libraries
+ifeq ($(wildcard /usr/include/lz4.h),)
+ OBJS+=ext/lz4/lz4.o
+else
+ LDLIBS+=-llz4
+endif
+ifeq ($(wildcard /usr/include/http_parser.h),)
+ OBJS+=ext/http-parser/http_parser.o
+else
+ LDLIBS+=-lhttp_parser
+endif
+OBJS+=ext/json-parser/json.o
+
ifeq ($(ZT_OFFICIAL_RELEASE),1)
DEFS+=-DZT_OFFICIAL_RELEASE
ZT_USE_MINIUPNPC=1