diff options
Diffstat (limited to 'tools/kamek.py')
-rw-r--r-- | tools/kamek.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/kamek.py b/tools/kamek.py index f67f049..5f5efe8 100644 --- a/tools/kamek.py +++ b/tools/kamek.py @@ -306,13 +306,17 @@ class KamekBuilder(object): objfile = os.path.join(self._configTempDir, '%d.o' % generate_unique_id()) sourcefile = os.path.join(m.moduleDir, normal_sourcefile) - # todo: better extension detection - if sourcefile.endswith('.s') or sourcefile.endswith('.S'): - command = as_command + if sourcefile.endswith('.o'): + # object file + new_command = ['cp', sourcefile, objfile] else: - command = cc_command - - new_command = command + ['-c', '-o', objfile, sourcefile] + # todo: better extension detection + if sourcefile.endswith('.s') or sourcefile.endswith('.S'): + command = as_command + else: + command = cc_command + + new_command = command + ['-c', '-o', objfile, sourcefile] if 'cc_args' in m.data: new_command += m.data['cc_args'] |