Added configure system
[marionette.git] / kernel / SConscript
blob9a37c6f8083922713d7f2325628ee43cd9609f8e
1 files = [
2 'start.S',
3 'kmain.c',
4 'console.c',
5 'serial.c',
6 'gdt.c',
7 'isr.S',
8 'interrupt.c',
9 'trace.c',
10 'read-multiboot.c',
11 'panic.c',
12 'timer.c',
13 'thread.c',
14 'thread-asm.S',
15 'loadelf.c',
16 'syscall.c',
17 'exit.c',
18 'symtab.c',
21 subdirs = [
22 'mm',
25 Import(['env'])
26 import os.path
27 env.kernel_objects = [env.Object(i) for i in files]
28 env.SConscript([os.path.join(i, 'SConscript') for i in subdirs], exports = ['env'])
30 # build a test module
31 env.KernelModule('testmodule', ['testmodule.c'], 'testmodule/build')
33 # define the rule to build the kernel
34 kernel = env.Program('kernel.elf',
35     env.kernel_objects,
36     LIBS = ['c', 'gcc'],
37     LINKFLAGS = env['LINKFLAGS'] + ' -Wl,-T,' + os.path.join(Dir('.').srcnode().path, 'kernel.ld'),
40 # we also depend on the linker script, to link
41 env.Depends(kernel, 'kernel.ld')