diff --git a/retroshare-service/src/retroshare-service.pro b/retroshare-service/src/retroshare-service.pro index 357e1ce1b..da61ce928 100644 --- a/retroshare-service/src/retroshare-service.pro +++ b/retroshare-service/src/retroshare-service.pro @@ -61,4 +61,47 @@ macx { INCLUDEPATH += . $$INC_DIR } +win32-g++ { + CONFIG(debug, debug|release) { + # show console output + CONFIG += console + } else { + CONFIG -= console + } + + # Switch on extra warnings + QMAKE_CFLAGS += -Wextra + QMAKE_CXXFLAGS += -Wextra + + CONFIG(debug, debug|release) { + } else { + # Tell linker to use ASLR protection + QMAKE_LFLAGS += -Wl,-dynamicbase + # Tell linker to use DEP protection + QMAKE_LFLAGS += -Wl,-nxcompat + } + + # Fix linking error (ld.exe: Error: export ordinal too large) due to too + # many exported symbols. + QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL + + # 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 + + OBJECTS_DIR = temp/obj + + dLib = ws2_32 gdi32 uuid ole32 iphlpapi crypt32 winmm + LIBS *= $$linkDynamicLibs(dLib) + + # export symbols for the plugins + LIBS += -Wl,--export-all-symbols,--out-implib,lib/libretroshare-gui.a +} +