2008-03-09 20:16:29 +00:00
|
|
|
# QMake pro-file for the PokerTH dedicated server
|
2008-02-10 13:35:13 +00:00
|
|
|
|
2008-10-17 09:49:36 +00:00
|
|
|
isEmpty( PREFIX ){
|
2010-10-13 17:47:16 +00:00
|
|
|
PREFIX =/usr
|
2008-03-20 21:04:21 +00:00
|
|
|
}
|
|
|
|
|
|
2008-03-09 20:16:29 +00:00
|
|
|
TEMPLATE = app
|
|
|
|
|
CODECFORSRC = UTF-8
|
|
|
|
|
|
2009-08-17 23:23:01 +00:00
|
|
|
CONFIG += thread console embed_manifest_exe exceptions rtti stl warn_on
|
2008-03-09 20:16:29 +00:00
|
|
|
|
|
|
|
|
UI_DIR = uics
|
|
|
|
|
TARGET = bin/pokerth_server
|
|
|
|
|
MOC_DIR = mocs
|
|
|
|
|
OBJECTS_DIR = obj
|
|
|
|
|
DEFINES += POKERTH_DEDICATED_SERVER
|
2011-11-17 19:24:06 +00:00
|
|
|
DEFINES += ENABLE_IPV6 TIXML_USE_STL BOOST_FILESYSTEM_DEPRECATED
|
2008-03-20 21:04:21 +00:00
|
|
|
DEFINES += PREFIX=\"$${PREFIX}\"
|
2008-03-09 20:16:29 +00:00
|
|
|
QT -= core gui
|
2009-05-07 22:36:51 +00:00
|
|
|
#PRECOMPILED_HEADER = src/pch_lib.h
|
2008-03-09 20:16:29 +00:00
|
|
|
|
|
|
|
|
INCLUDEPATH += . \
|
|
|
|
|
src \
|
|
|
|
|
src/engine \
|
|
|
|
|
src/gui \
|
|
|
|
|
src/gui/qt \
|
|
|
|
|
src/gui/qt/qttools \
|
|
|
|
|
src/gui/qt/qttools/nonqthelper \
|
|
|
|
|
src/net \
|
|
|
|
|
src/engine/local_engine \
|
|
|
|
|
src/engine/network_engine \
|
|
|
|
|
src/config \
|
2009-08-02 15:11:40 +00:00
|
|
|
src/third_party/asn1 \
|
2008-03-09 20:16:29 +00:00
|
|
|
src/core \
|
|
|
|
|
|
|
|
|
|
DEPENDPATH += . \
|
|
|
|
|
src \
|
|
|
|
|
src/config \
|
|
|
|
|
src/core \
|
|
|
|
|
src/engine \
|
|
|
|
|
src/gui \
|
|
|
|
|
src/gui/qt \
|
|
|
|
|
src/gui/generic \
|
|
|
|
|
src/net \
|
|
|
|
|
src/core/common \
|
|
|
|
|
src/engine/local_engine \
|
|
|
|
|
src/engine/network_engine \
|
|
|
|
|
src/net/common \
|
|
|
|
|
|
|
|
|
|
# Input
|
|
|
|
|
HEADERS += \
|
2012-02-11 23:08:31 +00:00
|
|
|
src/engine/game.h \
|
2008-03-09 20:16:29 +00:00
|
|
|
src/session.h \
|
|
|
|
|
src/playerdata.h \
|
|
|
|
|
src/gamedata.h \
|
|
|
|
|
src/config/configfile.h \
|
|
|
|
|
src/core/thread.h \
|
|
|
|
|
src/engine/boardinterface.h \
|
|
|
|
|
src/engine/enginefactory.h \
|
|
|
|
|
src/engine/handinterface.h \
|
|
|
|
|
src/engine/playerinterface.h \
|
|
|
|
|
src/engine/berointerface.h \
|
|
|
|
|
src/gui/guiinterface.h \
|
|
|
|
|
src/net/clientcallback.h \
|
|
|
|
|
src/net/clientcontext.h \
|
|
|
|
|
src/net/clientexception.h \
|
|
|
|
|
src/net/clientstate.h \
|
|
|
|
|
src/net/clientthread.h \
|
|
|
|
|
src/net/genericsocket.h \
|
|
|
|
|
src/net/netpacket.h \
|
2009-05-10 22:34:07 +00:00
|
|
|
src/net/senderhelper.h \
|
|
|
|
|
src/net/serveraccepthelper.h \
|
2008-03-09 20:16:29 +00:00
|
|
|
src/net/serverlobbythread.h \
|
|
|
|
|
src/net/socket_helper.h \
|
|
|
|
|
src/net/socket_msg.h \
|
|
|
|
|
src/net/socket_startup.h \
|
|
|
|
|
src/net/net_helper.h \
|
|
|
|
|
src/core/pokerthexception.h \
|
|
|
|
|
src/core/convhelper.h \
|
|
|
|
|
src/core/loghelper.h \
|
|
|
|
|
src/engine/local_engine/cardsvalue.h \
|
|
|
|
|
src/engine/local_engine/localboard.h \
|
|
|
|
|
src/engine/local_engine/localenginefactory.h \
|
|
|
|
|
src/engine/local_engine/localhand.h \
|
|
|
|
|
src/engine/local_engine/localplayer.h \
|
|
|
|
|
src/engine/local_engine/localberopreflop.h \
|
|
|
|
|
src/engine/local_engine/localberoflop.h \
|
|
|
|
|
src/engine/local_engine/localberoturn.h \
|
|
|
|
|
src/engine/local_engine/localberoriver.h \
|
|
|
|
|
src/engine/local_engine/localberopostriver.h \
|
|
|
|
|
src/engine/local_engine/tools.h \
|
|
|
|
|
src/engine/local_engine/localbero.h \
|
|
|
|
|
src/engine/network_engine/clientboard.h \
|
|
|
|
|
src/engine/network_engine/clientenginefactory.h \
|
|
|
|
|
src/engine/network_engine/clienthand.h \
|
|
|
|
|
src/engine/network_engine/clientplayer.h \
|
|
|
|
|
src/engine/network_engine/clientbero.h \
|
|
|
|
|
src/gui/qttoolsinterface.h \
|
|
|
|
|
src/gui/qt/qttools/nonqttoolswrapper.h \
|
|
|
|
|
src/gui/qt/qttools/nonqthelper/nonqthelper.h \
|
2011-03-11 21:56:24 +00:00
|
|
|
src/gui/generic/serverguiwrapper.h \
|
2012-12-25 15:33:01 +01:00
|
|
|
src/net/servermanagerirc.h
|
2008-03-09 20:16:29 +00:00
|
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
|
src/pokerth_server.cpp \
|
|
|
|
|
src/gui/qt/qttools/nonqttoolswrapper.cpp \
|
|
|
|
|
src/gui/qt/qttools/nonqthelper/nonqthelper.cpp \
|
|
|
|
|
src/net/common/net_helper_server.cpp \
|
2011-03-11 21:56:24 +00:00
|
|
|
src/core/common/loghelper_server.cpp \
|
2012-12-25 15:33:01 +01:00
|
|
|
src/net/common/ircthread.cpp \
|
|
|
|
|
src/net/common/servermanagerirc.cpp \
|
|
|
|
|
src/net/common/servermanagerfactoryserver.cpp
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2010-11-27 23:45:10 +00:00
|
|
|
LIBS += -lpokerth_lib \
|
|
|
|
|
-lpokerth_db \
|
|
|
|
|
-lpokerth_protocol \
|
2011-03-11 01:43:21 +00:00
|
|
|
-lcurl \
|
|
|
|
|
-lircclient
|
2010-11-27 23:45:10 +00:00
|
|
|
|
2008-03-09 20:16:29 +00:00
|
|
|
win32 {
|
2010-10-13 17:47:16 +00:00
|
|
|
DEFINES += CURL_STATICLIB
|
|
|
|
|
DEFINES += _WIN32_WINNT=0x0501
|
2012-12-25 15:33:01 +01:00
|
|
|
DEFINES += HAVE_OPENSSL
|
2010-10-13 17:47:16 +00:00
|
|
|
DEPENDPATH += src/net/win32/ src/core/win32
|
2012-12-25 15:33:01 +01:00
|
|
|
INCLUDEPATH += ../sqlite ../boost/ ../openssl/include ../gsasl/include
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
SOURCES += src/core/win32/convhelper.cpp
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2012-12-25 15:33:01 +01:00
|
|
|
LIBPATH += ../boost/stage/lib ../openssl/lib ../gsasl/lib ../curl/lib ../mysql/lib ../zlib
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2010-10-19 17:54:21 +00:00
|
|
|
debug:LIBPATH += debug/lib
|
|
|
|
|
release:LIBPATH += release/lib
|
2009-10-11 09:20:17 +00:00
|
|
|
|
2012-12-25 15:58:26 +01:00
|
|
|
LIBS += -lcrypt32 -lssl -lssh2 -lgnutls -lnettle -lhogweed -lgmp -lgcrypt -lgpg-error -lgsasl -lidn -lintl -lprotobuf -ltinyxml -lsqlite3 -lntlm
|
2011-11-17 19:45:20 +00:00
|
|
|
LIBS += -lboost_thread_win32-mt
|
|
|
|
|
LIBS += -lboost_filesystem-mt
|
|
|
|
|
LIBS += -lboost_regex-mt
|
|
|
|
|
LIBS += -lboost_program_options-mt
|
|
|
|
|
LIBS += -lboost_iostreams-mt
|
|
|
|
|
LIBS += -lboost_random-mt
|
2012-08-15 21:09:34 +02:00
|
|
|
LIBS += -lboost_chrono-mt
|
2011-11-17 19:45:20 +00:00
|
|
|
LIBS += -lboost_system-mt
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2010-10-19 18:12:15 +00:00
|
|
|
LIBS += -liconv \
|
|
|
|
|
-lz \
|
|
|
|
|
-lgdi32 \
|
2010-10-13 17:47:16 +00:00
|
|
|
-lcomdlg32 \
|
|
|
|
|
-loleaut32 \
|
|
|
|
|
-limm32 \
|
|
|
|
|
-lwinmm \
|
|
|
|
|
-lwinspool \
|
|
|
|
|
-lole32 \
|
|
|
|
|
-luuid \
|
|
|
|
|
-luser32 \
|
|
|
|
|
-lmsimg32 \
|
|
|
|
|
-lshell32 \
|
|
|
|
|
-lkernel32 \
|
|
|
|
|
-lmswsock \
|
|
|
|
|
-lws2_32 \
|
|
|
|
|
-ladvapi32 \
|
2012-11-24 12:28:34 +01:00
|
|
|
-lwldap32 \
|
|
|
|
|
-lcrypt32
|
2008-03-09 20:16:29 +00:00
|
|
|
}
|
2010-10-13 17:47:16 +00:00
|
|
|
|
2008-03-09 20:16:29 +00:00
|
|
|
!win32 {
|
2010-10-13 17:47:16 +00:00
|
|
|
DEPENDPATH += src/net/linux/ src/core/linux
|
2011-01-09 11:07:08 +00:00
|
|
|
SOURCES +=
|
2010-10-13 17:47:16 +00:00
|
|
|
SOURCES += src/core/linux/convhelper.cpp
|
2008-03-09 20:16:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unix : !mac {
|
|
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
##### My release static build options
|
|
|
|
|
#QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
|
|
|
|
|
#QMAKE_LFLAGS += -Wl,--gc-sections
|
2008-05-21 20:47:17 +00:00
|
|
|
|
2010-11-01 09:46:56 +00:00
|
|
|
LIBPATH += lib $${PREFIX}/lib /opt/gsasl/lib
|
2010-10-30 17:27:56 +00:00
|
|
|
INCLUDEPATH += $${PREFIX}/include
|
2010-10-13 17:47:16 +00:00
|
|
|
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
|
|
|
|
|
BOOST_FS = boost_filesystem boost_filesystem-mt
|
|
|
|
|
BOOST_THREAD = boost_thread boost_thread-mt
|
|
|
|
|
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
|
|
|
|
|
BOOST_IOSTREAMS = boost_iostreams boost_iostreams-mt
|
2010-06-01 20:08:33 +00:00
|
|
|
BOOST_SYS = boost_system boost_system-mt
|
2009-04-09 16:38:44 +00:00
|
|
|
BOOST_REGEX = boost_regex boost_regex-mt
|
2011-10-11 15:15:22 +00:00
|
|
|
BOOST_RANDOM = boost_random boost_random-mt
|
2010-06-01 20:08:33 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
#
|
|
|
|
|
# searching in $PREFIX/lib and $PREFIX/lib64
|
|
|
|
|
# to override the default '/usr' pass PREFIX
|
|
|
|
|
# variable to qmake.
|
|
|
|
|
#
|
|
|
|
|
for(dir, LIB_DIRS){
|
|
|
|
|
exists($$dir){
|
|
|
|
|
for(lib, BOOST_THREAD):exists($${dir}/lib$${lib}.so*) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_THREAD = -l$$lib
|
|
|
|
|
}
|
2010-10-30 17:43:49 +00:00
|
|
|
for(lib, BOOST_THREAD):exists($${dir}/lib$${lib}.a) {
|
2010-10-13 17:47:16 +00:00
|
|
|
message("Found $$lib")
|
2010-10-30 17:43:49 +00:00
|
|
|
BOOST_THREAD = -l$$lib
|
2010-10-13 17:47:16 +00:00
|
|
|
}
|
|
|
|
|
for(lib, BOOST_FS):exists($${dir}/lib$${lib}.so*) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_FS = -l$$lib
|
|
|
|
|
}
|
2010-10-30 17:43:49 +00:00
|
|
|
for(lib, BOOST_FS):exists($${dir}/lib$${lib}.a) {
|
2010-10-13 17:47:16 +00:00
|
|
|
message("Found $$lib")
|
2010-10-30 17:43:49 +00:00
|
|
|
BOOST_FS = -l$$lib
|
2010-10-13 17:47:16 +00:00
|
|
|
}
|
|
|
|
|
for(lib, BOOST_IOSTREAMS):exists($${dir}/lib$${lib}.so*) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_IOSTREAMS = -l$$lib
|
|
|
|
|
}
|
2010-10-30 17:43:49 +00:00
|
|
|
for(lib, BOOST_IOSTREAMS):exists($${dir}/lib$${lib}.a) {
|
2010-10-13 17:47:16 +00:00
|
|
|
message("Found $$lib")
|
2010-10-30 17:43:49 +00:00
|
|
|
BOOST_IOSTREAMS = -l$$lib
|
2010-10-13 17:47:16 +00:00
|
|
|
}
|
|
|
|
|
for(lib, BOOST_PROGRAM_OPTIONS):exists($${dir}/lib$${lib}.so*) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_PROGRAM_OPTIONS = -l$$lib
|
|
|
|
|
}
|
2010-10-30 17:43:49 +00:00
|
|
|
for(lib, BOOST_PROGRAM_OPTIONS):exists($${dir}/lib$${lib}.a) {
|
2010-10-13 17:47:16 +00:00
|
|
|
message("Found $$lib")
|
2010-10-30 17:43:49 +00:00
|
|
|
BOOST_PROGRAM_OPTIONS = -l$$lib
|
2010-10-13 17:47:16 +00:00
|
|
|
}
|
|
|
|
|
for(lib, BOOST_REGEX):exists($${dir}/lib$${lib}.so*) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_REGEX = -l$$lib
|
|
|
|
|
}
|
2010-10-30 17:43:49 +00:00
|
|
|
for(lib, BOOST_REGEX):exists($${dir}/lib$${lib}.a) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_REGEX = -l$$lib
|
|
|
|
|
}
|
2011-10-11 15:15:22 +00:00
|
|
|
for(lib, BOOST_RANDOM):exists($${dir}/lib$${lib}.so*) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_RANDOM = -l$$lib
|
|
|
|
|
}
|
|
|
|
|
for(lib, BOOST_RANDOM):exists($${dir}/lib$${lib}.a) {
|
|
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_RANDOM = -l$$lib
|
|
|
|
|
}
|
2010-10-30 17:43:49 +00:00
|
|
|
for(lib, BOOST_SYS):exists($${dir}/lib$${lib}.so*) {
|
2010-10-13 17:47:16 +00:00
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_SYS = -l$$lib
|
|
|
|
|
}
|
2010-10-30 17:43:49 +00:00
|
|
|
for(lib, BOOST_SYS):exists($${dir}/lib$${lib}.a) {
|
2010-10-13 17:47:16 +00:00
|
|
|
message("Found $$lib")
|
|
|
|
|
BOOST_SYS = -l$$lib
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-10-11 15:15:22 +00:00
|
|
|
BOOST_LIBS = $$BOOST_THREAD $$BOOST_FS $$BOOST_PROGRAM_OPTIONS $$BOOST_IOSTREAMS $$BOOST_REGEX $$BOOST_RANDOM $$BOOST_SYS
|
|
|
|
|
!count(BOOST_LIBS, 7){
|
2010-10-13 17:47:16 +00:00
|
|
|
error("Unable to find boost libraries in PREFIX=$${PREFIX}")
|
|
|
|
|
}
|
2008-03-20 21:04:21 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
UNAME = $$system(uname -s)
|
|
|
|
|
BSD = $$find(UNAME, "BSD")
|
|
|
|
|
kFreeBSD = $$find(UNAME, "kFreeBSD")
|
2008-05-30 18:26:01 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
LIBS += $$BOOST_LIBS
|
2011-02-08 14:40:14 +00:00
|
|
|
LIBS += -lsqlite3 \
|
2012-09-18 19:52:02 +02:00
|
|
|
-ltinyxml \
|
|
|
|
|
-lprotobuf
|
2010-11-27 23:45:10 +00:00
|
|
|
LIBS += -lgsasl
|
2010-10-13 17:47:16 +00:00
|
|
|
!isEmpty( BSD ): isEmpty( kFreeBSD ){
|
|
|
|
|
LIBS += -lcrypto -liconv
|
|
|
|
|
} else {
|
2011-03-08 18:42:57 +00:00
|
|
|
LIBS += -lgcrypt
|
2010-10-13 17:47:16 +00:00
|
|
|
}
|
2008-03-20 21:04:21 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
TARGETDEPS += ./lib/libpokerth_lib.a \
|
|
|
|
|
./lib/libpokerth_db.a \
|
|
|
|
|
./lib/libpokerth_protocol.a
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
#### INSTALL ####
|
2008-03-20 21:04:21 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
binary.path += $${PREFIX}/bin/
|
|
|
|
|
binary.files += pokerth_server
|
2008-03-20 21:04:21 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
INSTALLS += binary
|
|
|
|
|
}
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2008-10-17 09:49:36 +00:00
|
|
|
mac {
|
2012-12-25 15:33:01 +01:00
|
|
|
# make it x86_64 only
|
|
|
|
|
CONFIG += x86_64
|
|
|
|
|
CONFIG -= x86
|
2010-10-09 19:31:46 +00:00
|
|
|
CONFIG -= ppc
|
2012-12-25 15:33:01 +01:00
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
|
2010-11-28 10:40:44 +00:00
|
|
|
QMAKE_CXXFLAGS -= -std=gnu++0x
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2011-05-08 22:20:26 +00:00
|
|
|
# workaround for problems with boost_filesystem exceptions
|
|
|
|
|
QMAKE_LFLAGS += -no_dead_strip_inits_and_terms
|
|
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
# for universal-compilation on PPC-Mac uncomment the following line
|
|
|
|
|
# on Intel-Mac you have to comment this line out or build will fail.
|
|
|
|
|
# QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/
|
2008-03-09 20:16:29 +00:00
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
LIBPATH += lib
|
2012-12-25 15:33:01 +01:00
|
|
|
# make sure you have an x86_64 version of boost
|
|
|
|
|
LIBS += /usr/local/lib/libboost_thread.a
|
2010-10-13 17:47:16 +00:00
|
|
|
LIBS += /usr/local/lib/libboost_filesystem.a
|
|
|
|
|
LIBS += /usr/local/lib/libboost_regex.a
|
2011-10-11 15:15:22 +00:00
|
|
|
LIBS += /usr/local/lib/libboost_random.a
|
2010-10-13 17:47:16 +00:00
|
|
|
LIBS += /usr/local/lib/libboost_system.a
|
|
|
|
|
LIBS += /usr/local/lib/libboost_iostreams.a
|
|
|
|
|
LIBS += /usr/local/lib/libboost_program_options.a
|
2009-10-18 20:53:58 +00:00
|
|
|
LIBS += /usr/local/lib/libgsasl.a
|
|
|
|
|
|
2010-10-13 17:47:16 +00:00
|
|
|
# libraries installed on every mac
|
2010-12-20 18:27:48 +00:00
|
|
|
LIBS += -lsqlite3
|
2011-02-08 14:40:14 +00:00
|
|
|
LIBS += -ltinyxml
|
2010-11-27 23:45:10 +00:00
|
|
|
LIBS += -lcrypto -lssl -lz -liconv
|
2010-10-13 17:47:16 +00:00
|
|
|
# set the application icon
|
|
|
|
|
RC_FILE = pokerth.icns
|
2012-12-25 15:33:01 +01:00
|
|
|
LIBPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/lib
|
|
|
|
|
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
|
2008-03-09 20:16:29 +00:00
|
|
|
}
|
2009-09-26 21:01:06 +00:00
|
|
|
|
|
|
|
|
official_server {
|
|
|
|
|
LIBPATH += pkth_stat/daemon_lib/lib
|
|
|
|
|
LIBS += -lpokerth_closed -lmysqlpp
|
|
|
|
|
DEFINES += POKERTH_OFFICIAL_SERVER
|
|
|
|
|
}
|
2012-09-06 21:01:27 +02:00
|
|
|
|
|
|
|
|
android_test{
|
|
|
|
|
DEFINES += ANDROID
|
|
|
|
|
}
|