2010-08-11 James Hawkins <jhawkins@chromium.org>
[WebKit-https.git] / WebKit.pri
index 7b68edb..21404dd 100644 (file)
@@ -6,20 +6,8 @@
 CONFIG(QTDIR_build): CONFIG += standalone_package
 else:exists($$PWD/WebCore/generated): CONFIG += standalone_package
 
-CONFIG(standalone_package) {
-    OUTPUT_DIR=$$PWD
-}
-
 CONFIG += depend_includepath
 
-isEmpty(OUTPUT_DIR) {
-    CONFIG(debug, debug|release) {
-        OUTPUT_DIR=$$PWD/WebKitBuild/Debug
-    } else { # Release
-        OUTPUT_DIR=$$PWD/WebKitBuild/Release
-    }
-}
-
 DEFINES += BUILDING_QT__=1
 building-libs {
     win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
@@ -28,17 +16,29 @@ building-libs {
         QT += webkit
     } else {
         QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
+        QTWEBKITLIBNAME = QtWebKit
         mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
-            LIBS += -framework QtWebKit
+            LIBS += -framework $$QTWEBKITLIBNAME
             QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH
         } else {
-            win32-*|wince* {
-                LIBS += -lQtWebKit$${QT_MAJOR_VERSION}
+            build_pass: win32-*|wince* {
+                !CONFIG(release, debug|release): QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
+                QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION}
+                win32-g++*: LIBS += -l$$QTWEBKITLIBNAME
+                else: LIBS += $${QTWEBKITLIBNAME}.lib
             } else {
                 LIBS += -lQtWebKit
                 symbian {
                     TARGET.EPOCSTACKSIZE = 0x14000 // 80 kB
-                    TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
+                    # For EXEs only: set heap to usable value
+                    TARGET.EPOCHEAPSIZE = 
+                    heapSizeRule = \
+                    "$${LITERAL_HASH}ifdef WINSCW" \
+                        "EPOCHEAPSIZE  0x40000 0x2000000 // Min 256kB, Max 32MB" \
+                    "$${LITERAL_HASH}else" \
+                        "EPOCHEAPSIZE  0x40000 0x6000000 // Min 256kB, Max 96MB" \
+                    "$${LITERAL_HASH}endif"
+                    MMP_RULES += heapSizeRule
                 }
             }
         }
@@ -56,16 +56,20 @@ CONFIG(release, debug|release) {
 }
 
 BASE_DIR = $$PWD
-INCLUDEPATH += $$PWD/WebKit/qt/Api
+
+symbian {
+    INCLUDEPATH += $$PWD/include/QtWebKit
+} else {
+    INCLUDEPATH += $$OUTPUT_DIR/include/QtWebKit
+}
 
 CONFIG -= warn_on
-*-g++*:QMAKE_CXXFLAGS += -Wall -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self
+*-g++*:QMAKE_CXXFLAGS += -Wall -Wextra -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self
 
 # Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT
 symbian|*-armcc {
     RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293
     RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates
-    DEFINES *= QT_NO_UITOOLS
 }
 
 *-armcc {
@@ -77,6 +81,8 @@ symbian {
     QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS
 }
 
+symbian|maemo5: DEFINES *= QT_NO_UITOOLS
+
 contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
 
 # Disable a few warnings on Windows. The warnings are also