2015-08-31 11:55:30 -04:00
|
|
|
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
|
|
|
|
2010-07-10 07:48:24 -04:00
|
|
|
TEMPLATE = lib
|
2010-12-26 19:44:03 -05:00
|
|
|
CONFIG += staticlib
|
2010-07-10 07:48:24 -04:00
|
|
|
CONFIG -= qt
|
|
|
|
TARGET = bitdht
|
2015-09-05 17:49:15 -04:00
|
|
|
DESTDIR = lib
|
|
|
|
|
2010-07-10 07:48:24 -04:00
|
|
|
QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG
|
|
|
|
|
|
|
|
profiling {
|
|
|
|
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
|
|
|
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
|
|
|
}
|
|
|
|
|
|
|
|
release {
|
|
|
|
# not much here yet.
|
|
|
|
}
|
|
|
|
|
|
|
|
#CONFIG += debug
|
|
|
|
debug {
|
|
|
|
QMAKE_CXXFLAGS -= -O2 -fomit-frame-pointer
|
|
|
|
QMAKE_CXXFLAGS *= -g -fno-omit-frame-pointer
|
|
|
|
}
|
|
|
|
|
2012-02-17 05:03:38 -05:00
|
|
|
# treat warnings as error for better removing
|
|
|
|
#QMAKE_CFLAGS += -Werror
|
|
|
|
#QMAKE_CXXFLAGS += -Werror
|
|
|
|
|
2010-07-10 07:48:24 -04:00
|
|
|
################################# Linux ##########################################
|
|
|
|
linux-* {
|
2016-05-27 12:07:28 -04:00
|
|
|
QMAKE_CC = $${QMAKE_CXX}
|
2010-07-10 07:48:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
linux-g++ {
|
|
|
|
OBJECTS_DIR = temp/linux-g++/obj
|
|
|
|
}
|
|
|
|
|
|
|
|
linux-g++-64 {
|
|
|
|
OBJECTS_DIR = temp/linux-g++-64/obj
|
|
|
|
}
|
|
|
|
|
2015-08-31 12:01:18 -04:00
|
|
|
unix {
|
|
|
|
data_files.path = "$${DATA_DIR}"
|
|
|
|
data_files.files = bitdht/bdboot.txt
|
|
|
|
INSTALLS += data_files
|
|
|
|
}
|
|
|
|
|
2018-01-29 07:26:43 -05:00
|
|
|
android-* {
|
|
|
|
# see https://community.kde.org/Necessitas/Assets
|
|
|
|
bdboot.files=bitdht/bdboot.txt
|
|
|
|
bdboot.path=/assets/values
|
|
|
|
INSTALLS += bdboot
|
|
|
|
}
|
2015-08-31 12:01:18 -04:00
|
|
|
|
2010-07-10 07:48:24 -04:00
|
|
|
#################### Cross compilation for windows under Linux ####################
|
|
|
|
|
|
|
|
win32-x-g++ {
|
|
|
|
OBJECTS_DIR = temp/win32xgcc/obj
|
2010-07-18 12:28:51 -04:00
|
|
|
# These have been replaced by _WIN32 && __MINGW32__
|
|
|
|
# DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU
|
2010-07-10 07:48:24 -04:00
|
|
|
QMAKE_CXXFLAGS *= -Wmissing-include-dirs
|
|
|
|
QMAKE_CC = i586-mingw32msvc-g++
|
|
|
|
QMAKE_LIB = i586-mingw32msvc-ar
|
|
|
|
QMAKE_AR = i586-mingw32msvc-ar
|
|
|
|
DEFINES *= STATICLIB WIN32
|
|
|
|
|
|
|
|
INCLUDEPATH *= /usr/i586-mingw32msvc/include ${HOME}/.wine/drive_c/pthreads/include/
|
|
|
|
}
|
|
|
|
################################# Windows ##########################################
|
|
|
|
|
|
|
|
win32 {
|
2016-05-27 12:07:28 -04:00
|
|
|
QMAKE_CC = $${QMAKE_CXX}
|
2010-07-10 07:48:24 -04:00
|
|
|
OBJECTS_DIR = temp/obj
|
|
|
|
MOC_DIR = temp/moc
|
2013-10-07 19:11:10 -04:00
|
|
|
DEFINES *= STATICLIB WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
2010-07-18 12:28:51 -04:00
|
|
|
# These have been replaced by _WIN32 && __MINGW32__
|
|
|
|
#DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
2011-02-11 19:47:10 -05:00
|
|
|
|
2012-02-17 05:03:38 -05:00
|
|
|
# Switch on extra warnings
|
|
|
|
QMAKE_CFLAGS += -Wextra
|
|
|
|
QMAKE_CXXFLAGS += -Wextra
|
2012-08-02 19:25:28 -04:00
|
|
|
|
|
|
|
# Switch off optimization for release version
|
|
|
|
QMAKE_CXXFLAGS_RELEASE -= -O2
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -O0
|
|
|
|
QMAKE_CFLAGS_RELEASE -= -O2
|
|
|
|
QMAKE_CFLAGS_RELEASE += -O0
|
|
|
|
|
|
|
|
# Switch on optimization for debug version
|
|
|
|
#QMAKE_CXXFLAGS_DEBUG += -O2
|
|
|
|
#QMAKE_CFLAGS_DEBUG += -O2
|
2010-07-10 07:48:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
################################# MacOSX ##########################################
|
|
|
|
|
|
|
|
mac {
|
2016-05-27 12:07:28 -04:00
|
|
|
QMAKE_CC = $${QMAKE_CXX}
|
2010-07-10 07:48:24 -04:00
|
|
|
OBJECTS_DIR = temp/obj
|
|
|
|
MOC_DIR = temp/moc
|
|
|
|
}
|
|
|
|
|
2012-01-29 09:27:14 -05:00
|
|
|
################################# FreeBSD ##########################################
|
|
|
|
|
|
|
|
freebsd-* {
|
|
|
|
}
|
|
|
|
|
2013-08-25 17:06:29 -04:00
|
|
|
################################# OpenBSD ##########################################
|
|
|
|
|
|
|
|
openbsd-* {
|
|
|
|
}
|
|
|
|
|
2015-10-20 12:41:40 -04:00
|
|
|
################################# Haiku ##########################################
|
|
|
|
|
|
|
|
haiku-* {
|
|
|
|
DESTDIR = lib
|
|
|
|
}
|
|
|
|
|
2010-07-10 07:48:24 -04:00
|
|
|
################################### COMMON stuff ##################################
|
|
|
|
################################### COMMON stuff ##################################
|
|
|
|
|
2015-01-12 18:14:35 -05:00
|
|
|
DEPENDPATH += .
|
|
|
|
INCLUDEPATH += .
|
2010-07-10 07:48:24 -04:00
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
bitdht/bdiface.h \
|
|
|
|
bitdht/bencode.h \
|
|
|
|
bitdht/bdobj.h \
|
|
|
|
bitdht/bdmsgs.h \
|
|
|
|
bitdht/bdpeer.h \
|
|
|
|
bitdht/bdquery.h \
|
|
|
|
bitdht/bdhash.h \
|
|
|
|
bitdht/bdstore.h \
|
|
|
|
bitdht/bdnode.h \
|
|
|
|
bitdht/bdmanager.h \
|
|
|
|
bitdht/bdstddht.h \
|
2010-09-29 16:37:30 -04:00
|
|
|
bitdht/bdhistory.h \
|
2010-07-18 12:28:51 -04:00
|
|
|
util/bdnet.h \
|
2010-07-10 07:48:24 -04:00
|
|
|
util/bdthreads.h \
|
2011-06-29 06:46:11 -04:00
|
|
|
util/bdrandom.h \
|
2012-08-16 12:59:51 -04:00
|
|
|
util/bdfile.h \
|
2012-02-17 05:03:38 -05:00
|
|
|
util/bdstring.h \
|
2010-07-10 07:48:24 -04:00
|
|
|
udp/udplayer.h \
|
|
|
|
udp/udpstack.h \
|
|
|
|
udp/udpbitdht.h \
|
2011-06-29 06:46:11 -04:00
|
|
|
bitdht/bdconnection.h \
|
|
|
|
bitdht/bdfilter.h \
|
|
|
|
bitdht/bdaccount.h \
|
|
|
|
bitdht/bdquerymgr.h \
|
2011-06-29 12:06:33 -04:00
|
|
|
util/bdbloom.h \
|
2011-11-22 08:16:03 -05:00
|
|
|
bitdht/bdfriendlist.h \
|
2010-07-10 07:48:24 -04:00
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
bitdht/bencode.c \
|
|
|
|
bitdht/bdobj.cc \
|
|
|
|
bitdht/bdmsgs.cc \
|
|
|
|
bitdht/bdpeer.cc \
|
|
|
|
bitdht/bdquery.cc \
|
|
|
|
bitdht/bdhash.cc \
|
|
|
|
bitdht/bdstore.cc \
|
|
|
|
bitdht/bdnode.cc \
|
|
|
|
bitdht/bdmanager.cc \
|
|
|
|
bitdht/bdstddht.cc \
|
2010-09-29 16:37:30 -04:00
|
|
|
bitdht/bdhistory.cc \
|
2011-06-29 06:46:11 -04:00
|
|
|
util/bdnet.cc \
|
2010-07-10 07:48:24 -04:00
|
|
|
util/bdthreads.cc \
|
2011-06-29 06:46:11 -04:00
|
|
|
util/bdrandom.cc \
|
2012-08-16 12:59:51 -04:00
|
|
|
util/bdfile.cc \
|
2012-04-19 16:44:32 -04:00
|
|
|
util/bdstring.cc \
|
2010-07-10 07:48:24 -04:00
|
|
|
udp/udplayer.cc \
|
|
|
|
udp/udpstack.cc \
|
|
|
|
udp/udpbitdht.cc \
|
2011-06-29 06:46:11 -04:00
|
|
|
bitdht/bdconnection.cc \
|
|
|
|
bitdht/bdfilter.cc \
|
|
|
|
bitdht/bdaccount.cc \
|
|
|
|
bitdht/bdquerymgr.cc \
|
2011-06-29 12:06:33 -04:00
|
|
|
util/bdbloom.cc \
|
2011-11-22 08:16:03 -05:00
|
|
|
bitdht/bdfriendlist.cc \
|