summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-16 18:33:52 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-16 18:33:52 -0800
commitdc8edea0c62a39b147c12a037f42df3cabc232c4 (patch)
tree155b7a63778c7e89e2f7f71310a560ac7b841b74
parentcf6164e8477aaa65edd07d136ef1991288feff99 (diff)
downloadinfinitytier-dc8edea0c62a39b147c12a037f42df3cabc232c4.tar.gz
infinitytier-dc8edea0c62a39b147c12a037f42df3cabc232c4.zip
Linux make rules to make libminiupnpc from source.
-rw-r--r--make-linux.mk22
1 files changed, 5 insertions, 17 deletions
diff --git a/make-linux.mk b/make-linux.mk
index 339b548d..d4414e38 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -43,23 +43,7 @@ endif
ifeq ($(ZT_USE_MINIUPNPC),1)
DEFS+=-DZT_USE_MINIUPNPC
-ifeq ($(UNAME_M),armv6l)
- MINIUPNPC_LIB=ext/bin/miniupnpc/linux-arm32/libminiupnpc.a
-endif
-ifeq ($(UNAME_M),armv7l)
- MINIUPNPC_LIB=ext/bin/miniupnpc/linux-arm32/libminiupnpc.a
-endif
-ifeq ($(UNAME_M),x86_64)
- MINIUPNPC_LIB=ext/bin/miniupnpc/linux-x64/libminiupnpc.a
-endif
-ifeq ($(UNAME_M),i386)
- MINIUPNPC_LIB=ext/bin/miniupnpc/linux-x86/libminiupnpc.a
-endif
-ifeq ($(UNAME_M),i686)
- MINIUPNPC_LIB=ext/bin/miniupnpc/linux-x86/libminiupnpc.a
-endif
- MINIUPNPC_LIB?=-lminiupnpc
- LDLIBS+=$(MINIUPNPC_LIB)
+ LDLIBS+=ext/miniupnpc/libminiupnpc.a
OBJS+=osdep/UPNPClient.o
endif
@@ -106,6 +90,9 @@ endif
all: one
one: $(OBJS) one.o
+ifeq ($(ZT_USE_MINIUPNPC),1)
+ cd ext/miniupnpc ; make clean ; make 'CFLAGS=-O2 -fstack-protector -fPIE -fno-common -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600' -j 2 libminiupnpc.a
+endif
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-one $(OBJS) one.o $(LDLIBS)
$(STRIP) zerotier-one
ln -sf zerotier-one zerotier-idtool
@@ -120,6 +107,7 @@ installer: one FORCE
clean:
rm -rf *.o node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o zerotier-one zerotier-idtool zerotier-cli zerotier-selftest build-* ZeroTierOneInstaller-* *.deb *.rpm
+ cd ext/miniupnpc ; make clean
debug: FORCE
make ZT_DEBUG=1 one