summaryrefslogtreecommitdiff
path: root/qmake/generators/win32/mingw_make.cpp
Side-by-side diff
Diffstat (limited to 'qmake/generators/win32/mingw_make.cpp') (more/less context) (show whitespace changes)
-rw-r--r--qmake/generators/win32/mingw_make.cpp284
1 files changed, 234 insertions, 50 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 7f58a55..c693d6a 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
-** $Id$
**
-** Definition of ________ class.
**
-** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+** Implementation of MingwMakefileGenerator class.
**
-** This file is part of the network module of the Qt GUI Toolkit.
+** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
+**
+** This file is part of qmake.
**
@@ -49,2 +49,8 @@ MingwMakefileGenerator::MingwMakefileGenerator(QMakeProject *p) : Win32MakefileG
bool
+MingwMakefileGenerator::findLibraries() // todo - pascal
+{
+ return TRUE;
+}
+
+bool
MingwMakefileGenerator::writeMakefile(QTextStream &t)
@@ -73,2 +79,17 @@ MingwMakefileGenerator::writeMakefile(QTextStream &t)
+void createLdObjectScriptFile(const QString & fileName, QStringList & objList)
+{
+ QString filePath = Option::output_dir + QDir::separator() + fileName;
+ QFile file(filePath);
+ if (file.open(IO_WriteOnly | IO_Translate )) {
+ QTextStream t(&file);
+ t << "INPUT(" << endl;
+ for (QStringList::Iterator it = objList.begin(); it != objList.end(); ++it ) {
+ t << *it << endl;
+ }
+ t << ");" << endl;
+ file.close();
+ }
+}
+
void
@@ -96,13 +117,12 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
inc.replace(QRegExp("\""), "");
- t << " -I" << inc ;
+ t << " -I" << "\"" << inc << "\"";
}
- t << " -I" << specdir()
- << endl;
+ t << " -I" << "\"" << specdir() << "\"" << endl;
if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
t << "LINK = " << var("QMAKE_LINK") << endl;
- t << "LFLAGS = ";
+ t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
+ t << "LIBS = ";
if ( !project->variables()["QMAKE_LIBDIR"].isEmpty() )
- t << varGlue("QMAKE_LIBDIR","-L",";","") << " ";
- t << var("QMAKE_LFLAGS") << endl;
- t << "LIBS = " << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
+ t << varGlue("QMAKE_LIBDIR","-L\"","\" -L\"","\"") << " ";
+ t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
}
@@ -130,2 +150,4 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
+ t << "INSTALL_FILE= " << var("QMAKE_INSTALL_FILE") << endl;
+ t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
t << endl;
@@ -146,3 +168,10 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << "SOURCES = " << varList("SOURCES") << endl;
-// t << "OBJECTS = " << varList("OBJECTS").replace(QRegExp("\\.obj"),".o") << endl;
+ QString objectsLinkLine;
+ if (!project->variables()["QMAKE_APP_OR_DLL"].isEmpty() &&
+ project->variables()["OBJECTS"].count() > var("QMAKE_LINK_OBJECT_MAX").toUInt()) {
+ createLdObjectScriptFile(var("QMAKE_LINK_OBJECT_SCRIPT"), project->variables()["OBJECTS"]);
+ objectsLinkLine = var("QMAKE_LINK_OBJECT_SCRIPT");
+ } else {
+ objectsLinkLine = "$(OBJECTS)";
+ }
t << "OBJECTS = " << varList("OBJECTS") << endl;
@@ -152,4 +181,27 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << "SRCMOC = " << varList("SRCMOC") << endl;
+ QString objmocLinkLine;
+ if (!project->variables()["QMAKE_APP_OR_DLL"].isEmpty() &&
+ project->variables()["OBJMOC"].count() > var("QMAKE_LINK_OBJECT_MAX").toUInt()) {
+ createLdObjectScriptFile(var("QMAKE_LINK_OBJMOC_SCRIPT"), project->variables()["OBJMOC"]);
+ objmocLinkLine = var("QMAKE_LINK_OBJMOC_SCRIPT");
+ } else {
+ objmocLinkLine = "$(OBJMOC)";
+ }
t << "OBJMOC = " << varList("OBJMOC") << endl;
-// t << "OBJMOC = " << varList("OBJMOC").replace(QRegExp("\\.obj"),".o") << endl;
+ QString extraCompilerDeps;
+ if(!project->isEmpty("QMAKE_EXTRA_WIN_COMPILERS")) {
+ t << "OBJCOMP = " << varList("OBJCOMP") << endl;
+ extraCompilerDeps += " $(OBJCOMP) ";
+
+ QStringList &comps = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
+ for(QStringList::Iterator compit = comps.begin(); compit != comps.end(); ++compit) {
+ QStringList &vars = project->variables()[(*compit) + ".variables"];
+ for(QStringList::Iterator varit = vars.begin(); varit != vars.end(); ++varit) {
+ QStringList vals = project->variables()[(*varit)];
+ if(!vals.isEmpty())
+ t << "QMAKE_COMP_" << (*varit) << " = " << valList(vals) << endl;
+ }
+ }
+ }
+
t << "DIST = " << varList("DISTFILES") << endl;
@@ -174,9 +226,9 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) "
- << var("POST_TARGETDEPS");
+ << extraCompilerDeps << var("POST_TARGETDEPS");
if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
- t << "\n\t" << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)";
+ t << "\n\t" << "$(LINK) $(LFLAGS) -o $(TARGET) " << objectsLinkLine << " " << objmocLinkLine << " $(LIBS)";
} else {
- t << "\n\t" << "$(LIB) $(TARGET) $(OBJECTS) $(OBJMOC)";
+ t << "\n\t" << "$(LIB) $(TARGET) " << objectsLinkLine << " " << objmocLinkLine;
}
-
+ t << extraCompilerDeps;
if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) {
@@ -184,3 +236,3 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) {
- t << "\n\t" << "copy $(TARGET) " << *dlldir;
+ t << "\n\t" << "$(COPY_FILE) \"$(TARGET)\" " << *dlldir;
}
@@ -194,10 +246,10 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
if ( project->isActiveConfig("dll")) {
- t << "\n\t" << ("-$(IDC) $(TARGET) /idl tmp\\" + targetfilename + ".idl -version " + version);
- t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl");
- t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb");
+ t << "\n\t" << ("-$(IDC) $(TARGET) /idl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
+ t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
+ t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
t << "\n\t" << ("-$(IDC) $(TARGET) /regserver" );
} else {
- t << "\n\t" << ("-$(TARGET) -dumpidl tmp\\" + targetfilename + ".idl -version " + version);
- t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl");
- t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb");
+ t << "\n\t" << ("-$(TARGET) -dumpidl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
+ t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
+ t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
t << "\n\t" << "-$(TARGET) -regserver";
@@ -209,3 +261,3 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << var("RES_FILE") << ": " << var("RC_FILE") << "\n\t"
- << var("QMAKE_RC") << " -i " << var("RC_FILE") << " -o " << var("RC_FILE").replace(QRegExp("\\.rc"),".o") << endl << endl;
+ << var("QMAKE_RC") << " -i " << var("RC_FILE") << " -o " << var("RC_FILE").replace(QRegExp("\\.rc"),".o") << " --include-dir=" << QFileInfo(var("RC_FILE")).dirPath() << endl << endl;
}
@@ -216,6 +268,6 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << "$(OBJECTS_DIR):" << "\n\t"
- << "@if not exist $(OBJECTS_DIR) mkdir $(OBJECTS_DIR)" << endl << endl;
+ << "@if not exist $(OBJECTS_DIR) $(MKDIR) $(OBJECTS_DIR)" << endl << endl;
t << "$(MOC_DIR):" << "\n\t"
- << "@if not exist $(MOC_DIR) mkdir $(MOC_DIR)" << endl << endl;
+ << "@if not exist $(MOC_DIR) $(MKDIR) $(MOC_DIR)" << endl << endl;
@@ -228,22 +280,22 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << "clean:"
- << varGlue("OBJECTS","\n\t-del ","\n\t-del ","").replace(QRegExp("\\.obj"),".o")
- << varGlue("SRCMOC" ,"\n\t-del ","\n\t-del ","")
- << varGlue("OBJMOC" ,"\n\t-del ","\n\t-del ","").replace(QRegExp("\\.obj"),".o")
- << varGlue("UICDECLS" ,"\n\t-del ","\n\t-del ","")
- << varGlue("UICIMPLS" ,"\n\t-del ","\n\t-del ","")
- << "\n\t-del $(TARGET)"
- << varGlue("QMAKE_CLEAN","\n\t-del ","\n\t-del ","")
- << varGlue("CLEAN_FILES","\n\t-del ","\n\t-del ","");
+ << varGlue("OBJECTS","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").replace(QRegExp("\\.obj"),".o")
+ << varGlue("SRCMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
+ << varGlue("OBJMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").replace(QRegExp("\\.obj"),".o")
+ << varGlue("UICDECLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
+ << varGlue("UICIMPLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
+ << "\n\t-$(DEL_FILE) $(TARGET)"
+ << varGlue("QMAKE_CLEAN","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
+ << varGlue("CLEAN_FILES","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
if ( project->isActiveConfig("activeqt")) {
- t << ("\n\t-del tmp\\" + targetfilename + ".*");
- t << "\n\t-del tmp\\dump.*";
+ t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".idl");
+ t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".tlb");
}
- if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty())
- t << "\n\t-del " << var("DLLDESTDIR") << "\\" << project->variables()[ "TARGET" ].first() << project->variables()[ "TARGET_EXT" ].first();
if(!project->isEmpty("IMAGES"))
- t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-del ", "\n\t-del ", "");
+ t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "");
- // blasted user defined targets
+ // user defined targets
+ QStringList::Iterator it;
QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
- for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) {
+
+ for(it = qut.begin(); it != qut.end(); ++it) {
QString targ = var((*it) + ".target"),
@@ -264,2 +316,51 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
t << endl << endl;
+
+ QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
+ for(it = quc.begin(); it != quc.end(); ++it) {
+ QString tmp_out = project->variables()[(*it) + ".output"].first();
+ QString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
+ QString tmp_dep = project->variables()[(*it) + ".depends"].join(" ");
+ QStringList &vars = project->variables()[(*it) + ".variables"];
+ if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
+ continue;
+ QStringList &tmp = project->variables()[(*it) + ".input"];
+ for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
+ QStringList &inputs = project->variables()[(*it2)];
+ for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
+ QFileInfo fi(Option::fixPathToLocalOS((*input)));
+ QString in = Option::fixPathToTargetOS((*input), FALSE),
+ out = tmp_out, cmd = tmp_cmd, deps;
+ out.replace("${QMAKE_FILE_BASE}", fi.baseName());
+ out.replace("${QMAKE_FILE_NAME}", fi.fileName());
+ cmd.replace("${QMAKE_FILE_BASE}", fi.baseName());
+ cmd.replace("${QMAKE_FILE_OUT}", out);
+ cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
+ for(QStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3)
+ cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
+ if(!tmp_dep.isEmpty()) {
+ char buff[256];
+ QString dep_cmd = tmp_dep;
+ dep_cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
+ if(FILE *proc = QT_POPEN(dep_cmd.latin1(), "r")) {
+ while(!feof(proc)) {
+ int read_in = int(fread(buff, 1, 255, proc));
+ if(!read_in)
+ break;
+ int l = 0;
+ for(int i = 0; i < read_in; i++) {
+ if(buff[i] == '\n' || buff[i] == ' ') {
+ deps += " " + QCString(buff+l, (i - l) + 1);
+ l = i;
+ }
+ }
+ }
+ fclose(proc);
+ }
+ }
+ t << out << ": " << in << deps << "\n\t"
+ << cmd << endl << endl;
+ }
+ }
+ }
+ t << endl;
}
@@ -288,2 +389,7 @@ MingwMakefileGenerator::init()
+ if(project->isEmpty("QMAKE_INSTALL_FILE"))
+ project->variables()["QMAKE_INSTALL_FILE"].append("$(COPY_FILE)");
+ if(project->isEmpty("QMAKE_INSTALL_DIR"))
+ project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
+
bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX);
@@ -296,6 +402,10 @@ MingwMakefileGenerator::init()
QStringList &configs = project->variables()["CONFIG"];
+
if (project->isActiveConfig("qt") && project->isActiveConfig("shared"))
project->variables()["DEFINES"].append("QT_DLL");
+
if (project->isActiveConfig("qt_dll"))
- if(configs.findIndex("qt") == -1) configs.append("qt");
+ if (configs.findIndex("qt") == -1)
+ configs.append("qt");
+
if ( project->isActiveConfig("qt") ) {
@@ -321,2 +431,3 @@ MingwMakefileGenerator::init()
}
+
if ( project->isActiveConfig("dll") || !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) {
@@ -327,2 +438,3 @@ MingwMakefileGenerator::init()
}
+
if ( project->isActiveConfig("warn_off") ) {
@@ -334,2 +446,3 @@ MingwMakefileGenerator::init()
}
+
if ( project->isActiveConfig("debug") ) {
@@ -365,4 +478,6 @@ MingwMakefileGenerator::init()
project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"];
+
if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") )
project->variables()["CONFIG"].append("windows");
+
if ( project->isActiveConfig("qt") ) {
@@ -379,2 +494,3 @@ MingwMakefileGenerator::init()
} else {
+
if(project->isActiveConfig("thread"))
@@ -398,6 +514,7 @@ MingwMakefileGenerator::init()
project->variables().remove("QMAKE_LIBS_QT_ENTRY");
- project->variables()["QMAKE_LIBS_QT_ENTRY"] = "qaxserver.lib";
- if ( project->isActiveConfig( "dll" ) )
+ project->variables()["QMAKE_LIBS_QT_ENTRY"] = "-lqaxserver";
+ if ( project->isActiveConfig( "dll" ) ) {
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_ENTRY"];
}
+ }
if ( !project->isActiveConfig("dll") && !project->isActiveConfig("plugin") ) {
@@ -405,4 +522,10 @@ MingwMakefileGenerator::init()
}
+
+ // QMAKE_LIBS_QT_ENTRY should be first on the link line as it needs qt
+ project->variables()["QMAKE_LIBS"].remove(project->variables()["QMAKE_LIBS_QT_ENTRY"].first());
+ project->variables()["QMAKE_LIBS"].prepend(project->variables()["QMAKE_LIBS_QT_ENTRY"].first());
+
}
}
+
if ( project->isActiveConfig("opengl") ) {
@@ -411,2 +534,3 @@ MingwMakefileGenerator::init()
}
+
if ( project->isActiveConfig("dll") ) {
@@ -436,2 +560,3 @@ MingwMakefileGenerator::init()
}
+
if ( project->isActiveConfig("windows") ) {
@@ -453,4 +578,32 @@ MingwMakefileGenerator::init()
+ if ( project->isActiveConfig("exceptions") ) {
+ project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_ON"];
+ project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_ON"];
+ } else {
+ project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_OFF"];
+ project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_OFF"];
+ }
+
+ if ( project->isActiveConfig("rtti") ) {
+ project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_ON"];
+ project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_ON"];
+ } else {
+ project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_OFF"];
+ project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_OFF"];
+ }
+
if ( project->isActiveConfig("moc") )
setMocAware(TRUE);
+
+ // add -L libs to libdir
+ QStringList &libs = project->variables()["QMAKE_LIBS"];
+ for ( QStringList::Iterator libit = libs.begin(); libit != libs.end(); ) {
+ if ( (*libit).startsWith( "-L" ) ) {
+ project->variables()["QMAKE_LIBDIR"] += (*libit).mid(2);
+ libit = libs.remove( libit );
+ } else {
+ ++libit;
+ }
+ }
+
project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ',
@@ -458,3 +611,4 @@ MingwMakefileGenerator::init()
QStringList &l = project->variables()["QMAKE_FILETAGS"];
- for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
+ QStringList::Iterator it;
+ for(it = l.begin(); it != l.end(); ++it) {
QStringList &gdmf = project->variables()[(*it)];
@@ -464,7 +618,12 @@ MingwMakefileGenerator::init()
- if ( project->isActiveConfig("dll") )
- project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--out-implib,") + project->first("DESTDIR") + "\\lib"+ project->first("TARGET") + ".a");
+ if ( project->isActiveConfig("dll") ) {
+ QString destDir = "";
+ if (!project->first("DESTDIR").isEmpty())
+ destDir = project->first("DESTDIR") + Option::dir_sep;
+ project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--out-implib,") +
+ destDir + "lib" + project->first("TARGET") + ".a");
+ }
if ( !project->variables()["DEF_FILE"].isEmpty() )
- project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--output-def,") + project->first("DEF_FILE"));
+ project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,") + project->first("DEF_FILE"));
// if(!project->isActiveConfig("incremental"))
@@ -482,2 +641,3 @@ MingwMakefileGenerator::init()
#endif
+
if ( !project->variables()["RC_FILE"].isEmpty()) {
@@ -491,3 +651,5 @@ MingwMakefileGenerator::init()
project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"];
+ project->variables()["CLEAN_FILES"] += project->variables()["RES_FILE"];
}
+
if ( !project->variables()["RES_FILE"].isEmpty())
@@ -496,2 +658,3 @@ MingwMakefileGenerator::init()
MakefileGenerator::init();
+
if ( !project->variables()["VERSION"].isEmpty()) {
@@ -501,2 +664,3 @@ MingwMakefileGenerator::init()
}
+
if(project->isActiveConfig("dll")) {
@@ -504,2 +668,22 @@ MingwMakefileGenerator::init()
}
+
+ QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
+ for(it = quc.begin(); it != quc.end(); ++it) {
+ QString tmp_out = project->variables()[(*it) + ".output"].first();
+ if(tmp_out.isEmpty())
+ continue;
+ QStringList &tmp = project->variables()[(*it) + ".input"];
+ for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
+ QStringList &inputs = project->variables()[(*it2)];
+ for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
+ QFileInfo fi(Option::fixPathToLocalOS((*input)));
+ QString in = Option::fixPathToTargetOS((*input), FALSE),
+ out = tmp_out;
+ out.replace("${QMAKE_FILE_BASE}", fi.baseName());
+ out.replace("${QMAKE_FILE_NAME}", fi.fileName());
+ if(project->variables()[(*it) + ".CONFIG"].findIndex("no_link") == -1)
+ project->variables()["OBJCOMP"] += out;
+ }
+ }
+ }
}
@@ -513,3 +697,3 @@ MingwMakefileGenerator::writeSubDirs(QTextStream &t)
QRegExp rx("(\\n\\tcd [^\\n\\t]+)(\\n\\t.+)\\n\\t@cd ..") ;
- rx.setMinimal(true);
+ rx.setMinimal(TRUE);
int pos = 0 ;