aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/keil.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/cpp/keil.qbs')
-rw-r--r--share/qbs/modules/cpp/keil.qbs92
1 files changed, 13 insertions, 79 deletions
diff --git a/share/qbs/modules/cpp/keil.qbs b/share/qbs/modules/cpp/keil.qbs
index 10bc39e12..2d29112cd 100644
--- a/share/qbs/modules/cpp/keil.qbs
+++ b/share/qbs/modules/cpp/keil.qbs
@@ -78,85 +78,26 @@ CppModule {
property string cCompilerName: compilerName
property string cxxCompilerName: compilerName
- compilerName: {
- switch (qbs.architecture) {
- case "mcs51":
- return "c51" + compilerExtension;
- case "arm":
- return "armcc" + compilerExtension;
- }
- }
+ compilerName: KEIL.compilerName(qbs) + compilerExtension
compilerPath: FileInfo.joinPaths(toolchainInstallPath, compilerName)
- assemblerName: {
- switch (qbs.architecture) {
- case "mcs51":
- return "a51" + compilerExtension;
- case "arm":
- return "armasm" + compilerExtension;
- }
- }
+ assemblerName: KEIL.assemblerName(qbs) + compilerExtension
assemblerPath: FileInfo.joinPaths(toolchainInstallPath, assemblerName)
- linkerName: {
- switch (qbs.architecture) {
- case "mcs51":
- return "bl51" + compilerExtension;
- case "arm":
- return "armlink" + compilerExtension;
- }
- }
+ linkerName: KEIL.linkerName(qbs) + compilerExtension
linkerPath: FileInfo.joinPaths(toolchainInstallPath, linkerName)
- property string archiverName: {
- switch (qbs.architecture) {
- case "mcs51":
- return "lib51" + compilerExtension;
- case "arm":
- return "armar" + compilerExtension;
- }
- }
+ property string archiverName: KEIL.archiverName(qbs) + compilerExtension
property string archiverPath: FileInfo.joinPaths(toolchainInstallPath, archiverName)
runtimeLibrary: "static"
- staticLibrarySuffix: {
- switch (qbs.architecture) {
- case "mcs51":
- return ".lib";
- case "arm":
- return ".lib";
- }
- }
+ staticLibrarySuffix: KEIL.staticLibrarySuffix(qbs)
+ executableSuffix: KEIL.executableSuffix(qbs)
- executableSuffix: {
- switch (qbs.architecture) {
- case "mcs51":
- return ".abs";
- case "arm":
- return ".axf";
- }
- }
+ property string objectSuffix: KEIL.objectSuffix(qbs)
- property string objectSuffix: {
- switch (qbs.architecture) {
- case "mcs51":
- return ".obj";
- case "arm":
- return ".o";
- }
- }
-
- imageFormat: {
- switch (qbs.architecture) {
- case "mcs51":
- // Keil OMF51 or OMF2 Object Module Format (which is an
- // extension of the original Intel OMF51).
- return "omf";
- case "arm":
- return "elf";
- }
- }
+ imageFormat: KEIL.imageFormat(qbs)
enableExceptions: false
enableRtti: false
@@ -171,18 +112,11 @@ CppModule {
+ input.fileName + input.cpp.objectSuffix
}
- prepare: KEIL.prepareAssembler.apply(KEIL, arguments);
- }
-
- FileTagger {
- condition: qbs.architecture === "mcs51";
- patterns: ["*.a51", "*.A51"]
- fileTags: ["asm"]
+ prepare: KEIL.prepareAssembler.apply(KEIL, arguments)
}
FileTagger {
- condition: qbs.architecture === "arm";
- patterns: "*.s"
+ patterns: ["*.s", "*.a51", ".asm"]
fileTags: ["asm"]
}
@@ -197,7 +131,7 @@ CppModule {
+ input.fileName + input.cpp.objectSuffix
}
- prepare: KEIL.prepareCompiler.apply(KEIL, arguments);
+ prepare: KEIL.prepareCompiler.apply(KEIL, arguments)
}
Rule {
@@ -230,7 +164,7 @@ CppModule {
return artifacts;
}
- prepare:KEIL.prepareLinker.apply(KEIL, arguments);
+ prepare: KEIL.prepareLinker.apply(KEIL, arguments)
}
Rule {
@@ -246,6 +180,6 @@ CppModule {
PathTools.staticLibraryFilePath(product))
}
- prepare: KEIL.prepareArchiver.apply(KEIL, arguments);
+ prepare: KEIL.prepareArchiver.apply(KEIL, arguments)
}
}