mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-30 08:24:20 +00:00
fix mingw qt build
P.S. Works only without miniupnpc (USE_UPNP=-)
This commit is contained in:
parent
fac1dd544d
commit
fb5b4113be
10
.gitignore
vendored
10
.gitignore
vendored
@ -2,8 +2,14 @@
|
|||||||
*.o
|
*.o
|
||||||
*.qm
|
*.qm
|
||||||
build/
|
build/
|
||||||
Makefile
|
debug/
|
||||||
|
release/
|
||||||
|
Makefile*
|
||||||
qrc_bitcoin.cpp
|
qrc_bitcoin.cpp
|
||||||
gostcoin-qt
|
gostcoin-qt
|
||||||
gostcoind
|
gostcoind
|
||||||
*.pro.user
|
*.pro.user
|
||||||
|
.qmake.stash
|
||||||
|
gostcoin-qt_plugin_import.cpp
|
||||||
|
object_script.gostcoin-qt.Debug
|
||||||
|
object_script.gostcoin-qt.Release
|
||||||
|
@ -34,6 +34,9 @@ contains(RELEASE, 1) {
|
|||||||
# Linux: static link and extra security (see: https://wiki.debian.org/Hardening)
|
# Linux: static link and extra security (see: https://wiki.debian.org/Hardening)
|
||||||
LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now
|
LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now
|
||||||
}
|
}
|
||||||
|
win32 {
|
||||||
|
QMAKE_LFLAGS += -Wl,-Bstatic
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
!win32 {
|
!win32 {
|
||||||
@ -51,6 +54,7 @@ win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
|
|||||||
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware
|
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware
|
||||||
# i686-w64-mingw32
|
# i686-w64-mingw32
|
||||||
win32:QMAKE_LFLAGS *= -static-libgcc -static-libstdc++
|
win32:QMAKE_LFLAGS *= -static-libgcc -static-libstdc++
|
||||||
|
win32:LIBS *= -lstdc++ -lpthread
|
||||||
|
|
||||||
# use: qmake "USE_QRCODE=1"
|
# use: qmake "USE_QRCODE=1"
|
||||||
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
|
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
|
||||||
@ -178,7 +182,7 @@ HEADERS += src/qt/bitcoingui.h \
|
|||||||
src/json/json_spirit_reader.h \
|
src/json/json_spirit_reader.h \
|
||||||
src/json/json_spirit_error_position.h \
|
src/json/json_spirit_error_position.h \
|
||||||
src/json/json_spirit.h \
|
src/json/json_spirit.h \
|
||||||
i2psam/i2psam.h \
|
i2psam/i2psam.h \
|
||||||
src/qt/clientmodel.h \
|
src/qt/clientmodel.h \
|
||||||
src/qt/guiutil.h \
|
src/qt/guiutil.h \
|
||||||
src/qt/transactionrecord.h \
|
src/qt/transactionrecord.h \
|
||||||
@ -212,7 +216,7 @@ HEADERS += src/qt/bitcoingui.h \
|
|||||||
src/ui_interface.h \
|
src/ui_interface.h \
|
||||||
src/qt/rpcconsole.h \
|
src/qt/rpcconsole.h \
|
||||||
src/i2p.h \
|
src/i2p.h \
|
||||||
src/Gost.h \
|
src/Gost.h \
|
||||||
src/version.h \
|
src/version.h \
|
||||||
src/netbase.h \
|
src/netbase.h \
|
||||||
src/clientversion.h \
|
src/clientversion.h \
|
||||||
@ -292,7 +296,7 @@ SOURCES += src/qt/gostcoin.cpp \
|
|||||||
src/qt/paymentserver.cpp \
|
src/qt/paymentserver.cpp \
|
||||||
src/qt/rpcconsole.cpp \
|
src/qt/rpcconsole.cpp \
|
||||||
src/i2p.cpp \
|
src/i2p.cpp \
|
||||||
src/Gost.cpp \
|
src/Gost.cpp \
|
||||||
src/noui.cpp \
|
src/noui.cpp \
|
||||||
src/leveldb.cpp \
|
src/leveldb.cpp \
|
||||||
src/txdb.cpp \
|
src/txdb.cpp \
|
||||||
@ -300,7 +304,7 @@ SOURCES += src/qt/gostcoin.cpp \
|
|||||||
src/qt/showi2paddresses.cpp \
|
src/qt/showi2paddresses.cpp \
|
||||||
src/qt/i2poptionswidget.cpp \
|
src/qt/i2poptionswidget.cpp \
|
||||||
src/qt/setupdarknet.cpp \
|
src/qt/setupdarknet.cpp \
|
||||||
i2psam/i2psam.cpp
|
i2psam/i2psam.cpp
|
||||||
|
|
||||||
RESOURCES += src/qt/bitcoin.qrc
|
RESOURCES += src/qt/bitcoin.qrc
|
||||||
|
|
||||||
@ -379,7 +383,7 @@ OTHER_FILES += README.md \
|
|||||||
# platform specific defaults, if not overridden on command line
|
# platform specific defaults, if not overridden on command line
|
||||||
isEmpty(BOOST_LIB_SUFFIX) {
|
isEmpty(BOOST_LIB_SUFFIX) {
|
||||||
macx:BOOST_LIB_SUFFIX = -mt
|
macx:BOOST_LIB_SUFFIX = -mt
|
||||||
win32:BOOST_LIB_SUFFIX = -mgw44-mt-s-1_50
|
win32:BOOST_LIB_SUFFIX = -mt
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
||||||
@ -400,10 +404,12 @@ isEmpty(BDB_INCLUDE_PATH) {
|
|||||||
|
|
||||||
isEmpty(BOOST_LIB_PATH) {
|
isEmpty(BOOST_LIB_PATH) {
|
||||||
macx:BOOST_LIB_PATH = /opt/local/lib
|
macx:BOOST_LIB_PATH = /opt/local/lib
|
||||||
|
win32:BOOST_LIB_PATH = /mingw32/lib
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmpty(BOOST_INCLUDE_PATH) {
|
isEmpty(BOOST_INCLUDE_PATH) {
|
||||||
macx:BOOST_INCLUDE_PATH = /opt/local/include
|
macx:BOOST_INCLUDE_PATH = /opt/local/include
|
||||||
|
win32:BOOST_INCLUDE_PATH = /mingw32/include
|
||||||
}
|
}
|
||||||
|
|
||||||
win32:DEFINES += WIN32
|
win32:DEFINES += WIN32
|
||||||
@ -440,7 +446,8 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.plist
|
|||||||
# Set libraries and includes at end, to use platform-defined defaults if not overridden
|
# Set libraries and includes at end, to use platform-defined defaults if not overridden
|
||||||
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
|
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
|
||||||
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
|
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
|
||||||
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX -lz -ldl
|
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX -lz
|
||||||
|
!win32:LIBS += -ldl
|
||||||
# -lgdi32 has to happen after -lcrypto (see #681)
|
# -lgdi32 has to happen after -lcrypto (see #681)
|
||||||
win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
|
win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
|
||||||
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
|
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
|
||||||
|
@ -19,6 +19,7 @@ CXX ?= g++
|
|||||||
|
|
||||||
USE_UPNP:=-
|
USE_UPNP:=-
|
||||||
USE_IPV6:=1
|
USE_IPV6:=1
|
||||||
|
USE_DEBUG:=no
|
||||||
|
|
||||||
DEPSDIR?=/usr/local
|
DEPSDIR?=/usr/local
|
||||||
BOOST_SUFFIX?=-mt
|
BOOST_SUFFIX?=-mt
|
||||||
@ -46,11 +47,15 @@ LIBS= \
|
|||||||
-l crypto \
|
-l crypto \
|
||||||
-l i2psam
|
-l i2psam
|
||||||
|
|
||||||
DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE
|
DEFS=-D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE
|
||||||
DEBUGFLAGS=-g
|
|
||||||
|
ifneq (${USE_DEBUG}, no)
|
||||||
|
DEBUGFLAGS=-g
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
|
CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
|
||||||
# enable: ASLR, DEP and large address aware
|
# enable: ASLR, DEP and large address aware
|
||||||
LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -Wl,--large-address-aware
|
LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -Wl,--large-address-aware -Wl,-Bstatic -Wl,-rpath,/usr/local/lib -L/usr/local/lib -static-libgcc -static-libstdc++
|
||||||
|
|
||||||
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
|
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
|
||||||
|
|
||||||
@ -66,7 +71,7 @@ ifneq (${USE_IPV6}, -)
|
|||||||
DEFS += -DUSE_IPV6=$(USE_IPV6)
|
DEFS += -DUSE_IPV6=$(USE_IPV6)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBS += -l mingwthrd -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 mswsock -l shlwapi
|
LIBS += -l stdc++ -l mingwthrd -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 mswsock -l shlwapi -l pthread
|
||||||
|
|
||||||
# I2P Support
|
# I2P Support
|
||||||
DEFS += -DUSE_NATIVE_I2P -I"../i2psam"
|
DEFS += -DUSE_NATIVE_I2P -I"../i2psam"
|
||||||
|
@ -1245,7 +1245,7 @@ void ThreadMapPort()
|
|||||||
#else
|
#else
|
||||||
/* miniupnpc 1.6 */
|
/* miniupnpc 1.6 */
|
||||||
int error = 0;
|
int error = 0;
|
||||||
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
|
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct UPNPUrls urls;
|
struct UPNPUrls urls;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user