source: trunk/qmake/generators/win32/msvc_dsp.h@ 599

Last change on this file since 599 was 561, checked in by Dmitry A. Kuminov, 16 years ago

trunk: Merged in qt 4.6.1 sources.

File size: 4.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the qmake application of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
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** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#ifndef MSVC_DSP_H
43#define MSVC_DSP_H
44
45#include "winmakefile.h"
46
47QT_BEGIN_NAMESPACE
48
49class FolderGroup;
50
51class 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
68public:
69 DspMakefileGenerator();
70 ~DspMakefileGenerator();
71
72 bool openOutput(QFile &file, const QString &build) const;
73 bool hasBuiltinCompiler(const QString &filename) const;
74
75protected:
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
114inline DspMakefileGenerator::~DspMakefileGenerator()
115{ }
116
117inline bool DspMakefileGenerator::findLibraries()
118{ return Win32MakefileGenerator::findLibraries("MSVCDSP_LIBS"); }
119
120QT_END_NAMESPACE
121
122#endif // MSVC_DSP_H
Note: See TracBrowser for help on using the repository browser.