Diffstat (limited to 'qmake/generators/win32/borland_bmake.cpp') (more/less context) (ignore 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 | |||
@@ -123,61 +123,71 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t) | |||
123 | t << "IDC =" << (project->isEmpty("QMAKE_IDC") ? QString("idc") : | 123 | t << "IDC =" << (project->isEmpty("QMAKE_IDC") ? QString("idc") : |
124 | Option::fixPathToTargetOS(var("QMAKE_IDC"), FALSE)) << endl; | 124 | Option::fixPathToTargetOS(var("QMAKE_IDC"), FALSE)) << endl; |
125 | t << "IDL =" << (project->isEmpty("QMAKE_IDL") ? QString("midl") : | 125 | t << "IDL =" << (project->isEmpty("QMAKE_IDL") ? QString("midl") : |
126 | Option::fixPathToTargetOS(var("QMAKE_IDL"), FALSE)) << endl; | 126 | Option::fixPathToTargetOS(var("QMAKE_IDL"), FALSE)) << endl; |
127 | t << "ZIP =" << var("QMAKE_ZIP") << endl; | 127 | t << "ZIP =" << var("QMAKE_ZIP") << endl; |
128 | t << "DEF_FILE =" << varList("DEF_FILE") << endl; | 128 | t << "DEF_FILE =" << varList("DEF_FILE") << endl; |
129 | t << "RES_FILE =" << varList("RES_FILE") << endl; | 129 | t << "RES_FILE =" << varList("RES_FILE") << endl; |
130 | t << "COPY_FILE = " << var("QMAKE_COPY") << endl; | 130 | t << "COPY_FILE = " << var("QMAKE_COPY") << endl; |
131 | t << "COPY_DIR = " << var("QMAKE_COPY") << endl; | 131 | t << "COPY_DIR = " << var("QMAKE_COPY") << endl; |
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; |
138 | t << "HEADERS =" << varList("HEADERS") << endl; | 140 | t << "HEADERS =" << varList("HEADERS") << endl; |
139 | t << "SOURCES =" << varList("SOURCES") << endl; | 141 | t << "SOURCES =" << varList("SOURCES") << endl; |
140 | t << "OBJECTS =" << varList("OBJECTS") << endl; | 142 | t << "OBJECTS =" << varList("OBJECTS") << endl; |
141 | t << "FORMS =" << varList("FORMS") << endl; | 143 | t << "FORMS =" << varList("FORMS") << endl; |
142 | t << "UICDECLS =" << varList("UICDECLS") << endl; | 144 | t << "UICDECLS =" << varList("UICDECLS") << endl; |
143 | t << "UICIMPLS =" << varList("UICIMPLS") << endl; | 145 | t << "UICIMPLS =" << varList("UICIMPLS") << endl; |
144 | t << "SRCMOC =" << varList("SRCMOC") << endl; | 146 | t << "SRCMOC =" << varList("SRCMOC") << endl; |
145 | t << "OBJMOC =" << varList("OBJMOC") << endl; | 147 | t << "OBJMOC =" << varList("OBJMOC") << endl; |
146 | t << "DIST =" << varList("DISTFILES") << endl; | 148 | t << "DIST =" << varList("DISTFILES") << endl; |
147 | t << "TARGET =" | 149 | t << "TARGET =" |
148 | << varGlue("TARGET",project->first("DESTDIR"),"",project->first("TARGET_EXT")) | 150 | << varGlue("TARGET",project->first("DESTDIR"),"",project->first("TARGET_EXT")) |
149 | << endl; | 151 | << endl; |
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)"; |
165 | } else { | 171 | } else { |
166 | t << "\n\t-del $(TARGET)" | 172 | t << "\n\t-del $(TARGET)" |
167 | << "\n\t" << "$(LIB) $(TARGET) @&&|" << " \n+" | 173 | << "\n\t" << "$(LIB) $(TARGET) @&&|" << " \n+" |
168 | << project->variables()["OBJECTS"].join(" \\\n+") << " \\\n+" | 174 | << project->variables()["OBJECTS"].join(" \\\n+") << " \\\n+" |
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 ) { |
175 | t << "\n\t" << "-copy $(TARGET) " << *dlldir; | 185 | t << "\n\t" << "-copy $(TARGET) " << *dlldir; |
176 | } | 186 | } |
177 | } | 187 | } |
178 | QString targetfilename = project->variables()["TARGET"].first(); | 188 | QString targetfilename = project->variables()["TARGET"].first(); |
179 | if(project->isActiveConfig("activeqt")) { | 189 | if(project->isActiveConfig("activeqt")) { |
180 | QString version = project->variables()["VERSION"].first(); | 190 | QString version = project->variables()["VERSION"].first(); |
181 | if ( version.isEmpty() ) | 191 | if ( version.isEmpty() ) |
182 | version = "1.0"; | 192 | version = "1.0"; |
183 | 193 | ||
@@ -204,55 +214,56 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t) | |||
204 | writeMakeQmake(t); | 214 | writeMakeQmake(t); |
205 | 215 | ||
206 | t << "dist:" << "\n\t" | 216 | t << "dist:" << "\n\t" |
207 | << "$(ZIP) " << var("PROJECT") << ".zip " << var("PROJECT") << ".pro $(SOURCES) $(HEADERS) $(DIST) $(FORMS)" | 217 | << "$(ZIP) " << var("PROJECT") << ".zip " << var("PROJECT") << ".pro $(SOURCES) $(HEADERS) $(DIST) $(FORMS)" |
208 | << endl << endl; | 218 | << endl << endl; |
209 | 219 | ||
210 | t << "clean:\n" | 220 | t << "clean:\n" |
211 | << varGlue("OBJECTS","\t-del ","\n\t-del ","") | 221 | << varGlue("OBJECTS","\t-del ","\n\t-del ","") |
212 | << varGlue("SRCMOC" ,"\n\t-del ","\n\t-del ","") | 222 | << varGlue("SRCMOC" ,"\n\t-del ","\n\t-del ","") |
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 | ||
228 | // blasted user defined targets | 235 | // blasted user defined targets |
229 | QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"]; | 236 | QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"]; |
230 | for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) { | 237 | for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) { |
231 | QString targ = var((*it) + ".target"), | 238 | QString targ = var((*it) + ".target"), |
232 | cmd = var((*it) + ".commands"), deps; | 239 | cmd = var((*it) + ".commands"), deps; |
233 | if(targ.isEmpty()) | 240 | if(targ.isEmpty()) |
234 | targ = (*it); | 241 | targ = (*it); |
235 | QStringList &deplist = project->variables()[(*it) + ".depends"]; | 242 | QStringList &deplist = project->variables()[(*it) + ".depends"]; |
236 | for(QStringList::Iterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) { | 243 | for(QStringList::Iterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) { |
237 | QString dep = var((*dep_it) + ".target"); | 244 | QString dep = var((*dep_it) + ".target"); |
238 | if(dep.isEmpty()) | 245 | if(dep.isEmpty()) |
239 | dep = (*dep_it); | 246 | dep = (*dep_it); |
240 | deps += " " + dep; | 247 | deps += " " + dep; |
241 | } | 248 | } |
242 | t << "\n\n" << targ << ":" << deps << "\n\t" | 249 | t << "\n\n" << targ << ":" << deps << "\n\t" |
243 | << cmd; | 250 | << cmd; |
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 |
250 | BorlandMakefileGenerator::init() | 261 | BorlandMakefileGenerator::init() |
251 | { | 262 | { |
252 | if(init_flag) | 263 | if(init_flag) |
253 | return; | 264 | return; |
254 | init_flag = TRUE; | 265 | init_flag = TRUE; |
255 | 266 | ||
256 | project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"]; | 267 | project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"]; |
257 | 268 | ||
258 | /* this should probably not be here, but I'm using it to wrap the .t files */ | 269 | /* this should probably not be here, but I'm using it to wrap the .t files */ |
@@ -355,25 +366,25 @@ BorlandMakefileGenerator::init() | |||
355 | if ( !project->variables()["QMAKE_QT_DLL"].isEmpty()) { | 366 | if ( !project->variables()["QMAKE_QT_DLL"].isEmpty()) { |
356 | project->variables()["DEFINES"].append("QT_MAKEDLL"); | 367 | project->variables()["DEFINES"].append("QT_MAKEDLL"); |
357 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_QT_DLL"]; | 368 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_QT_DLL"]; |
358 | } | 369 | } |
359 | } else { | 370 | } else { |
360 | if(project->isActiveConfig("thread")) | 371 | if(project->isActiveConfig("thread")) |
361 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"]; | 372 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"]; |
362 | else | 373 | else |
363 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT"]; | 374 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT"]; |
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); |
371 | QStringList &libs = project->variables()["QMAKE_LIBS"]; | 382 | QStringList &libs = project->variables()["QMAKE_LIBS"]; |
372 | for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) | 383 | for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) |
373 | (*libit).replace(QRegExp("qt(mt)?\\.lib"), ver); | 384 | (*libit).replace(QRegExp("qt(mt)?\\.lib"), ver); |
374 | } | 385 | } |
375 | } | 386 | } |
376 | if ( project->isActiveConfig( "activeqt" ) ) { | 387 | if ( project->isActiveConfig( "activeqt" ) ) { |
377 | project->variables().remove("QMAKE_LIBS_QT_ENTRY"); | 388 | project->variables().remove("QMAKE_LIBS_QT_ENTRY"); |
378 | project->variables()["QMAKE_LIBS_QT_ENTRY"] = "qaxserver.lib"; | 389 | project->variables()["QMAKE_LIBS_QT_ENTRY"] = "qaxserver.lib"; |
379 | if ( project->isActiveConfig( "dll" ) ) | 390 | if ( project->isActiveConfig( "dll" ) ) |
@@ -417,24 +428,46 @@ BorlandMakefileGenerator::init() | |||
417 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"]; | 428 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"]; |
418 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"]; | 429 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"]; |
419 | } else { | 430 | } else { |
420 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"]; | 431 | project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"]; |
421 | } | 432 | } |
422 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_WINDOWS"]; | 433 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_WINDOWS"]; |
423 | } else { | 434 | } else { |
424 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"]; | 435 | project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"]; |
425 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"]; | 436 | project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"]; |
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 { |
432 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_RT"]; | 465 | project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_RT"]; |
433 | } | 466 | } |
434 | if ( project->isActiveConfig("moc") ) { | 467 | if ( project->isActiveConfig("moc") ) { |
435 | setMocAware(TRUE); | 468 | setMocAware(TRUE); |
436 | } | 469 | } |
437 | project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; | 470 | project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; |
438 | project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ', | 471 | project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ', |
439 | "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH"); | 472 | "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH"); |
440 | QStringList &l = project->variables()["QMAKE_FILETAGS"]; | 473 | QStringList &l = project->variables()["QMAKE_FILETAGS"]; |
@@ -443,35 +476,34 @@ BorlandMakefileGenerator::init() | |||
443 | for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) | 476 | for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) |
444 | (*inner) = Option::fixPathToTargetOS((*inner), FALSE); | 477 | (*inner) = Option::fixPathToTargetOS((*inner), FALSE); |
445 | } | 478 | } |
446 | 479 | ||
447 | if ( !project->variables()["RC_FILE"].isEmpty()) { | 480 | if ( !project->variables()["RC_FILE"].isEmpty()) { |
448 | if ( !project->variables()["RES_FILE"].isEmpty()) { | 481 | if ( !project->variables()["RES_FILE"].isEmpty()) { |
449 | fprintf(stderr, "Both .rc and .res file specified.\n"); | 482 | fprintf(stderr, "Both .rc and .res file specified.\n"); |
450 | fprintf(stderr, "Please specify one of them, not both."); | 483 | fprintf(stderr, "Please specify one of them, not both."); |
451 | exit(666); | 484 | exit(666); |
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()) { |
459 | QStringList l = QStringList::split('.', project->first("VERSION")); | 492 | QStringList l = QStringList::split('.', project->first("VERSION")); |
460 | project->variables()["VER_MAJ"].append(l[0]); | 493 | project->variables()["VER_MAJ"].append(l[0]); |
461 | project->variables()["VER_MIN"].append(l[1]); | 494 | project->variables()["VER_MIN"].append(l[1]); |
462 | } | 495 | } |
463 | 496 | ||
464 | if ( project->isActiveConfig("dll") || !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) { | 497 | if ( project->isActiveConfig("dll") || !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) { |
465 | // bcc does not generate a .tds file for static libs | 498 | // bcc does not generate a .tds file for static libs |
466 | QString tdsPostfix; | 499 | QString tdsPostfix; |
467 | if ( !project->variables()["VERSION"].isEmpty() ) { | 500 | if ( !project->variables()["VERSION"].isEmpty() ) { |
468 | tdsPostfix = QStringList::split( '.', project->first("VERSION") ).join("") | 501 | tdsPostfix = QStringList::split( '.', project->first("VERSION") ).join("") |
469 | + ".tds"; | 502 | + ".tds"; |
470 | } else { | 503 | } else { |
471 | tdsPostfix = ".tds"; | 504 | tdsPostfix = ".tds"; |
472 | } | 505 | } |
473 | project->variables()["QMAKE_CLEAN"].append( | 506 | project->variables()["QMAKE_CLEAN"].append( |
474 | project->first("DESTDIR") + project->first("TARGET") + tdsPostfix ); | 507 | project->first("DESTDIR") + project->first("TARGET") + tdsPostfix ); |
475 | } | 508 | } |
476 | } | 509 | } |
477 | |||