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
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
################################# Linux ##########################################
|
|
|
|
linux-* {
|
|
|
|
DESTDIR = lib
|
|
|
|
QMAKE_CC = g++
|
|
|
|
}
|
|
|
|
|
|
|
|
linux-g++ {
|
|
|
|
OBJECTS_DIR = temp/linux-g++/obj
|
|
|
|
}
|
|
|
|
|
|
|
|
linux-g++-64 {
|
|
|
|
OBJECTS_DIR = temp/linux-g++-64/obj
|
|
|
|
}
|
|
|
|
|
|
|
|
#################### Cross compilation for windows under Linux ####################
|
|
|
|
|
|
|
|
win32-x-g++ {
|
|
|
|
OBJECTS_DIR = temp/win32xgcc/obj
|
|
|
|
DESTDIR = lib.win32xgcc
|
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 {
|
|
|
|
QMAKE_CC = g++
|
|
|
|
OBJECTS_DIR = temp/obj
|
|
|
|
MOC_DIR = temp/moc
|
2010-07-18 12:28:51 -04:00
|
|
|
DEFINES *= STATICLIB
|
|
|
|
# These have been replaced by _WIN32 && __MINGW32__
|
|
|
|
#DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
2010-07-10 07:48:24 -04:00
|
|
|
DESTDIR = lib
|
2011-02-11 19:47:10 -05:00
|
|
|
|
2011-02-18 18:26:08 -05:00
|
|
|
# Switch off optimization for release version
|
2011-02-11 19:47:10 -05:00
|
|
|
QMAKE_CXXFLAGS_RELEASE -= -O2
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -O0
|
|
|
|
QMAKE_CFLAGS_RELEASE -= -O2
|
|
|
|
QMAKE_CFLAGS_RELEASE += -O0
|
2011-02-18 18:26:08 -05:00
|
|
|
|
|
|
|
# Switch on optimization for debug version
|
|
|
|
#QMAKE_CXXFLAGS_DEBUG += -O2
|
|
|
|
#QMAKE_CFLAGS_DEBUG += -O2
|
2010-07-10 07:48:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
################################# MacOSX ##########################################
|
|
|
|
|
|
|
|
mac {
|
|
|
|
QMAKE_CC = g++
|
|
|
|
OBJECTS_DIR = temp/obj
|
|
|
|
MOC_DIR = temp/moc
|
|
|
|
DESTDIR = lib
|
|
|
|
}
|
|
|
|
|
2012-01-29 09:27:14 -05:00
|
|
|
################################# FreeBSD ##########################################
|
|
|
|
|
|
|
|
freebsd-* {
|
|
|
|
DESTDIR = lib
|
|
|
|
}
|
|
|
|
|
2010-07-10 07:48:24 -04:00
|
|
|
################################### COMMON stuff ##################################
|
|
|
|
################################### COMMON stuff ##################################
|
|
|
|
|
|
|
|
#DEPENDPATH += . \
|
|
|
|
INCLUDEPATH += . \
|
|
|
|
|
|
|
|
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 \
|
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 \
|
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 \
|
2010-07-10 07:48:24 -04:00
|
|
|
|
|
|
|
|