[2] | 1 | /****************************************************************************
|
---|
| 2 | **
|
---|
[659] | 3 | ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
---|
[564] | 4 | ** All rights reserved.
|
---|
| 5 | ** Contact: Nokia Corporation ([email protected])
|
---|
[2] | 6 | **
|
---|
| 7 | ** This file is part of the qmake application of the Qt Toolkit.
|
---|
| 8 | **
|
---|
[659] | 9 | ** Copyright (C) 2010 netlabs.org. OS/2 parts.
|
---|
[21] | 10 | **
|
---|
[2] | 11 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
| 12 | ** Commercial Usage
|
---|
| 13 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
| 14 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
| 15 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
| 16 | ** a written agreement between you and Nokia.
|
---|
| 17 | **
|
---|
| 18 | ** GNU Lesser General Public License Usage
|
---|
| 19 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
| 20 | ** General Public License version 2.1 as published by the Free Software
|
---|
| 21 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
| 22 | ** packaging of this file. Please review the following information to
|
---|
| 23 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
| 24 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
| 25 | **
|
---|
[564] | 26 | ** In addition, as a special exception, Nokia gives you certain additional
|
---|
| 27 | ** rights. These rights are described in the Nokia Qt LGPL Exception
|
---|
| 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
---|
[2] | 29 | **
|
---|
| 30 | ** GNU General Public License Usage
|
---|
| 31 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
| 32 | ** General Public License version 3.0 as published by the Free Software
|
---|
| 33 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
| 34 | ** packaging of this file. Please review the following information to
|
---|
| 35 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
| 36 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
| 37 | **
|
---|
[564] | 38 | ** If you have questions regarding the use of this file, please contact
|
---|
| 39 | ** Nokia at [email protected].
|
---|
[2] | 40 | ** $QT_END_LICENSE$
|
---|
| 41 | **
|
---|
| 42 | ****************************************************************************/
|
---|
| 43 |
|
---|
[10] | 44 | #ifndef GNUMAKE_H
|
---|
| 45 | #define GNUMAKE_H
|
---|
[2] | 46 |
|
---|
| 47 | #include "winmakefile.h"
|
---|
| 48 |
|
---|
| 49 | QT_BEGIN_NAMESPACE
|
---|
| 50 |
|
---|
[10] | 51 | class GNUMakefileGenerator : public Win32MakefileGenerator
|
---|
[2] | 52 | {
|
---|
| 53 | public:
|
---|
[10] | 54 | GNUMakefileGenerator();
|
---|
| 55 | ~GNUMakefileGenerator();
|
---|
[2] | 56 | protected:
|
---|
[39] | 57 | QString escapeFilePath(const QString &path) const;
|
---|
[44] | 58 | QString escapeDependencyPath(const QString &path) const;
|
---|
[2] | 59 | private:
|
---|
[29] | 60 | bool isDosLikeShell() const;
|
---|
[10] | 61 | void writeGNUParts(QTextStream &);
|
---|
[2] | 62 | void writeIncPart(QTextStream &t);
|
---|
| 63 | void writeLibsPart(QTextStream &t);
|
---|
| 64 | void writeLibDirPart(QTextStream &t);
|
---|
[973] | 65 | void writeHeader(QTextStream &t);
|
---|
[2] | 66 | bool writeMakefile(QTextStream &);
|
---|
| 67 | void writeObjectsPart(QTextStream &t);
|
---|
| 68 | void writeBuildRulesPart(QTextStream &t);
|
---|
[39] | 69 | void writeRcAndDefVariables(QTextStream &t);
|
---|
| 70 | void writeRcAndDefPart(QTextStream &t);
|
---|
[2] | 71 | void init();
|
---|
[39] | 72 | void processRcFileVar();
|
---|
[2] | 73 | void processPrlVariable(const QString &var, const QStringList &l);
|
---|
[103] | 74 | void processPrlFiles();
|
---|
[2] | 75 |
|
---|
[896] | 76 | QString getPdbTarget();
|
---|
| 77 |
|
---|
[2] | 78 | QStringList &findDependencies(const QString &file);
|
---|
[10] | 79 |
|
---|
[2] | 80 | QString preCompHeaderOut;
|
---|
| 81 |
|
---|
[370] | 82 | bool findBestVersion(const QString &dir, const QString &stem,
|
---|
| 83 | const QString &ext, QStringList &found);
|
---|
| 84 |
|
---|
[2] | 85 | virtual bool findLibraries();
|
---|
[629] | 86 | bool findLibraries(const QString &where);
|
---|
[2] | 87 | void fixTargetExt();
|
---|
| 88 |
|
---|
[35] | 89 | void writeProjectVarToStream(QTextStream &t, const QString &var);
|
---|
| 90 | QString makeResponseFileName(const QString &base);
|
---|
| 91 | void createLinkerResponseFiles(QTextStream &t);
|
---|
| 92 | void createCompilerResponseFiles(QTextStream &t);
|
---|
| 93 |
|
---|
[670] | 94 | static QString escapeFileVars(const QString &base);
|
---|
| 95 |
|
---|
[2] | 96 | bool init_flag;
|
---|
| 97 | QString quote;
|
---|
[42] | 98 |
|
---|
| 99 | enum Mode { App, DLL, StaticLib };
|
---|
| 100 | Mode mode;
|
---|
[2] | 101 | };
|
---|
| 102 |
|
---|
[10] | 103 | inline GNUMakefileGenerator::~GNUMakefileGenerator()
|
---|
[2] | 104 | { }
|
---|
| 105 |
|
---|
| 106 | QT_END_NAMESPACE
|
---|
| 107 |
|
---|
[10] | 108 | #endif // GNUMAKE_H
|
---|