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.

56 lines
2.8 KiB

  1. From b8390696d81f66109560d12046bb63b9704e07f3 Mon Sep 17 00:00:00 2001
  2. From: Moritz Warning <moritzwarning@web.de>
  3. Date: Sun, 19 Mar 2017 01:14:10 +0100
  4. Subject: [PATCH 2/2] make natpmp/miniupnpc configurable
  5. also include staging_dir variable in the search paths
  6. ---
  7. make-linux.mk | 32 ++++++++++++++++++--------------
  8. 1 file changed, 18 insertions(+), 14 deletions(-)
  9. diff --git a/make-linux.mk b/make-linux.mk
  10. index 508d8c42..36060857 100644
  11. --- a/make-linux.mk
  12. +++ b/make-linux.mk
  13. @@ -22,20 +22,24 @@ OBJS+=ext/http-parser/http_parser.o
  14. # Auto-detect miniupnpc and nat-pmp as well and use system libs if present,
  15. # otherwise build into binary as done on Mac and Windows.
  16. OBJS+=osdep/PortMapper.o
  17. -DEFS+=-DZT_USE_MINIUPNPC
  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. - LDLIBS+=-lnatpmp
  30. - DEFS+=-DZT_USE_SYSTEM_NATPMP
  31. +
  32. +ifeq ($(ZT_ENABLE_PORTMAPPING),1)
  33. + DEFS+=-DZT_USE_MINIUPNPC
  34. + MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
  35. + ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
  36. + DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
  37. + LDLIBS+=-lminiupnpc
  38. + else
  39. + 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
  40. + 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
  41. + endif
  42. +
  43. + ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
  44. + OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
  45. + else
  46. + LDLIBS+=-lnatpmp
  47. + DEFS+=-DZT_USE_SYSTEM_NATPMP
  48. + endif
  49. endif
  50. ifeq ($(ZT_ENABLE_CLUSTER),1)
  51. --
  52. 2.12.0