Index: /trunk/mkspecs/features/os2/default_pre.prf
===================================================================
--- /trunk/mkspecs/features/os2/default_pre.prf	(revision 104)
+++ /trunk/mkspecs/features/os2/default_pre.prf	(revision 104)
@@ -0,0 +1,173 @@
+load(default_pre)
+
+#
+# splitDllBegin(part_list [, config [, exclusive_config_list]])
+#
+# Splits the DLL target to several separate parts according to part_list where
+# each part is a suffix appended to the original DLL name and the number of
+# parts determines the number of resulting DLLs.
+#
+# An optional config argument specifies the CONFIG scope in which the split
+# should occur. In this case, exclusive_config_list may be used to specify
+# a |-separated list of mutually exclusive scopes so that the last one added
+# will be actually in effect.
+#
+# This function only begins the split process. In order to make it work,
+# the splitDllPart function must be used to define the sources for each part
+# and then splitDllEnd is called to finalize the split process. See individual
+# function descriptions for more details.
+#
+defineTest(splitDllBegin) {
+
+    !dll:error("splitDllBegin may only be used for DLLs!")
+
+    1 = $$unique(1)
+    !count(1, 2, >=):error("splitDllBegin: argument 1 must contain 2 or more unique words!")
+
+    SPLIT_PARTS = $$1
+    export(SPLIT_PARTS)
+
+    isEmpty(2):2 = true
+    SPLIT_CONFIG = $$2
+    count(ARGS, 3, >=) {
+        !CONFIG($$2, $$3):SPLIT_CONFIG = false
+    }
+    export(SPLIT_CONFIG)
+
+    # add part label to CONFIG when needed
+    debug_and_release {
+        for(a, 1) {
+            equals(a, "."):a =
+            eval($${a}.CONFIG = Part$${a})
+            export($${a}.CONFIG)
+        }
+    }
+
+    debug_and_release {
+        BUILDS = $$replace(1, "\.", "Build")
+    } else {
+        BUILDS = $$join(1, " Part", "Part")
+        BUILDS = $$replace(BUILDS, "Part\.", "Part")
+    }
+    export(BUILDS)
+
+    !build_pass: return(true)
+
+    # this is necessary to store LIBS as QMAKE_PRL_LIBS in the generated .prl
+    CONFIG += explicitlib
+
+    # define _VERSION_OVERRIDE statements if needed
+    for(a, 1) {
+        !equals(a, ".") {
+            eval(tmp = $$eval(QMAKE_$${upper($$TARGET)}_VERSION_OVERRIDE))
+            !isEmpty(tmp) {
+                eval(QMAKE_$${upper($$TARGET)}$${a}_VERSION_OVERRIDE = $$tmp)
+                export(QMAKE_$${upper($$TARGET)}$${a}_VERSION_OVERRIDE)
+            }
+        }
+    }
+
+    export(CONFIG)
+
+    rest = $$1
+
+    for(a, 1) {
+        rest -= $$a
+
+        equals(a, "."):scope = Part
+        else:scope = Part$${a}
+
+        CONFIG($$SPLIT_CONFIG):CONFIG($$scope) {
+            # add the other parts to LIBS of this part
+            for(b, 1) {
+                !equals(b, $${a}) {
+                    equals(b, "."):b =
+            	    eval(LIBS += -l$${TARGET}$${b})
+                }
+            }
+            !isEmpty(LIBS):export(LIBS)
+            QMAKE_LIBDIR += $(DESTDIR)
+            export(QMAKE_LIBDIR)
+
+            # add the pre-link step for all but the last part
+            next = $$member(rest)
+            !isEmpty(next) {
+                debug_and_release {
+                    equals(next, "."):next =
+                    else:next = "-"$${lower($$next)}
+                    CONFIG(release, debug|release):bld = release
+                    else:bld = debug
+                    eval(QMAKE_PRE_LINK = $(MAKE) $${bld}$${next})
+                } else {
+                    equals(next, "."):next = Part
+                    else:next = Part$${next}
+                	eval(QMAKE_PRE_LINK = $(MAKE) $${next})
+                }
+            	export(QMAKE_PRE_LINK)
+            }
+
+            # override the target
+            !equals(a, ".") {
+                TARGET = $${TARGET}$${a}
+                export(TARGET)
+            }
+        }
+    }
+}
+
+#
+# splitDllPart(part)
+#
+# Gathers the sources for the specified DLL part by taking the current
+# HEADERS and SOURCES values and then resets these variables. Must be called
+# once for each part defined in splitDllBegin.
+#
+defineTest(splitDllPart) {
+
+    !dll:error("splitDllPart may only be used for DLLs!")
+    !contains(SPLIT_PARTS, $$1):error("splitDllPart: part '$$1' is not defined by splitDllBegin!")
+
+    !build_pass:return(true)
+
+    equals(1, "."):scope = Part
+    else:scope = Part$${1}
+
+    CONFIG($$SPLIT_CONFIG) {
+        CONFIG($$scope): {
+            eval($${scope}_HEADERS = $$HEADERS)
+            export($${scope}_HEADERS)
+            eval($${scope}_SOURCES = $$SOURCES)
+            export($${scope}_SOURCES)
+        }
+
+        unset(HEADERS)
+        export(HEADERS)
+        unset(SOURCES)
+        export(SOURCES)
+    }
+}
+
+#
+# splitDllEnd()
+#
+# Finalizes the split process started by splitDllBegin. Must be called
+# after splitDllPart calls for each part are made.
+#
+defineTest(splitDllEnd) {
+
+    !dll:error("splitDllEnd may only be used for DLLs!")
+
+    !build_pass:return(true)
+
+    for(a, SPLIT_PARTS) {
+        equals(a, "."):scope = Part
+        else:scope = Part$${a}
+
+        CONFIG($$SPLIT_CONFIG):CONFIG($$scope) {
+            eval(HEADERS = $$eval($${scope}_HEADERS))
+            eval(SOURCES = $$eval($${scope}_SOURCES))
+            export(HEADERS)
+            export(SOURCES)
+        }
+    }
+}
Index: /trunk/src/qbase.pri
===================================================================
--- /trunk/src/qbase.pri	(revision 103)
+++ /trunk/src/qbase.pri	(revision 104)
@@ -17,5 +17,5 @@
 
 #version overriding
-win32 {
+win32|os2 {
     #because libnetwork.pro could be qmake'd (qmade?) before libqcore.pro we
     #need to override the version of libq* in all other libq*'s just to be
