From b348b5f9124d28fe6ccc620253ba414fb08f3933 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 26 Mar 2011 02:30:11 +0100 Subject: added .o support to Kamek, and a separate project for Newer with codehandler --- tools/__pycache__/mapfile_tool.cpython-32.pyc | Bin 6461 -> 6382 bytes tools/kamek.py | 16 ++++++++++------ tools/mapfile_tool.pyc | Bin 5950 -> 5880 bytes 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/__pycache__/mapfile_tool.cpython-32.pyc b/tools/__pycache__/mapfile_tool.cpython-32.pyc index 1271b22..de48a1c 100644 Binary files a/tools/__pycache__/mapfile_tool.cpython-32.pyc and b/tools/__pycache__/mapfile_tool.cpython-32.pyc differ 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'] diff --git a/tools/mapfile_tool.pyc b/tools/mapfile_tool.pyc index 4d4ecc6..0bd4c39 100644 Binary files a/tools/mapfile_tool.pyc and b/tools/mapfile_tool.pyc differ -- cgit v1.2.3