diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-10-13 12:09:10 (GMT) |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-10-13 18:03:01 (GMT) |
commit | 86636e0c4ab91bfb60be1e18d6daff34d41a5927 (patch) | |
tree | ee89e8d15a27377afb45e7b6fb9ee0e4ef42bc8a /mkspecs | |
parent | 2def16770a623df4e5fc0dcd5f0e55c485251992 (diff) | |
download | Qt-86636e0c4ab91bfb60be1e18d6daff34d41a5927.zip Qt-86636e0c4ab91bfb60be1e18d6daff34d41a5927.tar.gz Qt-86636e0c4ab91bfb60be1e18d6daff34d41a5927.tar.bz2 |
Refactor GCC mkspecs to share more configuration options
The g++ and llvm mkspecs now share the common parts in common/gcc-base.conf
Each top level mkspec includes a platform-specific version of this base,
either common/gcc-base-unix.conf or common/gcc-base-mac.conf, and these
platform specific bases will include the cross-platform one.
The same pattern is then used for the g++ specific configurations, which
are split up into common/g++.conf, common/g++-unix.conf and common/g++-mac.conf
The qplatformdefs.h for mac was also shared where possible.
The test in tests/manual/mkspecs was used to ensure that the final output
of all the mkspecs was the same after the refactoring as before.
Reviewed-by: ossi
Diffstat (limited to 'mkspecs')
51 files changed, 383 insertions, 562 deletions
diff --git a/mkspecs/common/g++-mac.conf b/mkspecs/common/g++-mac.conf new file mode 100644 index 0000000..1b8ec6e --- /dev/null +++ b/mkspecs/common/g++-mac.conf @@ -0,0 +1,27 @@ +# +# Qmake configuration for the GNU C++ compiler on Mac OS X +# +# Before making changes to this file, please read the comment in +# gcc-base.conf, to make sure the change goes in the right place. +# +# To verify that your change has the desired effect on the final configuration +# you can use the manual test in tests/manual/mkspecs. +# + +include(g++.conf) + +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_DWARF2 +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_DWARF2 +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g $$QMAKE_CFLAGS_DWARF2 + +QMAKE_LFLAGS_STATIC_LIB += -all_load + +QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=10.5 +QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=10.5 + +QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 +QMAKE_CXXFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 +QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 +QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 +QMAKE_LFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 +QMAKE_LFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf new file mode 100644 index 0000000..09b3e90 --- /dev/null +++ b/mkspecs/common/g++-unix.conf @@ -0,0 +1,14 @@ +# +# Qmake configuration for the GNU C++ compiler on *nix-systems +# +# Before making changes to this file, please read the comment in +# gcc-base.conf, to make sure the change goes in the right place. +# +# To verify that your change has the desired effect on the final configuration +# you can use the manual test in tests/manual/mkspecs. +# + +include(g++.conf) + +QMAKE_LFLAGS_RELEASE += -Wl,-O1 +QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf index 0d511fc..cb82180 100644 --- a/mkspecs/common/g++.conf +++ b/mkspecs/common/g++.conf @@ -1,54 +1,18 @@ # -# qmake configuration for common gcc +# Qmake configuration for the GNU C++ compiler +# +# Before making changes to this file, please read the comment in +# gcc-base.conf, to make sure the change goes in the right place. +# +# To verify that your change has the desired effect on the final configuration +# you can use the manual test in tests/manual/mkspecs. # -QMAKE_CC = gcc -QMAKE_CFLAGS += -pipe -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC -QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} -QMAKE_CXX = g++ -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden -QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS += -QMAKE_LFLAGS_RELEASE += -Wl,-O1 -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -shared -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -Wl,-soname, -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined -QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_PCH_OUTPUT_EXT = .gch +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC -# -Bsymbolic-functions (ld) support -QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions -QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, +QMAKE_PCH_OUTPUT_EXT = .gch diff --git a/mkspecs/common/gcc-base-mac.conf b/mkspecs/common/gcc-base-mac.conf new file mode 100644 index 0000000..b65cc5e --- /dev/null +++ b/mkspecs/common/gcc-base-mac.conf @@ -0,0 +1,48 @@ +# +# Base qmake configuration for GCC on Mac OS X +# +# Before making changes to this file, please read the comment in +# gcc-base.conf, to make sure the change goes in the right place. +# +# To verify that your change has the desired effect on the final configuration +# you can use the manual test in tests/manual/mkspecs. +# + +include(gcc-base.conf) + +QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ + +QMAKE_CFLAGS_X86 += -arch i386 +QMAKE_CFLAGS_X86_64 += -arch x86_64 +QMAKE_CFLAGS_PPC += -arch ppc +QMAKE_CFLAGS_PPC_64 += -arch ppc64 +QMAKE_CFLAGS_DWARF2 += -gdwarf-2 + +QMAKE_CXXFLAGS_X86 += $$QMAKE_CFLAGS_X86 +QMAKE_CXXFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 +QMAKE_CXXFLAGS_PPC += $$QMAKE_CFLAGS_PPC +QMAKE_CXXFLAGS_PPC_64 += $$QMAKE_CFLAGS_PPC_64 +QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2 + +QMAKE_OBJECTIVE_CFLAGS_X86 += $$QMAKE_CFLAGS_X86 +QMAKE_OBJECTIVE_CFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 +QMAKE_OBJECTIVE_CFLAGS_PPC += $$QMAKE_CFLAGS_PPC +QMAKE_OBJECTIVE_CFLAGS_PPC_64 += $$QMAKE_CFLAGS_PPC_64 + +QMAKE_LFLAGS_X86 += $$QMAKE_CFLAGS_X86 +QMAKE_LFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 +QMAKE_LFLAGS_PPC += $$QMAKE_CFLAGS_PPC +QMAKE_LFLAGS_PPC_64 += $$QMAKE_CFLAGS_PPC_64 + +QMAKE_LFLAGS += -headerpad_max_install_names +QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace +QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} +QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} +QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE} + +QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf new file mode 100644 index 0000000..dc8d7e4 --- /dev/null +++ b/mkspecs/common/gcc-base-unix.conf @@ -0,0 +1,21 @@ +# +# Base qmake configuration for GCC on *nix-systems +# +# Before making changes to this file, please read the comment in +# gcc-base.conf, to make sure the change goes in the right place. +# +# To verify that your change has the desired effect on the final configuration +# you can use the manual test in tests/manual/mkspecs. +# + +include(gcc-base.conf) + +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += -Wl,-soname, +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_RPATH = -Wl,-rpath, + +# -Bsymbolic-functions (ld) support +QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions +QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf new file mode 100644 index 0000000..2afe9d6 --- /dev/null +++ b/mkspecs/common/gcc-base.conf @@ -0,0 +1,73 @@ +# +# This file is used as a basis for the following compilers: +# +# - The GNU C++ compiler (g++) +# - LLVM +# - Clang +# +# Platform-specific options shared by these compilers are put into: +# +# - gcc-base-mac.conf +# - gcc-base-unix.conf +# +# These base files are then combined with configurations for each compiler: +# +# - g++.conf +# - g++-mac.conf +# - g++-unix.conf +# - llvm.conf +# - clang.conf +# +# The combination happens in the top level mkspec, by including a platform- +# specific version of the base-file, for example gcc-base-mac.conf, and then +# a (possibly platform-specific) version of the actual compiler configuration, +# for example g++-mac.conf. +# +# If you are making changes to any of these files, please consider the +# possible effect it may have due to these include-rules, and whether it +# might make more sense to share the rule or make it more specific. +# +# To verify that your change has the desired effect on the final configuration +# you can use the manual test in tests/manual/mkspecs. +# + +# Allow including configurations to override +isEmpty(QMAKE_CC): QMAKE_CC = gcc + +QMAKE_CFLAGS += -pipe +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += -fPIC +QMAKE_CFLAGS_STATIC_LIB += -fPIC +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} + +isEmpty(QMAKE_CXX): QMAKE_CXX = g++ + +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden +QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} + +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX + +QMAKE_LFLAGS += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_RELEASE += + diff --git a/mkspecs/common/llvm.conf b/mkspecs/common/llvm.conf index 70f52aa..4e54703 100644 --- a/mkspecs/common/llvm.conf +++ b/mkspecs/common/llvm.conf @@ -1,49 +1,8 @@ # -# qmake configuration for common gcc +# Qmake configuration for LLVM on Linux and Mac # -QMAKE_CC = llvm-gcc -QMAKE_CFLAGS += -pipe -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC -QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} +QMAKE_CC = llvm-gcc +QMAKE_CXX = llvm-g++ -QMAKE_CXX = llvm-g++ -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden -QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - -QMAKE_LINK = llvm-g++ -QMAKE_LINK_SHLIB = llvm-g++ -QMAKE_LFLAGS += -QMAKE_LFLAGS_RELEASE += -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -shared -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -Wl,-soname, -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_RPATH = -Wl,-rpath, - -QMAKE_PCH_OUTPUT_EXT = .gch - -# -Bsymbolic-functions (ld) support -QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions -QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, +QMAKE_PCH_OUTPUT_EXT = .gch diff --git a/mkspecs/common/mac-g++.conf b/mkspecs/common/mac-g++.conf deleted file mode 100644 index 29b7408..0000000 --- a/mkspecs/common/mac-g++.conf +++ /dev/null @@ -1,81 +0,0 @@ -# -# qmake configuration for common gcc on Mac OS X -# - -include(mac.conf) - -QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ -QMAKE_CFLAGS += -pipe -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g -gdwarf-2 -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC -QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} - -QMAKE_CFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5 -QMAKE_OBJECTIVE_CFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5 -QMAKE_CFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -QMAKE_OBJECTIVE_CFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -QMAKE_CFLAGS_PPC += -arch ppc -QMAKE_OBJECTIVE_CFLAGS_PPC += -arch ppc -QMAKE_CFLAGS_X86 += -arch i386 -QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386 -QMAKE_CFLAGS_DWARF2 += -gdwarf-2 - -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden -QMAKE_CXXFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5 -QMAKE_CXXFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -QMAKE_CXXFLAGS_PPC += -arch ppc -QMAKE_CXXFLAGS_X86 += -arch i386 -QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2 -QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LINK_C = $$QMAKE_CC -QMAKE_LINK_C_SHLIB = $$QMAKE_CC -QMAKE_LFLAGS += -headerpad_max_install_names -QMAKE_LFLAGS_RELEASE += -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2 -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace -QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} -QMAKE_LFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5 -QMAKE_LFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -QMAKE_LFLAGS_PPC += -arch ppc -QMAKE_LFLAGS_X86 += -arch i386 -QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} -QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE} -# -all_load requred to make Objective-C categories work in static builds. -QMAKE_LFLAGS_STATIC_LIB += -all_load -QMAKE_LFLAGS_RPATH += - -QMAKE_PCH_OUTPUT_EXT = .gch - -QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - -QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/common/mac-llvm.conf b/mkspecs/common/mac-llvm.conf deleted file mode 100644 index 4ff088c..0000000 --- a/mkspecs/common/mac-llvm.conf +++ /dev/null @@ -1,76 +0,0 @@ -# -# qmake configuration for common gcc on Mac OS X -# - -include(mac.conf) - -QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ -QMAKE_CC = llvm-gcc -QMAKE_CFLAGS += -pipe -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC -QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} - -QMAKE_CFLAGS_PPC_64 += -arch ppc64 -QMAKE_OBJECTIVE_CFLAGS_PPC_64 += -arch ppc64 -QMAKE_CFLAGS_X86_64 += -arch x86_64 -QMAKE_OBJECTIVE_CFLAGS_X86_64 += -arch x86_64 -QMAKE_CFLAGS_PPC += -arch ppc -QMAKE_OBJECTIVE_CFLAGS_PPC += -arch ppc -QMAKE_CFLAGS_X86 += -arch i386 -QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386 -QMAKE_CFLAGS_DWARF2 += -gdwarf-2 - -QMAKE_CXX = llvm-g++ -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden -QMAKE_CXXFLAGS_PPC_64 += -arch ppc64 -QMAKE_CXXFLAGS_X86_64 += -arch x86_64 -QMAKE_CXXFLAGS_PPC += -arch ppc -QMAKE_CXXFLAGS_X86 += -arch i386 -QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2 -QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LFLAGS += -headerpad_max_install_names -QMAKE_LFLAGS_RELEASE += -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace -QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} -QMAKE_LFLAGS_PPC_64 += -arch ppc64 -QMAKE_LFLAGS_X86_64 += -arch x86_64 -QMAKE_LFLAGS_PPC += -arch ppc -QMAKE_LFLAGS_X86 += -arch i386 -QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} -QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE} -QMAKE_LFLAGS_RPATH += - -QMAKE_PCH_OUTPUT_EXT = .gch - -QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - -QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/common/mac/qplatformdefs.h b/mkspecs/common/mac/qplatformdefs.h new file mode 100644 index 0000000..99d64ef --- /dev/null +++ b/mkspecs/common/mac/qplatformdefs.h @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" + +// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs + +#include <unistd.h> + + +// We are hot - unistd.h should have turned on the specific APIs we requested + + +#include <pthread.h> +#include <dirent.h> +#include <fcntl.h> +#include <grp.h> +#include <pwd.h> +#include <signal.h> +#define QT_NO_LIBRARY_UNLOAD + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/ipc.h> +#include <sys/time.h> +#include <sys/shm.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <netinet/in.h> +#ifndef QT_NO_IPV6IFNAME +#include <net/if.h> +#endif + +#include "../common/posix/qplatformdefs.h" + +#undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE + +#define QT_OPEN_LARGEFILE 0 + +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) +#define QT_SOCKLEN_T socklen_t +#else +#define QT_SOCKLEN_T int +#endif + +#define QT_SIGNAL_IGNORE (void (*)(int))1 + +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf + +#endif // QPLATFORMDEFS_H diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf index 9de93d4..9d7c443 100644 --- a/mkspecs/freebsd-g++/qmake.conf +++ b/mkspecs/freebsd-g++/qmake.conf @@ -48,6 +48,7 @@ QMAKE_DEL_FILE = rm -f QMAKE_DEL_DIR = rmdir QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p -include(../common/g++.conf) include(../common/unix.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) load(qt_config) diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf index f425c0d..cdf8914 100644 --- a/mkspecs/linux-g++-32/qmake.conf +++ b/mkspecs/linux-g++-32/qmake.conf @@ -12,6 +12,7 @@ QMAKE_INCREMENTAL_STYLE = sublib QMAKE_CFLAGS = -m32 QMAKE_LFLAGS = -m32 -include(../common/g++.conf) include(../common/linux.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) load(qt_config) diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf index b8877a9..222f6b7 100644 --- a/mkspecs/linux-g++-64/qmake.conf +++ b/mkspecs/linux-g++-64/qmake.conf @@ -15,8 +15,10 @@ QMAKE_INCREMENTAL_STYLE = sublib QMAKE_CFLAGS = -m64 QMAKE_LFLAGS = -m64 -include(../common/g++.conf) include(../common/linux.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) + QMAKE_LIBDIR_X11 = /usr/X11R6/lib64 QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64 diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf index 8f85c54..d91db07 100644 --- a/mkspecs/linux-g++-maemo/qmake.conf +++ b/mkspecs/linux-g++-maemo/qmake.conf @@ -10,8 +10,9 @@ CONFIG += nostrip QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -include(../common/g++.conf) include(../common/linux.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) # Override the default lib/include directories for scratchbox: diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf index d772b5e..00df894 100644 --- a/mkspecs/linux-g++/qmake.conf +++ b/mkspecs/linux-g++/qmake.conf @@ -9,6 +9,7 @@ CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -include(../common/g++.conf) include(../common/linux.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) load(qt_config) diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf index 77f8d81..17db1bb 100644 --- a/mkspecs/linux-llvm/qmake.conf +++ b/mkspecs/linux-llvm/qmake.conf @@ -9,6 +9,7 @@ CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -include(../common/llvm.conf) include(../common/linux.conf) +include(../common/llvm.conf) +include(../common/gcc-base-unix.conf) load(qt_config) diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf index 4464686..fd36b70 100644 --- a/mkspecs/macx-g++/qmake.conf +++ b/mkspecs/macx-g++/qmake.conf @@ -16,6 +16,7 @@ QMAKE_INCREMENTAL_STYLE = sublib QMAKE_CC = gcc QMAKE_CXX = g++ -include(../common/mac-g++.conf) - +include(../common/mac.conf) +include(../common/gcc-base-mac.conf) +include(../common/g++-mac.conf) load(qt_config) diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h index 99d64ef..5bdef57 100644 --- a/mkspecs/macx-g++/qplatformdefs.h +++ b/mkspecs/macx-g++/qplatformdefs.h @@ -39,59 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/mac/qplatformdefs.h" -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include <unistd.h> - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include <pthread.h> -#include <dirent.h> -#include <fcntl.h> -#include <grp.h> -#include <pwd.h> -#include <signal.h> -#define QT_NO_LIBRARY_UNLOAD - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/ipc.h> -#include <sys/time.h> -#include <sys/shm.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <netinet/in.h> -#ifndef QT_NO_IPV6IFNAME -#include <net/if.h> -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T -#undef QT_SIGNAL_IGNORE - -#define QT_OPEN_LARGEFILE 0 - -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#define QT_SIGNAL_IGNORE (void (*)(int))1 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf index 784f5fc..cfdd724 100644 --- a/mkspecs/macx-g++40/qmake.conf +++ b/mkspecs/macx-g++40/qmake.conf @@ -16,6 +16,8 @@ QMAKE_INCREMENTAL_STYLE = sublib QMAKE_CC = gcc-4.0 QMAKE_CXX = g++-4.0 -include(../common/mac-g++.conf) +include(../common/mac.conf) +include(../common/gcc-base-mac.conf) +include(../common/g++-mac.conf) load(qt_config) diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h index 99d64ef..5bdef57 100644 --- a/mkspecs/macx-g++40/qplatformdefs.h +++ b/mkspecs/macx-g++40/qplatformdefs.h @@ -39,59 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/mac/qplatformdefs.h" -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include <unistd.h> - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include <pthread.h> -#include <dirent.h> -#include <fcntl.h> -#include <grp.h> -#include <pwd.h> -#include <signal.h> -#define QT_NO_LIBRARY_UNLOAD - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/ipc.h> -#include <sys/time.h> -#include <sys/shm.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <netinet/in.h> -#ifndef QT_NO_IPV6IFNAME -#include <net/if.h> -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T -#undef QT_SIGNAL_IGNORE - -#define QT_OPEN_LARGEFILE 0 - -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#define QT_SIGNAL_IGNORE (void (*)(int))1 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf index fb93697..08305ba 100644 --- a/mkspecs/macx-g++42/qmake.conf +++ b/mkspecs/macx-g++42/qmake.conf @@ -16,6 +16,8 @@ QMAKE_INCREMENTAL_STYLE = sublib QMAKE_CC = gcc-4.2 QMAKE_CXX = g++-4.2 -include(../common/mac-g++.conf) +include(../common/mac.conf) +include(../common/gcc-base-mac.conf) +include(../common/g++-mac.conf) load(qt_config) diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h index 99d64ef..5bdef57 100644 --- a/mkspecs/macx-g++42/qplatformdefs.h +++ b/mkspecs/macx-g++42/qplatformdefs.h @@ -39,59 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/mac/qplatformdefs.h" -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include <unistd.h> - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include <pthread.h> -#include <dirent.h> -#include <fcntl.h> -#include <grp.h> -#include <pwd.h> -#include <signal.h> -#define QT_NO_LIBRARY_UNLOAD - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/ipc.h> -#include <sys/time.h> -#include <sys/shm.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <netinet/in.h> -#ifndef QT_NO_IPV6IFNAME -#include <net/if.h> -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T -#undef QT_SIGNAL_IGNORE - -#define QT_OPEN_LARGEFILE 0 - -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#define QT_SIGNAL_IGNORE (void (*)(int))1 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-icc/qplatformdefs.h b/mkspecs/macx-icc/qplatformdefs.h index d46381c..5bdef57 100644 --- a/mkspecs/macx-icc/qplatformdefs.h +++ b/mkspecs/macx-icc/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../macx-g++/qplatformdefs.h" +#include "../common/mac/qplatformdefs.h" diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf index d46baea..0064fb0 100644 --- a/mkspecs/macx-llvm/qmake.conf +++ b/mkspecs/macx-llvm/qmake.conf @@ -13,6 +13,8 @@ CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -include(../common/mac-llvm.conf) +include(../common/mac.conf) +include(../common/llvm.conf) +include(../common/gcc-base-mac.conf) load(qt_config) diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h index 99d64ef..5bdef57 100644 --- a/mkspecs/macx-llvm/qplatformdefs.h +++ b/mkspecs/macx-llvm/qplatformdefs.h @@ -39,59 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/mac/qplatformdefs.h" -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include <unistd.h> - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include <pthread.h> -#include <dirent.h> -#include <fcntl.h> -#include <grp.h> -#include <pwd.h> -#include <signal.h> -#define QT_NO_LIBRARY_UNLOAD - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/ipc.h> -#include <sys/time.h> -#include <sys/shm.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <netinet/in.h> -#ifndef QT_NO_IPV6IFNAME -#include <net/if.h> -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T -#undef QT_SIGNAL_IGNORE - -#define QT_OPEN_LARGEFILE 0 - -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#define QT_SIGNAL_IGNORE (void (*)(int))1 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-xcode/qmake.conf b/mkspecs/macx-xcode/qmake.conf index 3a4a500..dc79b3d 100755 --- a/mkspecs/macx-xcode/qmake.conf +++ b/mkspecs/macx-xcode/qmake.conf @@ -9,10 +9,16 @@ TEMPLATE = app CONFIG += qt warn_on release lib_version_first incremental plugin_no_soname link_prl app_bundle QT += core gui -include(../common/mac-g++.conf) +include(../common/mac.conf) +include(../common/gcc-base-mac.conf) +include(../common/g++-mac.conf) -QMAKE_CC = -QMAKE_CXX = +QMAKE_CC = +QMAKE_CXX = +QMAKE_LINK = +QMAKE_LINK_C = +QMAKE_LINK_C_SHLIB = +QMAKE_LINK_SHLIB = QMAKE_CFLAGS_HIDESYMS = QMAKE_CFLAGS_PPC_64 = QMAKE_CFLAGS_X86_64 = diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h index 99d64ef..5bdef57 100644 --- a/mkspecs/macx-xcode/qplatformdefs.h +++ b/mkspecs/macx-xcode/qplatformdefs.h @@ -39,59 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/mac/qplatformdefs.h" -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include <unistd.h> - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include <pthread.h> -#include <dirent.h> -#include <fcntl.h> -#include <grp.h> -#include <pwd.h> -#include <signal.h> -#define QT_NO_LIBRARY_UNLOAD - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/ipc.h> -#include <sys/time.h> -#include <sys/shm.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <netinet/in.h> -#ifndef QT_NO_IPV6IFNAME -#include <net/if.h> -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T -#undef QT_SIGNAL_IGNORE - -#define QT_OPEN_LARGEFILE 0 - -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#define QT_SIGNAL_IGNORE (void (*)(int))1 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/qws/linux-arm-g++/qmake.conf b/mkspecs/qws/linux-arm-g++/qmake.conf index 7e0a3b4..7b37813 100644 --- a/mkspecs/qws/linux-arm-g++/qmake.conf +++ b/mkspecs/qws/linux-arm-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with arm-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf index 3611421..e1ad837 100644 --- a/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf +++ b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with arm-none-linux-gnueabi-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-armv6-g++/qmake.conf b/mkspecs/qws/linux-armv6-g++/qmake.conf index cd7ecca..0e2473c 100644 --- a/mkspecs/qws/linux-armv6-g++/qmake.conf +++ b/mkspecs/qws/linux-armv6-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building for ARMv6 devices with arm-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-avr32-g++/qmake.conf b/mkspecs/qws/linux-avr32-g++/qmake.conf index 057c938..32c0444 100644 --- a/mkspecs/qws/linux-avr32-g++/qmake.conf +++ b/mkspecs/qws/linux-avr32-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with avr32-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-cellon-g++/qmake.conf b/mkspecs/qws/linux-cellon-g++/qmake.conf index 363a3ce..ad66c3c 100644 --- a/mkspecs/qws/linux-cellon-g++/qmake.conf +++ b/mkspecs/qws/linux-cellon-g++/qmake.conf @@ -6,8 +6,9 @@ # qmake configuration for building with arm-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-dm7000-g++/qmake.conf b/mkspecs/qws/linux-dm7000-g++/qmake.conf index aea2647..c897091 100644 --- a/mkspecs/qws/linux-dm7000-g++/qmake.conf +++ b/mkspecs/qws/linux-dm7000-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for linux-dm7000-g++, for Dream Multimedia's DM7000S # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-dm800-g++/qmake.conf b/mkspecs/qws/linux-dm800-g++/qmake.conf index fca93b4..002e4c7 100644 --- a/mkspecs/qws/linux-dm800-g++/qmake.conf +++ b/mkspecs/qws/linux-dm800-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for linux-dm800-g++, for Dream Multimedia's DM800 # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-generic-g++-32/qmake.conf b/mkspecs/qws/linux-generic-g++-32/qmake.conf index 81af4ab..249c10aa 100644 --- a/mkspecs/qws/linux-generic-g++-32/qmake.conf +++ b/mkspecs/qws/linux-generic-g++-32/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with arm-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-generic-g++/qmake.conf b/mkspecs/qws/linux-generic-g++/qmake.conf index a026e88..e803d0d 100644 --- a/mkspecs/qws/linux-generic-g++/qmake.conf +++ b/mkspecs/qws/linux-generic-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) load(qt_config) diff --git a/mkspecs/qws/linux-ipaq-g++/qmake.conf b/mkspecs/qws/linux-ipaq-g++/qmake.conf index 59f4e6e..f9d33b3 100644 --- a/mkspecs/qws/linux-ipaq-g++/qmake.conf +++ b/mkspecs/qws/linux-ipaq-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with arm-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-lsb-g++/qmake.conf b/mkspecs/qws/linux-lsb-g++/qmake.conf index 8b66228..4b35925 100644 --- a/mkspecs/qws/linux-lsb-g++/qmake.conf +++ b/mkspecs/qws/linux-lsb-g++/qmake.conf @@ -3,10 +3,12 @@ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) + QMAKE_LSB = 1 # modifications to g++.conf diff --git a/mkspecs/qws/linux-mips-g++/qmake.conf b/mkspecs/qws/linux-mips-g++/qmake.conf index 3c55342..1a86078 100644 --- a/mkspecs/qws/linux-mips-g++/qmake.conf +++ b/mkspecs/qws/linux-mips-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with mipsel-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-powerpc-g++/qmake.conf b/mkspecs/qws/linux-powerpc-g++/qmake.conf index e1926b4..6a6310a 100644 --- a/mkspecs/qws/linux-powerpc-g++/qmake.conf +++ b/mkspecs/qws/linux-powerpc-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-sh-g++/qmake.conf b/mkspecs/qws/linux-sh-g++/qmake.conf index 61b57a3..004780a 100644 --- a/mkspecs/qws/linux-sh-g++/qmake.conf +++ b/mkspecs/qws/linux-sh-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building for SH devices with sh3-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-sh4al-g++/qmake.conf b/mkspecs/qws/linux-sh4al-g++/qmake.conf index 9caebdf..71f6b3d 100644 --- a/mkspecs/qws/linux-sh4al-g++/qmake.conf +++ b/mkspecs/qws/linux-sh4al-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building for SH4AL-DSP devices with sh3-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-sharp-g++/qmake.conf b/mkspecs/qws/linux-sharp-g++/qmake.conf index 083e4e8..6a000b9 100644 --- a/mkspecs/qws/linux-sharp-g++/qmake.conf +++ b/mkspecs/qws/linux-sharp-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with arm-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-x86-g++/qmake.conf b/mkspecs/qws/linux-x86-g++/qmake.conf index 7e28d4e..55011ec 100644 --- a/mkspecs/qws/linux-x86-g++/qmake.conf +++ b/mkspecs/qws/linux-x86-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) load(qt_config) diff --git a/mkspecs/qws/linux-x86_64-g++/qmake.conf b/mkspecs/qws/linux-x86_64-g++/qmake.conf index d4e6189..e18d055 100644 --- a/mkspecs/qws/linux-x86_64-g++/qmake.conf +++ b/mkspecs/qws/linux-x86_64-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/qws/linux-zylonite-g++/qmake.conf b/mkspecs/qws/linux-zylonite-g++/qmake.conf index 97ae600..f50b70f 100644 --- a/mkspecs/qws/linux-zylonite-g++/qmake.conf +++ b/mkspecs/qws/linux-zylonite-g++/qmake.conf @@ -2,8 +2,9 @@ # qmake configuration for building with arm-linux-g++ # -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index faac2f1..10d8ffd 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -4,7 +4,8 @@ include(../../common/symbian/symbian-makefile.conf) -include(../../common/g++.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) QMAKE_CC = arm-none-symbianelf-gcc QMAKE_CXX = arm-none-symbianelf-g++ diff --git a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf index 28e7754..c362634 100644 --- a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf +++ b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf @@ -18,8 +18,9 @@ CONFIG += qt warn_on release incremental link_prl QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -include(../../common/g++.conf) include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) # modifications to g++.conf QMAKE_CC = sb2 gcc diff --git a/mkspecs/unsupported/qnx-g++/qmake.conf b/mkspecs/unsupported/qnx-g++/qmake.conf index dfe9bed..83c4a26 100644 --- a/mkspecs/unsupported/qnx-g++/qmake.conf +++ b/mkspecs/unsupported/qnx-g++/qmake.conf @@ -10,7 +10,8 @@ TEMPLATE = app CONFIG += qt warn_on release link_prl QT += core gui -include(../common/g++.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) include(../common/unix.conf) QMAKE_CFLAGS_THREAD = -D_REENTRANT diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf index 80b5f3e..7a77c81 100644 --- a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf +++ b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf @@ -14,7 +14,8 @@ VXWORKS_ARCH = ppc VXWORKS_CPU = PPC32 VXWORKS_ARCH_MUNCH = ppc -include(../../common/g++.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/linux.conf) QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf index 83f46c0..2a96a1a 100644 --- a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf +++ b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf @@ -14,7 +14,8 @@ VXWORKS_ARCH = simlinux VXWORKS_CPU = SIMLINUX VXWORKS_ARCH_MUNCH = pentium -include(../../common/g++.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) include(../../common/linux.conf) QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH |