1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
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
16 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights. These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #ifndef RVCTTOOLCHAIN_H
35 #define RVCTTOOLCHAIN_H
37 #include "s60devices.h"
39 #include <projectexplorer/toolchain.h>
41 namespace Qt4ProjectManager {
44 // ==========================================================================
46 // ==========================================================================
48 class RVCTToolChain : public ProjectExplorer::ToolChain
51 explicit RVCTToolChain(const S60Devices::Device &device,
52 ProjectExplorer::ToolChainType type);
53 QByteArray predefinedMacros();
54 QList<ProjectExplorer::HeaderPath> systemHeaderPaths();
55 void addToEnvironment(Utils::Environment &env);
56 ProjectExplorer::ToolChainType type() const;
57 QString makeCommand() const;
58 ProjectExplorer::IOutputParser *outputParser() const;
60 static QSet<QPair<int, int> > configuredRvctVersions();
62 // Return the environment variable indicating the RVCT version
63 // 'RVCT2<minor>BIN' and its setting
64 virtual QByteArray rvctBinEnvironmentVariable() = 0;
66 QString rvctBinPath();
70 bool equals(const ToolChain *other) const = 0;
72 QStringList configuredEnvironment();
74 QByteArray rvctBinEnvironmentVariableForVersion(int major);
75 void addToRVCTPathVariable(const QString &postfix, const QStringList &values,
76 Utils::Environment &env) const;
77 QStringList libPaths();
80 QByteArray m_predefinedMacros;
81 QList<ProjectExplorer::HeaderPath> m_systemHeaderPaths;
83 const S60ToolChainMixin m_mixin;
84 const ProjectExplorer::ToolChainType m_type;
85 bool m_versionUpToDate;
92 QStringList m_additionalEnvironment;
95 // ==========================================================================
97 // ==========================================================================
99 class RVCT2ToolChain : public RVCTToolChain
102 explicit RVCT2ToolChain(const S60Devices::Device &device,
103 ProjectExplorer::ToolChainType type);
104 QByteArray rvctBinEnvironmentVariable();
106 QByteArray predefinedMacros();
109 bool equals(const ToolChain *other) const;
112 // ==========================================================================
114 // ==========================================================================
116 class RVCT4ToolChain : public RVCT2ToolChain
119 explicit RVCT4ToolChain(const S60Devices::Device &device,
120 ProjectExplorer::ToolChainType type);
122 QByteArray rvctBinEnvironmentVariable();
124 QByteArray predefinedMacros();
127 bool equals(const ToolChain *other) const;
130 } // namespace Internal
131 } // namespace Qt4ProjectManager
133 #endif // RVCTTOOLCHAIN_H