maemotoolchain.h 2.48 KB
Newer Older
ck's avatar
ck committed
1
2
3
4
/**************************************************************************
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
ck's avatar
ck committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/

#ifndef MAEMOTOOLCHAIN_H
#define MAEMOTOOLCHAIN_H

#include <projectexplorer/toolchain.h>

namespace Qt4ProjectManager {
    class QtVersion;
    namespace Internal {

class MaemoToolChain : public ProjectExplorer::GccToolChain
{
public:
ck's avatar
ck committed
42
    MaemoToolChain(const QString &targetRoot);
ck's avatar
ck committed
43
44
    virtual ~MaemoToolChain();

45
    void addToEnvironment(Utils::Environment &env);
46
    ProjectExplorer::ToolChainType type() const;
ck's avatar
ck committed
47
48
49
50
    QString makeCommand() const;

    QString maddeRoot() const;
    QString targetRoot() const;
51
    QString targetName() const;
ck's avatar
ck committed
52
    QString sysrootRoot() const;
53
    QString madAdminCommand() const;
ck's avatar
ck committed
54

55
56
57
    enum MaemoVersion { Maemo5, Maemo6 };
    MaemoVersion version() const;
    bool allowsRemoteMounts() const { return version() == Maemo5; }
58
    bool allowsPackagingDisabling() const { return version() == Maemo5; }
59
    bool allowsQmlDebugging() const { return version() == Maemo6; }
60

ck's avatar
ck committed
61
protected:
62
    bool equals(const ToolChain *other) const;
ck's avatar
ck committed
63
64

private:
65
    void setMaddeRoot() const;
ck's avatar
ck committed
66
    void setSysroot() const;
ck's avatar
ck committed
67
68

private:
69
70
    mutable QString m_maddeRoot;
    mutable bool m_maddeInitialized;
ck's avatar
ck committed
71

72
73
    mutable QString m_sysrootRoot;
    mutable bool m_sysrootInitialized;
ck's avatar
ck committed
74

ck's avatar
ck committed
75
    const QString m_targetRoot;
ck's avatar
ck committed
76
77
78
79
80
81
};

    } // namespace Internal
} // namespace Qt4ProjectManager

#endif // MAEMOTOOLCHAIN_H