diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-02-02 20:10:47 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-02-02 20:10:47 +0100 |
commit | b9fcc41f3f551f7cb7f543e8f8cefe32efcc65c7 (patch) | |
tree | 8a43c83fca1f8069a4e20e4764d67a389331c01b /modules | |
parent | 57b2180c173e2963bdec5e8d5b9af6361a6ac18e (diff) |
Made SConscripts tidyer.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/foo/SConscript | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/modules/foo/SConscript b/modules/foo/SConscript index a79de34..22f150b 100644 --- a/modules/foo/SConscript +++ b/modules/foo/SConscript @@ -1,30 +1,6 @@ Import('env') -env = env.Clone( - CC = 'i386-elf-gcc', - CCFLAGS = '-Wall -W -nostdinc -fno-builtin -fno-hosted -ggdb -std=gnu99', - LINK = 'i386-elf-ld', - LINKFLAGS = '-nostdinc -nostdlib', -) - -def kernel_bld_generator(source, target, env, for_signature): - link_script = None - for s in source: - if s.suffix == '.ld': - link_script = s - break - if not link_script: - Exit(1) - return '$LINK $LINKFLAGS -o %s -T %s %s ' % (target[0], link_script, ' '.join(str(s) for s in source if s != link_script)) - -kernel_bld = Builder( - generator = kernel_bld_generator, - suffix = '', - src_suffix = '.o', - src_builder = 'Object', - target_scanner = ProgramScanner -) - -env.Append(BUILDERS = {'Kernel' : kernel_bld}) - -kernel = env.Kernel('foo', ['foo.ld', 'foo.c']) +kernel = env.Standalone('foo', [ + 'foo.ld', + 'foo.c', +]) |