aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2011-07-05 10:10:26 -0700
committerJeff Garzik <jgarzik@exmulti.com>2011-07-05 10:10:26 -0700
commitbb0d9ce2264c3b50d11850491c800654abffa1a5 (patch)
tree18a1a0375e7d98ab7ff0bc9ce30c56a98e0ffdaa
parent9390431ce49893cbdf23846edb4bdf72b3d4e830 (diff)
parent09923991e58e3c7f92cbcf1a7cf89a8bd5304d15 (diff)
Merge pull request #384 from TheBlueMatt/upnp
Fix UPnP building, entirely my fault.
-rw-r--r--contrib/gitian-win32.yml3
-rw-r--r--contrib/gitian.yml5
-rw-r--r--src/makefile.mingw24
-rw-r--r--src/makefile.osx17
-rw-r--r--src/makefile.unix17
5 files changed, 25 insertions, 41 deletions
diff --git a/contrib/gitian-win32.yml b/contrib/gitian-win32.yml
index 0c804af3d1..07d31c717e 100644
--- a/contrib/gitian-win32.yml
+++ b/contrib/gitian-win32.yml
@@ -74,7 +74,8 @@ script: |
cd src
sed 's/$(DEBUGFLAGS)//' < makefile.linux-mingw > makefile.linux-mingw.2 && mv makefile.linux-mingw.2 makefile.linux-mingw
sed 's|//#include <WSPiApi.h>|#include <WSPiApi.h>|' < net.cpp > net.cpp.2 && mv net.cpp.2 net.cpp
- make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe bitcoind.exe
+ make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe USE_UPNP=1
+ make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0
i586-mingw32msvc-strip bitcoin.exe
i586-mingw32msvc-strip bitcoind.exe
makensis ../share/setup.nsi
diff --git a/contrib/gitian.yml b/contrib/gitian.yml
index cff4cce22b..90be8934fa 100644
--- a/contrib/gitian.yml
+++ b/contrib/gitian.yml
@@ -6,7 +6,7 @@ architectures:
- "i386"
- "amd64"
packages:
-- "libdb4.7++-dev
+- "libdb4.7++-dev"
- "libxxf86vm-dev"
- "libgtk2.0-dev"
- "libboost-all-dev"
@@ -51,6 +51,7 @@ script: |
cp $OUTDIR/src/COPYING $OUTDIR
cd src
sed 's/$(DEBUGFLAGS)//' < makefile.unix > makefile.unix.2 && mv makefile.unix.2 makefile.unix
- PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoin bitcoind
+ PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoin USE_UPNP=1
+ PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoind USE_UPNP=0
mkdir -p $OUTDIR/bin/$GBUILD_BITS
install -s bitcoin bitcoind $OUTDIR/bin/$GBUILD_BITS
diff --git a/src/makefile.mingw b/src/makefile.mingw
index 994f47c825..507833be48 100644
--- a/src/makefile.mingw
+++ b/src/makefile.mingw
@@ -2,6 +2,8 @@
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+USE_UPNP:=0
+
INCLUDEPATHS= \
-I"C:\boost-1.43.0-mgw" \
-I"C:\db-4.7.25.NC-mgw\build_unix" \
@@ -33,22 +35,12 @@ CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(I
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
-
-bitcoin.exe: USE_UPNP:=1
- ifdef USE_UPNP
- INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
- LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
- LIBS += -l miniupnpc -l iphlpapi
- DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
- endif
-
-bitcoind.exe: USE_UPNP:=0
- ifdef USE_UPNP
- INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
- LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
- LIBS += -l miniupnpc -l iphlpapi
- DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
- endif
+ifdef USE_UPNP
+ INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
+ LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
+ LIBS += -l miniupnpc -l iphlpapi
+ DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
+endif
LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
diff --git a/src/makefile.osx b/src/makefile.osx
index 36890f9868..784596b72d 100644
--- a/src/makefile.osx
+++ b/src/makefile.osx
@@ -16,6 +16,8 @@ LIBPATHS= \
WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
+USE_UPNP:=0
+
LIBS= -dead_strip \
$(DEPSDIR)/lib/libdb_cxx-4.8.a \
$(DEPSDIR)/lib/libboost_system.a \
@@ -47,17 +49,10 @@ OBJS= \
cryptopp/obj/sha.o \
cryptopp/obj/cpu.o
-bitcoin: USE_UPNP:=1
- ifdef USE_UPNP
- LIBS += $(DEPSDIR)/lib/libminiupnpc.a
- DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
-
-bitcoind: USE_UPNP:=0
- ifdef USE_UPNP
- LIBS += $(DEPSDIR)/lib/libminiupnpc.a
- DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
+ifdef USE_UPNP
+ LIBS += $(DEPSDIR)/lib/libminiupnpc.a
+ DEFS += -DUSE_UPNP=$(USE_UPNP)
+endif
all: bitcoin
diff --git a/src/makefile.unix b/src/makefile.unix
index 82d2a9f5c1..bb26bf5edd 100644
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -8,6 +8,8 @@ WXINCLUDEPATHS=$(shell wx-config --cxxflags)
WXLIBS=$(shell wx-config --libs)
+USE_UPNP:=0
+
DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
# for boost 1.37, add -mt to the boost libraries
@@ -21,17 +23,10 @@ LIBS= \
-l ssl \
-l crypto
-bitcoin: USE_UPNP:=1
- ifdef USE_UPNP
- LIBS += -l miniupnpc
- DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
-
-bitcoind: USE_UPNP:=0
- ifdef USE_UPNP
- LIBS += -l miniupnpc
- DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
+ifdef USE_UPNP
+ LIBS += -l miniupnpc
+ DEFS += -DUSE_UPNP=$(USE_UPNP)
+endif
LIBS+= \
-Wl,-Bdynamic \