mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-18 20:47:53 +00:00
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)
This commit is contained in:
parent
65b7893a8a
commit
fd81a7fe63
@ -6,7 +6,7 @@ DEFS=
|
||||
LIBS=
|
||||
|
||||
include objects.mk
|
||||
OBJS+=osdep/BSDEthernetTap.o
|
||||
OBJS+=osdep/BSDEthernetTap.o ext/lz4/lz4.o ext/json-parser/json.o ext/http-parser/http_parser.o
|
||||
|
||||
# "make official" is a shortcut for this
|
||||
ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
||||
|
@ -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
|
||||
|
@ -11,7 +11,7 @@ LIBS=
|
||||
ARCH_FLAGS=-arch x86_64
|
||||
|
||||
include objects.mk
|
||||
OBJS+=osdep/OSXEthernetTap.o
|
||||
OBJS+=osdep/OSXEthernetTap.o ext/lz4/lz4.o ext/json-parser/json.o ext/http-parser/http_parser.o
|
||||
|
||||
# Disable codesign since open source users will not have ZeroTier's certs
|
||||
CODESIGN=echo
|
||||
|
@ -1,7 +1,4 @@
|
||||
OBJS=\
|
||||
ext/lz4/lz4.o \
|
||||
ext/json-parser/json.o \
|
||||
ext/http-parser/http_parser.o \
|
||||
node/C25519.o \
|
||||
node/CertificateOfMembership.o \
|
||||
node/Cluster.o \
|
||||
|
Loading…
Reference in New Issue
Block a user