Index: trunk/qmake/Makefile.os2-g++
===================================================================
--- trunk/qmake/Makefile.os2-g++	(revision 9)
+++ trunk/qmake/Makefile.os2-g++	(revision 10)
@@ -10,21 +10,21 @@
 
 #
-# specific stuff for mingw g++ make
+# specific stuff for GNU make
 #
 CXX	    =	g++
-CFLAGS	    =	-c -o$@ -O \
+CFLAGS	    =	-c -o$@ -O -s -Zomf \
 		-I. -Igenerators -Igenerators/unix \
-		-Igenerators/win32 -Igenerators/mac \
+		-Igenerators/win32 -Igenerators/os2 -Igenerators/mac \
 		-I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore \
 		-I$(SOURCE_PATH)/include -I$(SOURCE_PATH)/include/QtCore \
 		-I$(BUILD_PATH)/src/corelib/global \
 	        -I$(BUILD_PATH)/include/QtScript \
-		-I$(SOURCE_PATH)/mkspecs/win32-g++  \
+		-I$(SOURCE_PATH)/mkspecs/os2-g++  \
 		-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \
-	       	-DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \
+	       	-DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DHAVE_QCONFIG_CPP \
 	       	-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM
 CXXFLAGS    =   $(CFLAGS)
-LFLAGS	    =
-LIBS	    = -lole32 -luuid
+LFLAGS	    =   -s -Zomf -Zstack 0x2000 -Zlinker /PM:VIO -Zlinker /EXEPACK:2
+LIBS	    =   -lregistry.dll
 LINKQMAKE   =	g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
 ADDCLEAN    =
@@ -36,5 +36,5 @@
               makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
               borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \
-              msvc_objectmodel.o
+              msvc_objectmodel.o gnumake.o
 
 ifdef QMAKE_OPENSOURCE_EDITION
@@ -60,6 +60,6 @@
 	qfsfileengine.o \
 	qfsfileengine_iterator.o \
-	qfsfileengine_win.o \
-	qfsfileengine_iterator_win.o \
+	qfsfileengine_pm.o \
+	qfsfileengine_iterator_pm.o \
 	qglobal.o \
 	qhash.o \
@@ -79,5 +79,5 @@
 	qurl.o \
 	qsettings.o \
-	qsettings_win.o \
+	qsettings_pm.o \
 	qvariant.o \
 	qmetatype.o \
@@ -131,8 +131,8 @@
 
 clean::
-	-del $(OBJS) $(QTOBJS) $(ADDCLEAN)
+	-del $(OBJS) $(QTOBJS) $(ADDCLEAN) >nul 2>&1
 
 distclean:: clean
-	-del qmake
+	-del qmake.exe >nul 2>&1
 
 .c.o:
@@ -145,6 +145,6 @@
 	$(CXX) $(CXXFLAGS) $(BUILD_PATH)/src/corelib/global/qconfig.cpp
 
-qsettings_win.o: $(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp
-	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp
+qsettings_pm.o: $(SOURCE_PATH)/src/corelib/io/qsettings_pm.cpp
+	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qsettings_pm.cpp
 
 qsettings.o: $(SOURCE_PATH)/src/corelib/io/qsettings.cpp
@@ -220,9 +220,9 @@
 	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp
 
-qfsfileengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp
-	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp
-
-qfsfileengine_iterator_win.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_win.cpp
-	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_win.cpp
+qfsfileengine_pm.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_pm.cpp
+	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_pm.cpp
+
+qfsfileengine_iterator_pm.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_pm.cpp
+	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_pm.cpp
 
 qfsfileengine.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp
@@ -295,4 +295,7 @@
 	$(CXX) $(CXXFLAGS) generators/win32/msvc_objectmodel.cpp
 
+gnumake.obj: $(SOURCE_PATH)/qmake/generators/os2/gnumake.cpp
+	$(CXX) $(CXXFLAGS) generators/os2/gnumake.cpp
+
 project.o: $(SOURCE_PATH)/qmake/project.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h
 	$(CXX) $(CXXFLAGS) project.cpp
Index: trunk/qmake/generators/os2/gnumake.cpp
===================================================================
--- trunk/qmake/generators/os2/gnumake.cpp	(revision 9)
+++ trunk/qmake/generators/os2/gnumake.cpp	(revision 10)
@@ -40,5 +40,5 @@
 ****************************************************************************/
 
-#include "mingw_make.h"
+#include "gnumake.h"
 #include "option.h"
 #include "meta.h"
@@ -50,5 +50,5 @@
 QT_BEGIN_NAMESPACE
 
-MingwMakefileGenerator::MingwMakefileGenerator() : Win32MakefileGenerator(), init_flag(false)
+GNUMakefileGenerator::GNUMakefileGenerator() : Win32MakefileGenerator(), init_flag(false)
 {
     if (Option::shellPath.isEmpty())
@@ -58,5 +58,5 @@
 }
 
-bool MingwMakefileGenerator::isWindowsShell() const
+bool GNUMakefileGenerator::isWindowsShell() const
 {
 #ifdef Q_OS_WIN
@@ -67,5 +67,5 @@
 }
 
-QString MingwMakefileGenerator::escapeDependencyPath(const QString &path) const
+QString GNUMakefileGenerator::escapeDependencyPath(const QString &path) const
 {
     QString ret = path;
@@ -76,10 +76,10 @@
 }
 
-QString MingwMakefileGenerator::getLibTarget()
+QString GNUMakefileGenerator::getLibTarget()
 {
     return QString("lib" + project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".a");
 }
 
-bool MingwMakefileGenerator::findLibraries()
+bool GNUMakefileGenerator::findLibraries()
 {
     QStringList &l = project->values("QMAKE_LIBS");
@@ -124,5 +124,5 @@
 }
 
-bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
+bool GNUMakefileGenerator::writeMakefile(QTextStream &t)
 {
     writeHeader(t);
@@ -150,5 +150,5 @@
             return true;
         }
-        writeMingwParts(t);
+        writeGNUParts(t);
         return MakefileGenerator::writeMakefile(t);
     }
@@ -198,5 +198,5 @@
 }
 
-void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
+void GNUMakefileGenerator::writeGNUParts(QTextStream &t)
 {
     writeStandardParts(t);
@@ -219,5 +219,5 @@
 }
 
-void MingwMakefileGenerator::init()
+void GNUMakefileGenerator::init()
 {
     if(init_flag)
@@ -309,5 +309,5 @@
 }
 
-void MingwMakefileGenerator::fixTargetExt()
+void GNUMakefileGenerator::fixTargetExt()
 {
     if (project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
@@ -320,5 +320,5 @@
 }
 
-void MingwMakefileGenerator::writeIncPart(QTextStream &t)
+void GNUMakefileGenerator::writeIncPart(QTextStream &t)
 {
     t << "INCPATH       = ";
@@ -335,5 +335,5 @@
 }
 
-void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
+void GNUMakefileGenerator::writeLibsPart(QTextStream &t)
 {
     if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
@@ -349,5 +349,5 @@
 }
 
-void MingwMakefileGenerator::writeLibDirPart(QTextStream &t)
+void GNUMakefileGenerator::writeLibDirPart(QTextStream &t)
 {
     QStringList libDirs = project->values("QMAKE_LIBDIR");
@@ -357,5 +357,5 @@
 }
 
-void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
+void GNUMakefileGenerator::writeObjectsPart(QTextStream &t)
 {
     if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
@@ -379,5 +379,5 @@
 }
 
-void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
+void GNUMakefileGenerator::writeBuildRulesPart(QTextStream &t)
 {
     t << "first: all" << endl;
@@ -400,5 +400,5 @@
 }
 
-void MingwMakefileGenerator::writeRcFilePart(QTextStream &t)
+void GNUMakefileGenerator::writeRcFilePart(QTextStream &t)
 {
     const QString rc_file = fileFixify(project->first("RC_FILE"));
@@ -410,10 +410,10 @@
     if (!rc_file.isEmpty()) {
         t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t"
-          << var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE") 
+          << var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE")
           << " --include-dir=" << incPathStr << endl << endl;
     }
 }
 
-void MingwMakefileGenerator::processPrlVariable(const QString &var, const QStringList &l)
+void GNUMakefileGenerator::processPrlVariable(const QString &var, const QStringList &l)
 {
     if (var == "QMAKE_PRL_LIBS") {
@@ -431,5 +431,5 @@
 }
 
-QStringList &MingwMakefileGenerator::findDependencies(const QString &file)
+QStringList &GNUMakefileGenerator::findDependencies(const QString &file)
 {
     QStringList &aList = MakefileGenerator::findDependencies(file);
Index: trunk/qmake/generators/os2/gnumake.h
===================================================================
--- trunk/qmake/generators/os2/gnumake.h	(revision 9)
+++ trunk/qmake/generators/os2/gnumake.h	(revision 10)
@@ -40,6 +40,6 @@
 ****************************************************************************/
 
-#ifndef MINGW_MAKE_H
-#define MINGW_MAKE_H
+#ifndef GNUMAKE_H
+#define GNUMAKE_H
 
 #include "winmakefile.h"
@@ -47,9 +47,9 @@
 QT_BEGIN_NAMESPACE
 
-class MingwMakefileGenerator : public Win32MakefileGenerator
+class GNUMakefileGenerator : public Win32MakefileGenerator
 {
 public:
-    MingwMakefileGenerator();
-    ~MingwMakefileGenerator();
+    GNUMakefileGenerator();
+    ~GNUMakefileGenerator();
 protected:
     QString escapeDependencyPath(const QString &path) const;
@@ -57,5 +57,5 @@
 private:
     bool isWindowsShell() const;
-    void writeMingwParts(QTextStream &);
+    void writeGNUParts(QTextStream &);
     void writeIncPart(QTextStream &t);
     void writeLibsPart(QTextStream &t);
@@ -69,5 +69,5 @@
 
     QStringList &findDependencies(const QString &file);
-    
+
     QString preCompHeaderOut;
 
@@ -80,8 +80,8 @@
 };
 
-inline MingwMakefileGenerator::~MingwMakefileGenerator()
+inline GNUMakefileGenerator::~GNUMakefileGenerator()
 { }
 
 QT_END_NAMESPACE
 
-#endif // MINGW_MAKE_H
+#endif // GNUMAKE_H
