author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 16 Apr 2010 15:50:13 +0300 | |
changeset 18 | 2f34d5167611 |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the qmake application of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#ifndef MSVC_DSP_H |
|
43 |
#define MSVC_DSP_H |
|
44 |
||
45 |
#include "winmakefile.h" |
|
46 |
||
47 |
QT_BEGIN_NAMESPACE |
|
48 |
||
49 |
class FolderGroup; |
|
50 |
||
51 |
class DspMakefileGenerator : public Win32MakefileGenerator |
|
52 |
{ |
|
53 |
bool init_flag; |
|
54 |
bool writeDspHeader(QTextStream &); |
|
55 |
bool writeDspParts(QTextStream &); |
|
56 |
bool writeFileGroup(QTextStream &t, const QStringList &listNames, const QString &group, const QString &filter); |
|
57 |
void writeSubFileGroup(QTextStream &t, FolderGroup *folder); |
|
58 |
bool writeBuildstepForFile(QTextStream &t, const QString &file, const QString &listName); |
|
59 |
static bool writeDspConfig(QTextStream &t, DspMakefileGenerator *config); |
|
60 |
static QString writeBuildstepForFileForConfig(const QString &file, const QString &listName, DspMakefileGenerator *config); |
|
61 |
QString configName(DspMakefileGenerator * config); |
|
62 |
||
63 |
bool writeMakefile(QTextStream &); |
|
64 |
bool writeProjectMakefile(); |
|
65 |
void writeSubDirs(QTextStream &t); |
|
66 |
void init(); |
|
67 |
||
68 |
public: |
|
69 |
DspMakefileGenerator(); |
|
70 |
~DspMakefileGenerator(); |
|
71 |
||
72 |
bool openOutput(QFile &file, const QString &build) const; |
|
73 |
bool hasBuiltinCompiler(const QString &filename) const; |
|
74 |
||
75 |
protected: |
|
76 |
virtual bool doDepends() const { return false; } //never necesary |
|
77 |
virtual void processSources() { filterIncludedFiles("SOURCES"); filterIncludedFiles("GENERATED_SOURCES"); } |
|
78 |
virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &); |
|
79 |
inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out) |
|
80 |
{ return MakefileGenerator::replaceExtraCompilerVariables(val, in, out); } |
|
81 |
virtual bool supportsMetaBuild() { return true; } |
|
82 |
virtual bool supportsMergedBuilds() { return true; } |
|
83 |
virtual bool mergeBuildProject(MakefileGenerator *other); |
|
84 |
virtual void processPrlVariable(const QString &, const QStringList &); |
|
85 |
virtual bool findLibraries(); |
|
86 |
||
87 |
bool usePCH; |
|
88 |
QString precompH, namePCH, |
|
89 |
precompObj, precompPch; |
|
90 |
||
91 |
QString platform; |
|
92 |
||
93 |
struct BuildStep { |
|
94 |
BuildStep() {} |
|
95 |
BuildStep &operator<<(const BuildStep &other) { |
|
96 |
deps << other.deps; |
|
97 |
buildStep += other.buildStep; |
|
98 |
buildName += other.buildName; |
|
99 |
buildOutputs += other.buildOutputs; |
|
100 |
return *this; |
|
101 |
} |
|
102 |
||
103 |
QStringList deps; |
|
104 |
QString buildStep; |
|
105 |
QString buildName; |
|
106 |
QStringList buildOutputs; |
|
107 |
}; |
|
108 |
QMap<QString, BuildStep> swappedBuildSteps; |
|
109 |
||
110 |
// Holds all configurations for glue (merged) project |
|
111 |
QList<DspMakefileGenerator*> mergedProjects; |
|
112 |
}; |
|
113 |
||
114 |
inline DspMakefileGenerator::~DspMakefileGenerator() |
|
115 |
{ } |
|
116 |
||
117 |
inline bool DspMakefileGenerator::findLibraries() |
|
118 |
{ return Win32MakefileGenerator::findLibraries("MSVCDSP_LIBS"); } |
|
119 |
||
120 |
QT_END_NAMESPACE |
|
121 |
||
122 |
#endif // MSVC_DSP_H |