Move duplicate common stuff out of platform parts

This commit is contained in:
AsamK 2015-09-05 23:49:15 +02:00
parent 66b9557833
commit 571336e1f4
5 changed files with 23 additions and 68 deletions

View File

@ -4,6 +4,8 @@ TEMPLATE = lib
CONFIG += staticlib
CONFIG -= qt
TARGET = bitdht
DESTDIR = lib
QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG
profiling {
@ -27,7 +29,6 @@ debug {
################################# Linux ##########################################
linux-* {
DESTDIR = lib
QMAKE_CC = g++
}
@ -50,7 +51,6 @@ unix {
win32-x-g++ {
OBJECTS_DIR = temp/win32xgcc/obj
DESTDIR = lib.win32xgcc
# These have been replaced by _WIN32 && __MINGW32__
# DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU
QMAKE_CXXFLAGS *= -Wmissing-include-dirs
@ -70,7 +70,6 @@ win32 {
DEFINES *= STATICLIB WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
# These have been replaced by _WIN32 && __MINGW32__
#DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
DESTDIR = lib
# Switch on extra warnings
QMAKE_CFLAGS += -Wextra
@ -93,19 +92,16 @@ mac {
QMAKE_CC = g++
OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc
DESTDIR = lib
}
################################# FreeBSD ##########################################
freebsd-* {
DESTDIR = lib
}
################################# OpenBSD ##########################################
openbsd-* {
DESTDIR = lib
}
################################### COMMON stuff ##################################

View File

@ -6,6 +6,7 @@ CONFIG += create_prl
CONFIG -= qt
TARGET = retroshare
TARGET_PRL = libretroshare
DESTDIR = lib
#CONFIG += dsdv
@ -72,15 +73,13 @@ SOURCES += tcponudp/udppeer.cc \
tcponudp/udpstunner.cc \
tcponudp/udprelay.cc \
DEFINES *= RS_USE_BITDHT
BITDHT_DIR = ../../libbitdht/src
BITDHT_DIR = ../../libbitdht/src
DEPENDPATH += . $${BITDHT_DIR}
INCLUDEPATH += . $${BITDHT_DIR}
# The next line is for compliance with debian packages. Keep it!
INCLUDEPATH += ../libbitdht
DEFINES *= RS_USE_BITDHT
PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a
LIBS += ../../libbitdht/src/lib/libbitdht.a
PRE_TARGETDEPS *= $${BITDHT_DIR}/lib/libbitdht.a
LIBS *= $${BITDHT_DIR}/lib/libbitdht.a
}
@ -122,11 +121,6 @@ HEADERS += $$PUBLIC_HEADERS
linux-* {
CONFIG += link_pkgconfig
OPENPGPSDK_DIR = ../../openpgpsdk/src
DEPENDPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
DESTDIR = lib
QMAKE_CXXFLAGS *= -Wall -D_FILE_OFFSET_BITS=64
QMAKE_CC = g++
@ -151,7 +145,6 @@ linux-* {
#CONFIG += version_detail_bash_script
# linux/bsd can use either - libupnp is more complete and packaged.
#CONFIG += upnp_miniupnpc
CONFIG += upnp_libupnp
@ -210,7 +203,6 @@ version_detail_bash_script {
win32-x-g++ {
OBJECTS_DIR = temp/win32xgcc/obj
DESTDIR = lib.win32xgcc
DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU
QMAKE_CXXFLAGS *= -Wmissing-include-dirs
QMAKE_CC = i586-mingw32msvc-g++
@ -237,7 +229,6 @@ win32 {
DEFINES *= MINIUPNPC_VERSION=13
# This defines the platform to be WinXP or later and is needed for getaddrinfo (_WIN32_WINNT_WINXP)
DEFINES *= WINVER=0x0501
DESTDIR = lib
# Switch on extra warnings
QMAKE_CFLAGS += -Wextra
@ -260,10 +251,9 @@ win32 {
LIBS += -lsqlcipher
LIBS_DIR = $$PWD/../../../libs
OPENPGPSDK_DIR = $$PWD/../../openpgpsdk/src
DEPENDPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc $$OPENPGPSDK_DIR
INCLUDEPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc $$OPENPGPSDK_DIR
DEPENDPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc
INCLUDEPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc
}
################################# MacOSX ##########################################
@ -274,7 +264,6 @@ mac {
MOC_DIR = temp/moc
#DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
#DEFINES *= MINIUPNPC_VERSION=13
DESTDIR = lib
CONFIG += upnp_miniupnpc
@ -289,12 +278,8 @@ mac {
#GPG_ERROR_DIR = ../../../../libgpg-error-1.7
#GPGME_DIR = ../../../../gpgme-1.1.8
OPENPGPSDK_DIR = ../../openpgpsdk/src
INCLUDEPATH += . $${UPNPC_DIR}
INCLUDEPATH += $${OPENPGPSDK_DIR}
#../openpgpsdk
#INCLUDEPATH += . $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
}
@ -309,8 +294,6 @@ freebsd-* {
# linux/bsd can use either - libupnp is more complete and packaged.
#CONFIG += upnp_miniupnpc
CONFIG += upnp_libupnp
DESTDIR = lib
}
################################# OpenBSD ##########################################
@ -319,21 +302,19 @@ openbsd-* {
INCLUDEPATH *= /usr/local/include
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")
OPENPGPSDK_DIR = ../../openpgpsdk/src
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
CONFIG += upnp_libupnp
DESTDIR = lib
}
################################### COMMON stuff ##################################
# openpgpsdk
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2
OPENPGPSDK_DIR = ../../openpgpsdk/src
DEPENDPATH *= $${OPENPGPSDK_DIR}
INCLUDEPATH *= $${OPENPGPSDK_DIR}
PRE_TARGETDEPS *= $${OPENPGPSDK_DIR}/lib/libops.a
LIBS *= $${OPENPGPSDK_DIR}/lib/libops.a -lbz2
HEADERS += dbase/cachestrapper.h \
dbase/fimonitor.h \

View File

@ -64,9 +64,6 @@ linux-* {
#CONFIG += version_detail_bash_script
QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS += ../../libretroshare/src/lib/libretroshare.a
PKGCONFIG *= x11 xscrnsaver
LIBS *= -rdynamic
@ -130,7 +127,6 @@ version_detail_bash_script {
win32-x-g++ {
OBJECTS_DIR = temp/win32-x-g++/obj
LIBS += ../../libretroshare/src/lib.win32xgcc/libretroshare.a
LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a
LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a
LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a
@ -178,11 +174,8 @@ win32 {
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
#QTPLUGIN += qjpeg
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS_DIR = $$PWD/../../../libs
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -L"$$LIBS_DIR/lib"
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
@ -221,7 +214,6 @@ macx {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
CONFIG += version_detail_bash_script
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -lssl -lcrypto -lz
#LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
@ -240,12 +232,10 @@ macx {
freebsd-* {
INCLUDEPATH *= /usr/local/include/gpgme
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl
LIBS *= -lgpgme
LIBS *= -lupnp
LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS += -lsqlite3
}
@ -255,17 +245,11 @@ freebsd-* {
openbsd-* {
INCLUDEPATH *= /usr/local/include
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl -lcrypto
LIBS *= -lgpgme
LIBS *= -lupnp
LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS += -lsqlite3
LIBS *= -rdynamic
}
@ -281,8 +265,12 @@ openbsd-* {
DEPENDPATH += . ../../libretroshare/src/
INCLUDEPATH += ../../libretroshare/src/
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= ../../libretroshare/src/lib/libretroshare.a
wikipoos {
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
PRE_TARGETDEPS *= ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
LIBS *= ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
}
# webinterface

View File

@ -26,7 +26,6 @@ linux-* {
#CONFIG += version_detail_bash_script
QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS *= -rdynamic
}
@ -48,7 +47,6 @@ linux-g++-64 {
win32-x-g++ {
OBJECTS_DIR = temp/win32-x-g++/obj
LIBS += ../../../../lib/win32-x-g++/libretroshare.a
LIBS += ../../../../lib/win32-x-g++/libssl.a
LIBS += ../../../../lib/win32-x-g++/libcrypto.a
LIBS += ../../../../lib/win32-x-g++/libminiupnpc.a
@ -74,11 +72,8 @@ win32 {
# solve linker warnings because of the order of the libraries
QMAKE_LFLAGS += -Wl,--start-group
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS_DIR = $$PWD/../../../libs
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -L"$$LIBS_DIR/lib"
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz
LIBS += -lcrypto -lws2_32 -lgdi32
@ -102,7 +97,6 @@ macx {
# CONFIG += ppc x86
LIBS += -Wl,-search_paths_first
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -lssl -lcrypto -lz
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
LIBS += -framework CoreFoundation
@ -127,12 +121,10 @@ macx {
freebsd-* {
INCLUDEPATH *= /usr/local/include/gpgme
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl
LIBS *= -lgpgme
LIBS *= -lupnp
LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
}
##################################### OpenBSD ######################################
@ -140,12 +132,10 @@ freebsd-* {
openbsd-* {
INCLUDEPATH *= /usr/local/include
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl -lcrypto
LIBS *= -lgpgme
LIBS *= -lupnp
LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -rdynamic
}
@ -155,6 +145,9 @@ openbsd-* {
DEPENDPATH += . ../../libretroshare/src
INCLUDEPATH += . ../../libretroshare/src
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= ../../libretroshare/src/lib/libretroshare.a
# Input
HEADERS += notifytxt.h
SOURCES += notifytxt.cc \

View File

@ -3,6 +3,7 @@ CONFIG += staticlib
CONFIG += create_prl
CONFIG -= qt
TARGET = pegmarkdown
DESTDIR = lib
QMAKE_CFLAGS *= -Wall -ansi -D_GNU_SOURCE
QMAKE_CC = gcc
@ -33,7 +34,6 @@ linux-g++-64 {
win32 {
OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc
DESTDIR = lib
# Switch on extra warnings
QMAKE_CFLAGS += -Wextra
@ -56,7 +56,6 @@ win32 {
mac {
OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc
DESTDIR = lib
CONFIG += dummy_glib
}
@ -64,13 +63,11 @@ mac {
################################# FreeBSD ##########################################
freebsd-* {
DESTDIR = lib
}
################################# OpenBSD ##########################################
openbsd-* {
DESTDIR = lib
}
################################### COMMON stuff ##################################