aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/makefile.linux-mingw5
-rw-r--r--src/makefile.mingw5
-rw-r--r--src/makefile.osx5
3 files changed, 12 insertions, 3 deletions
diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw
index 174d0eee1b..059504b80f 100644
--- a/src/makefile.linux-mingw
+++ b/src/makefile.linux-mingw
@@ -35,7 +35,10 @@ CFLAGS=-O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(D
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
-ifdef USE_UPNP
+ifndef USE_UPNP
+ override USE_UPNP = -
+endif
+ifneq (${USE_UPNP}, -)
LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
LIBS += -l miniupnpc -l iphlpapi
DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
diff --git a/src/makefile.mingw b/src/makefile.mingw
index 22dc4801c1..0bde965e1a 100644
--- a/src/makefile.mingw
+++ b/src/makefile.mingw
@@ -30,7 +30,10 @@ CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-par
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
-ifdef USE_UPNP
+ifndef USE_UPNP
+ override USE_UPNP = -
+endif
+ifneq (${USE_UPNP}, -)
INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
LIBS += -l miniupnpc -l iphlpapi
diff --git a/src/makefile.osx b/src/makefile.osx
index ef193337f2..d4109b9416 100644
--- a/src/makefile.osx
+++ b/src/makefile.osx
@@ -97,7 +97,10 @@ OBJS= \
obj/walletdb.o \
obj/noui.o
-ifdef USE_UPNP
+ifndef USE_UPNP
+ override USE_UPNP = -
+endif
+ifneq (${USE_UPNP}, -)
DEFS += -DUSE_UPNP=$(USE_UPNP)
ifdef STATIC
LIBS += $(DEPSDIR)/lib/libminiupnpc.a