Browse Source

Revert "Make UPnP default on Bitcoin but not on Bitcoind."

This reverts commit ee1f884229.

Stupid, stupid me...there is exactly 0 way to convince make to
execute a conditional based on a target-specific variable.
miguelfreitas
Matt Corallo 14 years ago
parent
commit
3f0950ea01
  1. 16
      src/makefile.mingw
  2. 13
      src/makefile.osx
  3. 13
      src/makefile.unix

16
src/makefile.mingw

@ -2,6 +2,8 @@
# Distributed under the MIT/X11 software license, see the accompanying # Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php. # file license.txt or http://www.opensource.org/licenses/mit-license.php.
USE_UPNP:=0
INCLUDEPATHS= \ INCLUDEPATHS= \
-I"C:\boost-1.43.0-mgw" \ -I"C:\boost-1.43.0-mgw" \
-I"C:\db-4.7.25.NC-mgw\build_unix" \ -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 \ 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 script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
ifdef USE_UPNP
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" INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
LIBPATHS += -L"C:\upnpc-exe-win32-20110215" LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
LIBS += -l miniupnpc -l iphlpapi LIBS += -l miniupnpc -l iphlpapi
DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif 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 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

13
src/makefile.osx vendored

@ -16,6 +16,8 @@ LIBPATHS= \
WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static) WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
USE_UPNP:=0
LIBS= -dead_strip \ LIBS= -dead_strip \
$(DEPSDIR)/lib/libdb_cxx-4.8.a \ $(DEPSDIR)/lib/libdb_cxx-4.8.a \
$(DEPSDIR)/lib/libboost_system.a \ $(DEPSDIR)/lib/libboost_system.a \
@ -47,17 +49,10 @@ OBJS= \
cryptopp/obj/sha.o \ cryptopp/obj/sha.o \
cryptopp/obj/cpu.o cryptopp/obj/cpu.o
bitcoin: USE_UPNP:=1 ifdef USE_UPNP
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 LIBS += $(DEPSDIR)/lib/libminiupnpc.a
DEFS += -DUSE_UPNP=$(USE_UPNP) DEFS += -DUSE_UPNP=$(USE_UPNP)
endif endif
all: bitcoin all: bitcoin

13
src/makefile.unix

@ -8,6 +8,8 @@ WXINCLUDEPATHS=$(shell wx-config --cxxflags)
WXLIBS=$(shell wx-config --libs) WXLIBS=$(shell wx-config --libs)
USE_UPNP:=0
DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
# for boost 1.37, add -mt to the boost libraries # for boost 1.37, add -mt to the boost libraries
@ -21,17 +23,10 @@ LIBS= \
-l ssl \ -l ssl \
-l crypto -l crypto
bitcoin: USE_UPNP:=1 ifdef USE_UPNP
ifdef USE_UPNP
LIBS += -l miniupnpc
DEFS += -DUSE_UPNP=$(USE_UPNP)
endif
bitcoind: USE_UPNP:=0
ifdef USE_UPNP
LIBS += -l miniupnpc LIBS += -l miniupnpc
DEFS += -DUSE_UPNP=$(USE_UPNP) DEFS += -DUSE_UPNP=$(USE_UPNP)
endif endif
LIBS+= \ LIBS+= \
-Wl,-Bdynamic \ -Wl,-Bdynamic \

Loading…
Cancel
Save