You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.5 KiB

  1. From 61b69f74fecf3c34c0fd2003897c92790ca5a9f5 Mon Sep 17 00:00:00 2001
  2. From: Moritz Warning <moritzwarning@web.de>
  3. Date: Thu, 4 May 2017 22:13:55 +0200
  4. Subject: [PATCH 1/2] use external libminiupnpc and libnatpmp
  5. ---
  6. make-linux.mk | 20 ++++++++++----------
  7. 1 file changed, 10 insertions(+), 10 deletions(-)
  8. diff --git a/make-linux.mk b/make-linux.mk
  9. index 87d29af..f5b3d8d 100644
  10. --- a/make-linux.mk
  11. +++ b/make-linux.mk
  12. @@ -22,20 +22,20 @@ OBJS+=ext/http-parser/http_parser.o
  13. # otherwise build into binary as done on Mac and Windows.
  14. OBJS+=osdep/PortMapper.o
  15. DEFS+=-DZT_USE_MINIUPNPC
  16. -MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
  17. -ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
  18. +#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
  19. +#ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
  20. DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
  21. LDLIBS+=-lminiupnpc
  22. -else
  23. - DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
  24. - OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
  25. -endif
  26. -ifeq ($(wildcard /usr/include/natpmp.h),)
  27. - OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
  28. -else
  29. +#else
  30. +# DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
  31. +# OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
  32. +#endif
  33. +#ifeq ($(wildcard /usr/include/natpmp.h),)
  34. +# OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
  35. +#else
  36. LDLIBS+=-lnatpmp
  37. DEFS+=-DZT_USE_SYSTEM_NATPMP
  38. -endif
  39. +#endif
  40. ifeq ($(ZT_ENABLE_CLUSTER),1)
  41. DEFS+=-DZT_ENABLE_CLUSTER
  42. --
  43. 2.1.4