summaryrefslogtreecommitdiff
path: root/tools/kamek.py
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-03-26 02:30:11 +0100
committerTreeki <treeki@gmail.com>2011-03-26 02:30:11 +0100
commitb348b5f9124d28fe6ccc620253ba414fb08f3933 (patch)
tree11d786dcd2f3d868259aeeff09b3d4f4363a3c83 /tools/kamek.py
parentf7e7a1eea2e66ea507fc5a2b0813ec02493133a9 (diff)
downloadkamek-b348b5f9124d28fe6ccc620253ba414fb08f3933.tar.gz
kamek-b348b5f9124d28fe6ccc620253ba414fb08f3933.zip
added .o support to Kamek, and a separate project for Newer with codehandler
Diffstat (limited to '')
-rw-r--r--tools/kamek.py16
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']