diff options
author | Liang Qi <liang.qi@nokia.com> | 2010-10-26 13:40:04 (GMT) |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2010-10-26 13:40:04 (GMT) |
commit | dbf03a71487107999d58972a3e18244e9b8139c8 (patch) | |
tree | f6c39c5a638f2fffc79393e2ac392aa4e222af33 /mkspecs | |
parent | 2d071521228a6bc9ef423cbdbbd8560d28208790 (diff) | |
parent | f12bb81ff7dc88861b68fa5f218c1e5d0767257b (diff) | |
download | Qt-dbf03a71487107999d58972a3e18244e9b8139c8.zip Qt-dbf03a71487107999d58972a3e18244e9b8139c8.tar.gz Qt-dbf03a71487107999d58972a3e18244e9b8139c8.tar.bz2 |
Merge branch 'macMakefileBuildSupport' into master.
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/common/symbian/symbian-makefile.conf | 4 | ||||
-rw-r--r-- | mkspecs/features/qt_functions.prf | 8 | ||||
-rw-r--r-- | mkspecs/features/symbian/def_files.prf | 18 | ||||
-rw-r--r-- | mkspecs/features/symbian/do_not_build_as_thumb.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/symbian/symbian_building.prf | 56 | ||||
-rw-r--r-- | mkspecs/symbian-armcc/features/default_post.prf (renamed from mkspecs/symbian/linux-gcce/features/default_post.prf) | 0 | ||||
-rw-r--r-- | mkspecs/symbian-armcc/qmake.conf (renamed from mkspecs/symbian/linux-armcc/qmake.conf) | 6 | ||||
-rw-r--r-- | mkspecs/symbian-armcc/qplatformdefs.h (renamed from mkspecs/symbian/linux-armcc/qplatformdefs.h) | 2 | ||||
-rw-r--r-- | mkspecs/symbian-gcce/features/default_post.prf (renamed from mkspecs/symbian/linux-armcc/features/default_post.prf) | 0 | ||||
-rw-r--r-- | mkspecs/symbian-gcce/qmake.conf (renamed from mkspecs/symbian/linux-gcce/qmake.conf) | 7 | ||||
-rw-r--r-- | mkspecs/symbian-gcce/qplatformdefs.h (renamed from mkspecs/symbian/linux-gcce/qplatformdefs.h) | 2 |
11 files changed, 67 insertions, 38 deletions
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 364e91b..9dc3674 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -30,9 +30,9 @@ QMAKE_EXTENSION_STATICLIB = lib QMAKE_SYMBIAN_SHLIB = 1 is_using_gnupoc { - DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\\> + DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh>\" } else { - DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh\\> + DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh>\" } DEFINES *= \ __SYMBIAN32__ \ diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index afc708a..e5ef5a1 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -87,6 +87,12 @@ defineTest(qtPrepareTool) { else:$$1 = $$[QT_INSTALL_BINS]/$$2 } $$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP, - contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.exe$):$$1 = $$eval($$1).exe + contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) { + exists($$eval($$1).bat) { + $$1 = $$eval($$1).bat + } else { + $$1 = $$eval($$1).exe + } + } export($$1) } diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index f243878..1c11925 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -7,6 +7,18 @@ CONFIG -= def_files_disabled equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "") else:clean_TARGET = $$TARGET +defineTest(qtTestIfDirExists) { + contains(QMAKE_HOST.os,Windows) { + dirToTest = $$1 + $$dirToTest ~= s,/,\\, + # Windows trick. Test for existence of nul, which every directory has. + retValue = $$system("if exist $$dirToTest\\nul echo true") + contains(retValue, true):return(true)|return(false) + } else { + system("test -d $$1"):return(true)|return(false) + } +} + symbian-abld|symbian-sbsv2 { # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements @@ -52,9 +64,11 @@ symbian-abld|symbian-sbsv2 { } else { defFile = . } - system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") { + qtTestIfDirExists($$_PRO_FILE_PWD_/$$defFile) { !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") { - system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi") + dirToCreate = $$_PRO_FILE_PWD_/$$defFile/eabi + contains(QMAKE_HOST.os,Windows):dirToCreate ~= s,/,\\, + system("$$QMAKE_MKDIR $$dirToCreate") } elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(clean_TARGET)u.def } else { diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf index 60d9382..0f1fd9f 100644 --- a/mkspecs/features/symbian/do_not_build_as_thumb.prf +++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf @@ -1,6 +1,6 @@ symbian-abld|symbian-sbsv2 { MMP_RULES += ALWAYS_BUILD_AS_ARM -} else:linux-armcc { +} else:symbian-armcc { QMAKE_CFLAGS -= --thumb QMAKE_CFLAGS += --arm QMAKE_CXXFLAGS -= --thumb diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 1a51cb2..a2791a1 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -1,7 +1,7 @@ -linux-armcc { +symbian-armcc { QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC -} else:linux-gcce { +} else:symbian-gcce { QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE } @@ -16,7 +16,7 @@ else:clean_TARGET = $$TARGET !contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_LFLAGS) !isEmpty(TMPVAR) { QMAKE_LFLAGS += $$TMPVAR -} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains +} else :symbian-gcce { # lets provide a simple default. Without elf2e32 complains QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 } @@ -62,8 +62,8 @@ for(libToProcess, libsToProcess) { } else { qt_newLib = $$processSymbianLibrary($$qt_library) contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib - linux-gcce:qt_newLib = "-l:$$qt_newLib" - eval($$libToProcess += \$\$qt_newLib) + symbian-gcce:qt_newLib = "-l:$$qt_newLib" + eval($$libToProcess *= \$\$qt_newLib) } } } @@ -89,12 +89,13 @@ count(splitVersion, 0) { decVersion = "10.0" } else { count(splitVersion, 3) { - hexVersion = $$system("sh -c 'printf %02x $$member(splitVersion, 0)'") - hexPart2 = $$system("sh -c 'printf %02x $$member(splitVersion, 1)'")" - hexPart2 = $$hexPart2$$system("sh -c 'printf %02x $$member(splitVersion, 2)'")" - decVersion = $$system("sh -c 'printf %1d 0x$$hexVersion'"). + hexVersion = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 0))\"") + hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")" + hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")" + decVersion = $$system("perl -e \"printf (\\\"%1d\\\", 0x$$hexVersion)\""). hexVersion = $$hexVersion$$hexPart2 - decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'") + decVersion = $$decVersion$$system("perl -e \"printf (\\\"%d\\\", 0x$$hexPart2)\"") + !contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}" } else { # app code may have different numbering... hexVersion = $$VERSION @@ -117,7 +118,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym \ + moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym + contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\) + QMAKE_POST_LINK = $$moveCmd \ && $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \ --sid=$$TARGET.SID \ --uid1=0x10000079 \ @@ -129,7 +132,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { --tmpdso=$${symbianObjdir}/$${baseTarget}.dso \ --dso=$${symbianDestdir}/$${baseTarget}.dso \ --defoutput=$$symbianObjdir/$${baseTarget}.def \ - --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ + --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" \ --heap=$$epoc_heap_size \ --stack=$$TARGET.EPOCSTACKSIZE \ $$elf2e32_LIBPATH \ @@ -142,10 +145,15 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.dso QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.def - linux-armcc: { - LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) - LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) - } else :linux-gcce { + symbian-armcc: { + LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso + # Quotation unfortunately is different on Windows and unix. + contains(QMAKE_HOST.os, Windows) { + LIBS += \"h_t__uf.l(switch8.o)\" edllstub.lib \"edll.lib(uc_dll_.o)\" + } else { + LIBS += h_t__uf.l\\(switch8.o\\) edllstub.lib edll.lib\\(uc_dll_.o\\) + } + } else :symbian-gcce { LIBS += \ -l:edll.lib \ -l:usrt2_2.lib \ @@ -156,13 +164,15 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { -lgcc } - QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll + QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" DEFINES += __DLL__ } contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym \ + moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym + contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\) + QMAKE_POST_LINK = $$moveCmd \ && $$QMAKE_ELF2E32_WRAPPER --version $$decVersion \ --sid=$$TARGET.SID \ --uid1=0x1000007a \ @@ -171,7 +181,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { --targettype=EXE \ --elfinput=$${symbianDestdir}/$${baseTarget}.sym \ --output=$${symbianDestdir}/$${baseTarget}.exe \ - --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ + --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" \ --heap=$$epoc_heap_size \ --stack=$$TARGET.EPOCSTACKSIZE \ $$elf2e32_LIBPATH \ @@ -184,7 +194,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.exe QMAKE_CLEAN += $${symbianDestdir}/$${baseTarget} - linux-armcc: { + symbian-armcc: { QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) contains(CONFIG, "qt"):contains(QT, "gui") { #if linking with QtCore @@ -194,7 +204,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { QMAKE_LIBS -= -llibcrt0.lib QMAKE_LIBS += -llibcrt0.lib } - } else :linux-gcce { + } else :symbian-gcce { # notice that we can't merge these as ordering of arguments is important. QMAKE_LIBS += \ -l:eexe.lib \ @@ -216,12 +226,12 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { QMAKE_LFLAGS += --shared } - QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe + QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" DEFINES += __EXE__ } # Symbian resource files -linux-armcc: { +symbian-armcc: { SYMBIAN_RVCT22INC=$$(RVCT22INC) !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC} } diff --git a/mkspecs/symbian/linux-gcce/features/default_post.prf b/mkspecs/symbian-armcc/features/default_post.prf index 7aa1f4d..7aa1f4d 100644 --- a/mkspecs/symbian/linux-gcce/features/default_post.prf +++ b/mkspecs/symbian-armcc/features/default_post.prf diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian-armcc/qmake.conf index f058421..be6af39 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian-armcc/qmake.conf @@ -1,10 +1,10 @@ # -# qmake configuration for symbian/linux-armcc +# qmake configuration for symbian-armcc # -include(../../common/symbian/symbian-makefile.conf) +include(../common/symbian/symbian-makefile.conf) -include(../../common/armcc.conf) +include(../common/armcc.conf) QMAKE_RVCT_LINKSTYLE = 1 diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian-armcc/qplatformdefs.h index 3b7d023..6f084d3 100644 --- a/mkspecs/symbian/linux-armcc/qplatformdefs.h +++ b/mkspecs/symbian-armcc/qplatformdefs.h @@ -39,4 +39,4 @@ ** ****************************************************************************/ -#include "../../common/symbian/qplatformdefs.h" +#include "../common/symbian/qplatformdefs.h" diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian-gcce/features/default_post.prf index 7aa1f4d..7aa1f4d 100644 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ b/mkspecs/symbian-gcce/features/default_post.prf diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf index 10d8ffd..f012217 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian-gcce/qmake.conf @@ -1,11 +1,10 @@ # -# qmake configuration for symbian/linux-gcce +# qmake configuration for symbian-gcce # -include(../../common/symbian/symbian-makefile.conf) +include(../common/symbian/symbian-makefile.conf) -include(../../common/gcc-base-unix.conf) -include(../../common/g++-unix.conf) +include(../common/g++.conf) QMAKE_CC = arm-none-symbianelf-gcc QMAKE_CXX = arm-none-symbianelf-g++ diff --git a/mkspecs/symbian/linux-gcce/qplatformdefs.h b/mkspecs/symbian-gcce/qplatformdefs.h index fcbd9ea..8549347 100644 --- a/mkspecs/symbian/linux-gcce/qplatformdefs.h +++ b/mkspecs/symbian-gcce/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../../common/symbian/qplatformdefs.h" +#include "../common/symbian/qplatformdefs.h" |