author | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
commit | 155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (unidiff) | |
tree | e6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/generators/win32/borland_bmake.cpp | |
parent | 86703e8a5527ef114facd02c005b6b3a7e62e263 (diff) | |
download | opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2 |
update qmake to 1.05a
Diffstat (limited to 'qmake/generators/win32/borland_bmake.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | qmake/generators/win32/borland_bmake.cpp | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp index ae7b47b..26eea88 100644 --- a/qmake/generators/win32/borland_bmake.cpp +++ b/qmake/generators/win32/borland_bmake.cpp | |||
@@ -132,6 +132,8 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t) | |||
132 | t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; | 132 | t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; |
133 | t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; | 133 | t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; |
134 | t << "MOVE = " << var("QMAKE_MOVE") << endl; | 134 | t << "MOVE = " << var("QMAKE_MOVE") << endl; |
135 | t << "CHK_DIR_EXISTS =" << var("QMAKE_CHK_DIR_EXISTS") << endl; | ||
136 | t << "MKDIR =" << var("QMAKE_MKDIR") << endl; | ||
135 | t << endl; | 137 | t << endl; |
136 | 138 | ||
137 | t << "####### Files" << endl << endl; | 139 | t << "####### Files" << endl << endl; |
@@ -150,15 +152,19 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t) | |||
150 | t << endl; | 152 | t << endl; |
151 | 153 | ||
152 | t << "####### Implicit rules" << endl << endl; | 154 | t << "####### Implicit rules" << endl << endl; |
153 | t << ".SUFFIXES: .cpp .cxx .cc .c" << endl << endl; | 155 | t << ".SUFFIXES: .c"; |
154 | t << ".cpp.obj:\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl; | 156 | QStringList::Iterator cppit; |
155 | t << ".cxx.obj:\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl; | 157 | for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) |
156 | t << ".cc.obj:\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl; | 158 | t << " " << (*cppit); |
157 | t << ".c.obj:\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl; | 159 | t << endl << endl; |
160 | for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) | ||
161 | t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl; | ||
162 | t << ".c" << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl; | ||
158 | 163 | ||
159 | t << "####### Build rules" << endl << endl; | 164 | t << "####### Build rules" << endl << endl; |
160 | t << "all: " << varGlue("ALL_DEPS",""," "," ") << " $(TARGET)" << endl << endl; | 165 | t << "all: " << varGlue("ALL_DEPS",""," "," ") << " $(TARGET)" << endl << endl; |
161 | t << "$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) " << var("TARGETDEPS"); | 166 | t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) " |
167 | << var("POST_TARGETDEPS"); | ||
162 | if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) { | 168 | if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) { |
163 | t << "\n\t" << "$(LINK) @&&|" << "\n\t" | 169 | t << "\n\t" << "$(LINK) @&&|" << "\n\t" |
164 | << "$(LFLAGS) $(OBJECTS) $(OBJMOC),$(TARGET),,$(LIBS),$(DEF_FILE),$(RES_FILE)"; | 170 | << "$(LFLAGS) $(OBJECTS) $(OBJMOC),$(TARGET),,$(LIBS),$(DEF_FILE),$(RES_FILE)"; |
@@ -169,6 +175,10 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t) | |||
169 | << project->variables()["OBJMOC"].join(" \\\n+"); | 175 | << project->variables()["OBJMOC"].join(" \\\n+"); |
170 | } | 176 | } |
171 | t << endl << "|" << endl; | 177 | t << endl << "|" << endl; |
178 | |||
179 | if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() ) | ||
180 | t << "\t" <<var("QMAKE_POST_LINK") << endl; | ||
181 | |||
172 | if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) { | 182 | if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) { |
173 | QStringList dlldirs = project->variables()["DLLDESTDIR"]; | 183 | QStringList dlldirs = project->variables()["DLLDESTDIR"]; |
174 | for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) { | 184 | for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) { |
@@ -213,15 +223,12 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t) | |||
213 | << varGlue("OBJMOC" ,"\n\t-del ","\n\t-del ","") | 223 | << varGlue("OBJMOC" ,"\n\t-del ","\n\t-del ","") |
214 | << varGlue("UICDECLS" ,"\n\t-del ","\n\t-del ","") | 224 | << varGlue("UICDECLS" ,"\n\t-del ","\n\t-del ","") |
215 | << varGlue("UICIMPLS" ,"\n\t-del ","\n\t-del ","") | 225 | << varGlue("UICIMPLS" ,"\n\t-del ","\n\t-del ","") |
216 | << "\n\t-del $(TARGET)" | ||
217 | << varGlue("QMAKE_CLEAN","\n\t-del ","\n\t-del ","") | 226 | << varGlue("QMAKE_CLEAN","\n\t-del ","\n\t-del ","") |
218 | << varGlue("CLEAN_FILES","\n\t-del ","\n\t-del ",""); | 227 | << varGlue("CLEAN_FILES","\n\t-del ","\n\t-del ",""); |
219 | if ( project->isActiveConfig("activeqt")) { | 228 | if ( project->isActiveConfig("activeqt")) { |
220 | t << ("\n\t-del tmp\\" + targetfilename + ".*"); | 229 | t << ("\n\t-del tmp\\" + targetfilename + ".*"); |
221 | t << "\n\t-del tmp\\dump.*"; | 230 | t << "\n\t-del tmp\\dump.*"; |
222 | } | 231 | } |
223 | if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) | ||
224 | t << "\n\t-del " << var("DLLDESTDIR") << "\\" << project->variables()[ "TARGET" ].first() << project->variables()[ "TARGET_EXT" ].first(); | ||
225 | if(!project->isEmpty("IMAGES")) | 232 | if(!project->isEmpty("IMAGES")) |
226 | t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-del ", "\n\t-del ", ""); | 233 | t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-del ", "\n\t-del ", ""); |
227 | 234 | ||
@@ -244,6 +251,10 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t) | |||
244 | } | 251 | } |
245 | 252 | ||
246 | t << endl << endl; | 253 | t << endl << endl; |
254 | |||
255 | t << "distclean: clean" | ||
256 | << "\n\t-del $(TARGET)" | ||
257 | << endl << endl; | ||
247 | } | 258 | } |
248 | 259 | ||
249 | void | 260 | void |
@@ -364,7 +375,7 @@ BorlandMakefileGenerator::init() | |||
364 | if ( !project->variables()["QMAKE_QT_DLL"].isEmpty() ) { | 375 | if ( !project->variables()["QMAKE_QT_DLL"].isEmpty() ) { |
365 | int hver = findHighestVersion(project->first("QMAKE_LIBDIR_QT"), "qt"); | 376 | int hver = findHighestVersion(project->first("QMAKE_LIBDIR_QT"), "qt"); |
366 | if ( hver == -1 ) | 377 | if ( hver == -1 ) |
367 | hver = findHighestVersion(project->first("QMAKE_LIBDIR_QT"), "qt-mt"); | 378 | hver = findHighestVersion(project->first("QMAKE_LIBDIR_QT"), "qtmt"); |
368 | if(hver != -1) { | 379 | if(hver != -1) { |
369 | QString ver; | 380 | QString ver; |
370 | ver.sprintf("qt%s" QTDLL_POSTFIX "%d.lib", (project->isActiveConfig("thread") ? "mt" : ""), hver); | 381 | ver.sprintf("qt%s" QTDLL_POSTFIX "%d.lib", (project->isActiveConfig("thread") ? "mt" : ""), hver); |
@@ -426,6 +437,28 @@ BorlandMakefileGenerator::init() | |||
426 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"]; | 437 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"]; |
427 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"]; | 438 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"]; |
428 | } | 439 | } |
440 | if ( project->isActiveConfig("stl") ) { | ||
441 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_STL_ON"]; | ||
442 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_STL_ON"]; | ||
443 | } else { | ||
444 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_STL_OFF"]; | ||
445 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_STL_OFF"]; | ||
446 | } | ||
447 | if ( project->isActiveConfig("exceptions") ) { | ||
448 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_ON"]; | ||
449 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_ON"]; | ||
450 | } else { | ||
451 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_OFF"]; | ||
452 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_OFF"]; | ||
453 | } | ||
454 | if ( project->isActiveConfig("rtti") ) { | ||
455 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_ON"]; | ||
456 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_ON"]; | ||
457 | } else { | ||
458 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_OFF"]; | ||
459 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_OFF"]; | ||
460 | } | ||
461 | |||
429 | if ( project->isActiveConfig("thread") ) { | 462 | if ( project->isActiveConfig("thread") ) { |
430 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_RTMT"]; | 463 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_RTMT"]; |
431 | } else { | 464 | } else { |
@@ -452,7 +485,7 @@ BorlandMakefileGenerator::init() | |||
452 | } | 485 | } |
453 | project->variables()["RES_FILE"] = project->variables()["RC_FILE"]; | 486 | project->variables()["RES_FILE"] = project->variables()["RC_FILE"]; |
454 | project->variables()["RES_FILE"].first().replace(".rc",".res"); | 487 | project->variables()["RES_FILE"].first().replace(".rc",".res"); |
455 | project->variables()["TARGETDEPS"] += project->variables()["RES_FILE"]; | 488 | project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"]; |
456 | } | 489 | } |
457 | MakefileGenerator::init(); | 490 | MakefileGenerator::init(); |
458 | if ( !project->variables()["VERSION"].isEmpty()) { | 491 | if ( !project->variables()["VERSION"].isEmpty()) { |
@@ -474,4 +507,3 @@ BorlandMakefileGenerator::init() | |||
474 | project->first("DESTDIR") + project->first("TARGET") + tdsPostfix ); | 507 | project->first("DESTDIR") + project->first("TARGET") + tdsPostfix ); |
475 | } | 508 | } |
476 | } | 509 | } |
477 | |||