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.qbs90
1 files changed, 9 insertions, 81 deletions
diff --git a/share/qbs/modules/cpp/keil.qbs b/share/qbs/modules/cpp/keil.qbs
index c87bf05f8..aca00eb99 100644
--- a/share/qbs/modules/cpp/keil.qbs
+++ b/share/qbs/modules/cpp/keil.qbs
@@ -66,95 +66,30 @@ CppModule {
property string compilerExtension: qbs.hostOS.contains("windows") ? ".exe" : ""
- property bool generateMapFile: true
- PropertyOptions {
- name: "generateMapFile"
- description: "produce a linker list file (enabled by default)"
- }
-
/* Work-around for QtCreator which expects these properties to exist. */
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
@@ -168,14 +103,7 @@ CppModule {
}
FileTagger {
- condition: qbs.architecture === "mcs51";
- patterns: ["*.a51", "*.A51"]
- fileTags: ["asm"]
- }
-
- FileTagger {
- condition: qbs.architecture === "arm";
- patterns: "*.s"
+ patterns: ["*.s", "*.a51", ".asm"]
fileTags: ["asm"]
}