-
Notifications
You must be signed in to change notification settings - Fork 0
/
truegalaxycashd.pro
352 lines (317 loc) · 10.7 KB
/
truegalaxycashd.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
TEMPLATE = app
TARGET = truegalaxycashd
VERSION = 1.0.0.0
INCLUDEPATH += src src/json
DEFINES += TRUEGALAXYCASH_DAEMON
DEFINES += ENABLE_WALLET
DEFINES += BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_NO_CXX11_SCOPED_ENUMS BOOST_ASIO_ENABLE_OLD_SERVICES
CONFIG += console c++11
CONFIG += no_include_pwd
CONFIG += thread static
CONFIG -= app_bundle
CONFIG -= qt
win32:OBJECTS_DIR = build
linux:OBJECTS_DIR = build_unix
macx:OBJECTS_DIR = build_macx
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
# use: qmake "RELEASE=1"
contains(RELEASE, 1) {
# Mac: compile for maximum compatibility (10.11, 64-bit)
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
macx:QMAKE_CFLAGS += -mmacosx-version-min=10.11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
macx:QMAKE_LFLAGS += -mmacosx-version-min=10.11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
!windows:!macx {
# Linux: static link
LIBS += -Wl,-Bstatic
}
}
QMAKE_CFLAGS += -std=c99
QMAKE_CFLAGS_RELEASE += -std=c99
!win32 {
# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
QMAKE_CXXFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
}
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat -static
win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++
# use: qmake "USE_UPNP=1" ( enabled by default; default)
# or: qmake "USE_UPNP=0" (disabled by default)
# or: qmake "USE_UPNP=-" (not supported)
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
contains(USE_UPNP, -) {
message(Building without UPNP support)
} else {
message(Building with UPNP support)
count(USE_UPNP, 0) {
USE_UPNP=1
}
DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB STATICLIB
INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
win32:LIBS += -liphlpapi
}
INCLUDEPATH += src/leveldb/include src/leveldb/helpers
LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
SOURCES += src/txdb-leveldb.cpp
!win32 {
# we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
} else {
# make an educated guess about what the ranlib command is called
isEmpty(QMAKE_RANLIB) {
QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
}
LIBS += -lshlwapi
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
}
genleveldb.target = $$PWD/src/leveldb/libleveldb.a
genleveldb.depends = FORCE
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
QMAKE_EXTRA_TARGETS += genleveldb
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
contains(USE_O3, 1) {
message(Building O3 optimization flag)
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS += -O3
QMAKE_CFLAGS += -O3
}
*-g++-32 {
message("32 platform, adding -msse2 flag")
QMAKE_CXXFLAGS += -msse2
QMAKE_CFLAGS += -msse2
}
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector
# Input
DEPENDPATH += src src/json
HEADERS += src/addrman.h \
src/kernel.h \
src/base58.h \
src/chainparams.h \
src/chainparamsseeds.h \
src/checkpoints.h \
src/compat.h \
src/coincontrol.h \
src/sync.h \
src/util.h \
src/hash.h \
src/bignum.h \
src/uint256.h \
src/arith_uint256.h \
src/serialize.h \
src/core.h \
src/main.h \
src/miner.h \
src/net.h \
src/key.h \
src/db.h \
src/txdb.h \
src/txmempool.h \
src/walletdb.h \
src/script.h \
src/init.h \
src/mruset.h \
src/json/json_spirit_writer_template.h \
src/json/json_spirit_writer.h \
src/json/json_spirit_value.h \
src/json/json_spirit_utils.h \
src/json/json_spirit_stream_reader.h \
src/json/json_spirit_reader_template.h \
src/json/json_spirit_reader.h \
src/json/json_spirit_error_position.h \
src/json/json_spirit.h \
src/wallet.h \
src/keystore.h \
src/rpcclient.h \
src/rpcprotocol.h \
src/rpcserver.h \
src/timedata.h \
src/crypter.h \
src/protocol.h \
src/allocators.h \
src/ui_interface.h \
src/version.h \
src/netbase.h \
src/clientversion.h \
src/threadsafety.h \
src/tinyformat.h \
src/crypto/byteswap.h \
src/crypto/endian.h \
src/crypto/common.h \
src/crypto/sph_blake.h \
src/crypto/sph_bmw.h \
src/crypto/sph_cubehash.h \
src/crypto/sph_fugue.h \
src/crypto/sph_hamsi.h \
src/crypto/sph_panama.h \
src/crypto/sph_sha0.h \
src/crypto/sph_sha1.h \
src/crypto/sph_sha2.h \
src/crypto/sph_echo.h \
src/crypto/sph_groestl.h \
src/crypto/sph_jh.h \
src/crypto/sph_keccak.h \
src/crypto/sph_luffa.h \
src/crypto/sph_shavite.h \
src/crypto/sph_simd.h \
src/crypto/sph_skein.h \
src/crypto/sph_ripemd.h \
src/crypto/sph_types.h \
src/crypto/blake2.h \
src/crypto/blake2-impl.h \
src/masternode.h \
src/activemasternode.h \
src/activemasternodeman.h \
src/masternodeconfig.h \
src/masternodeman.h \
src/masternode-payments.h \
src/spork.h \
src/blockfile.h \
src/coins.h \
src/leveldbwrapper.h \
src/smartchain.h
SOURCES += src/truegalaxycashd.cpp \
src/kernel.cpp \
src/chainparams.cpp \
src/version.cpp \
src/sync.cpp \
src/txmempool.cpp \
src/arith_uint256.cpp \
src/util.cpp \
src/hash.cpp \
src/netbase.cpp \
src/key.cpp \
src/script.cpp \
src/core.cpp \
src/main.cpp \
src/miner.cpp \
src/init.cpp \
src/net.cpp \
src/checkpoints.cpp \
src/addrman.cpp \
src/db.cpp \
src/walletdb.cpp \
src/wallet.cpp \
src/keystore.cpp \
src/rpcclient.cpp \
src/rpcprotocol.cpp \
src/rpcserver.cpp \
src/rpcdump.cpp \
src/rpcmisc.cpp \
src/rpcnet.cpp \
src/rpcmining.cpp \
src/rpcwallet.cpp \
src/rpcblockchain.cpp \
src/rpcrawtransaction.cpp \
src/timedata.cpp \
src/crypter.cpp \
src/protocol.cpp \
src/noui.cpp \
src/masternode.cpp \
src/rpcmasternode.cpp \
src/activemasternode.cpp \
src/activemasternodeman.cpp \
src/masternodeman.cpp \
src/masternode-payments.cpp \
src/spork.cpp \
src/masternodeconfig.cpp \
src/crypto/aes_helper.c \
src/crypto/blake.c \
src/crypto/bmw.c \
src/crypto/cubehash.c \
src/crypto/fugue.c \
src/crypto/hamsi.c \
src/crypto/hamsi_helper.c \
src/crypto/panama.c \
src/crypto/sha0.c \
src/crypto/sha1.c \
src/crypto/sha2.c \
src/crypto/sha2big.c \
src/crypto/echo.c \
src/crypto/groestl.c \
src/crypto/jh.c \
src/crypto/keccak.c \
src/crypto/luffa.c \
src/crypto/shavite.c \
src/crypto/simd.c \
src/crypto/ripemd.c \
src/crypto/skein.c \
src/crypto/blake2s-ref.c \
src/blockfile.cpp \
src/coins.cpp \
src/leveldbwrapper.cpp \
src/smartchain.cpp
# "Other files" to show in Qt Creator
OTHER_FILES += \
doc/*.rst doc/*.txt doc/README README.md src/truegalaxycashd.rc
# platform specific defaults, if not overridden on command line
isEmpty(BOOST_LIB_SUFFIX) {
macx:BOOST_LIB_SUFFIX = -mt
windows:BOOST_LIB_SUFFIX = -mt
}
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
win32:BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
else:BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
}
isEmpty(BDB_LIB_PATH) {
macx:BDB_LIB_PATH = /usr/local/opt/berkeley-db@4/lib
}
isEmpty(BDB_LIB_SUFFIX) {
macx:BDB_LIB_SUFFIX = -4.8
}
isEmpty(BDB_INCLUDE_PATH) {
macx:BDB_INCLUDE_PATH = /usr/local/opt/berkeley-db@4/include
}
isEmpty(BOOST_LIB_PATH) {
macx:BOOST_LIB_PATH = /usr/local/lib
}
isEmpty(BOOST_INCLUDE_PATH) {
macx:BOOST_INCLUDE_PATH = /usr/local/include
}
isEmpty(OPENSSL_LIB_PATH) {
macx:OPENSSL_LIB_PATH = /usr/local/opt/openssl/lib
}
isEmpty(OPENSSL_INCLUDE_PATH) {
macx:OPENSSL_INCLUDE_PATH = /usr/local/opt/openssl/include
}
windows:DEFINES += WIN32
windows:RC_FILE = src/truegalaxycashd.rc
windows:!contains(MINGW_THREAD_BUGFIX, 0) {
# At least qmake's win32-g++-cross profile is missing the -lmingwthrd
# thread-safety flag. GCC has -mthreads to enable this, but it doesn't
# work with static linking. -lmingwthrd must come BEFORE -lmingw, so
# it is prepended to QMAKE_LIBS_QT_ENTRY.
# It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
# any problems on some untested qmake profile now or in the future.
DEFINES += _MT BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
}
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
macx:TARGET = "truegalaxycashd"
macx:QMAKE_CFLAGS_THREAD += -pthread
macx:QMAKE_LFLAGS_THREAD += -pthread
macx:QMAKE_CXXFLAGS_THREAD += -pthread
# Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,)
LIBS += -lz -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
# -lgdi32 has to happen after -lcrypto (see #681)
windows: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
windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
contains(RELEASE, 1) {
!windows:!macx {
# Linux: turn dynamic linking back on for c/c++ runtime libraries
LIBS += -Wl,-Bdynamic
}
}
!windows:!macx {
DEFINES += LINUX
LIBS += -lrt -ldl
}