Removing old waf build scripts and vendored libcxx
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
from os.path import join
|
||||
|
||||
lds_path = join(ctx.env.ARCH_D, "boot.ld")
|
||||
|
||||
ctx.env.append_value('DEFINES_EFI', [
|
||||
'KERNEL_FILENAME=L"{}"'.format(ctx.env.KERNEL_FILENAME),
|
||||
'GNU_EFI_USE_MS_ABI',
|
||||
'HAVE_USE_MS_ABI',
|
||||
'EFI_DEBUG=0',
|
||||
'EFI_DEBUG_CLEAR_MEMORY=0',
|
||||
])
|
||||
ctx.env.append_value('CFLAGS_EFI', ['-fPIC', '-fshort-wchar'])
|
||||
ctx.env.append_value('LINKFLAGS_EFI', [
|
||||
'-shared',
|
||||
'-T', lds_path,
|
||||
])
|
||||
ctx.env.append_value('SECTIONS_EFI', [
|
||||
])
|
||||
|
||||
def build(bld):
|
||||
sources = bld.path.ant_glob("**/*.c")
|
||||
sources += bld.path.ant_glob("**/*.s")
|
||||
|
||||
bld.program(
|
||||
source = sources,
|
||||
target = "boot.elf",
|
||||
use = 'EFI',
|
||||
)
|
||||
|
||||
from waflib.Task import Task
|
||||
class make_efi(Task):
|
||||
color = 'YELLOW'
|
||||
def keyword(self):
|
||||
return "Creating"
|
||||
def __str__(self):
|
||||
node = self.outputs[0]
|
||||
return node.path_from(node.ctx.launch_node())
|
||||
def run(self):
|
||||
from subprocess import check_call as call
|
||||
|
||||
args = self.env.objcopy
|
||||
sections = [".text", ".sdata", ".data", ".dynamic",
|
||||
".dynsym", ".rel", ".rela", ".reloc"]
|
||||
for s in sections: args.extend(['-j', s])
|
||||
args.append('--target=efi-app-' + self.env.POPCORN_ARCH)
|
||||
args.append(self.inputs[0].abspath())
|
||||
args.append(self.outputs[0].abspath())
|
||||
call(args)
|
||||
|
||||
src = bld.path
|
||||
out = bld.path.get_bld()
|
||||
|
||||
efi = make_efi(env=bld.env)
|
||||
efi.set_inputs([out.make_node("boot.elf")])
|
||||
efi.set_outputs([out.make_node("boot.efi")])
|
||||
bld.add_to_group(efi)
|
||||
|
||||
|
||||
# vim: ft=python et sw=4
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
pass
|
||||
|
||||
def build(bld):
|
||||
sources = bld.path.ant_glob("**/*.cpp")
|
||||
sources += bld.path.ant_glob("**/*.s")
|
||||
|
||||
bld.program(
|
||||
source = sources,
|
||||
name = 'nulldrv',
|
||||
target = 'nulldrv',
|
||||
)
|
||||
|
||||
# vim: ft=python et
|
||||
@@ -1,51 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
pass
|
||||
|
||||
def build(bld):
|
||||
from os.path import join
|
||||
|
||||
sources = bld.path.ant_glob("**/*.cpp")
|
||||
sources += bld.path.ant_glob("**/*.s")
|
||||
|
||||
lds = join(bld.env.ARCH_D, 'kernel.ld')
|
||||
|
||||
bld.program(
|
||||
source = sources,
|
||||
name = 'kernel',
|
||||
includes = '.',
|
||||
target = bld.env.KERNEL_FILENAME,
|
||||
use = [
|
||||
'kutil',
|
||||
'initrd',
|
||||
'elf',
|
||||
],
|
||||
linkflags = "-T {}".format(lds),
|
||||
)
|
||||
|
||||
from waflib.Task import Task
|
||||
class objdump(Task):
|
||||
color = 'PINK'
|
||||
def keyword(self):
|
||||
return "Dumping"
|
||||
def __str__(self):
|
||||
node = self.outputs[0]
|
||||
return node.path_from(node.ctx.launch_node())
|
||||
def run(self):
|
||||
from subprocess import check_output
|
||||
args = self.env.objdump + [
|
||||
"--source",
|
||||
"-D",
|
||||
"-M", "intel",
|
||||
self.inputs[0].abspath()]
|
||||
with file(self.outputs[0].abspath(), 'w') as output:
|
||||
output.write(check_output(args))
|
||||
|
||||
out = bld.path.get_bld()
|
||||
|
||||
dump = objdump(env=bld.env)
|
||||
dump.set_inputs([out.make_node(bld.env.KERNEL_FILENAME)])
|
||||
dump.set_outputs([out.make_node("kernel.dump")])
|
||||
bld.add_to_group(dump)
|
||||
|
||||
# vim: ft=python et
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
pass
|
||||
|
||||
def build(bld):
|
||||
sources = bld.path.ant_glob("**/*.cpp")
|
||||
|
||||
bld.stlib(
|
||||
source = sources,
|
||||
includes = 'include',
|
||||
name = 'elf',
|
||||
target = 'elf',
|
||||
use = 'KUTIL',
|
||||
)
|
||||
|
||||
# vim: ft=python et
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
pass
|
||||
|
||||
def build(bld):
|
||||
sources = bld.path.ant_glob("**/*.cpp")
|
||||
|
||||
bld.stlib(
|
||||
source = sources,
|
||||
includes = 'include',
|
||||
name = 'initrd',
|
||||
target = 'initrd',
|
||||
use = 'KUTIL',
|
||||
)
|
||||
|
||||
# vim: ft=python et
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
pass
|
||||
|
||||
def build(bld):
|
||||
sources = bld.path.ant_glob("**/*.cpp")
|
||||
|
||||
bld.stlib(
|
||||
source = sources,
|
||||
includes = 'include',
|
||||
name = 'kutil',
|
||||
target = 'kutil',
|
||||
)
|
||||
|
||||
# vim: ft=python et
|
||||
@@ -1,39 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
pass
|
||||
|
||||
def build(bld):
|
||||
sources = bld.path.ant_glob("**/*.cpp")
|
||||
|
||||
from waflib import Task
|
||||
@Task.deep_inputs
|
||||
class utest(Task.Task):
|
||||
color = 'PINK'
|
||||
quiet = False
|
||||
def run(self):
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
args = [self.inputs[0].abspath()]
|
||||
output = None
|
||||
|
||||
try:
|
||||
output = subprocess.check_output(args)
|
||||
except subprocess.CalledProcessError, e:
|
||||
sys.stdout.write(e.output)
|
||||
return "Failed"
|
||||
|
||||
sys.stdout.write(output)
|
||||
|
||||
bld.program(
|
||||
source = sources,
|
||||
name = 'test',
|
||||
target = 'test',
|
||||
use = 'kutil',
|
||||
)
|
||||
|
||||
run_tests = utest(env = bld.env)
|
||||
run_tests.set_inputs(bld.path.get_bld().make_node('test'))
|
||||
bld.add_to_group(run_tests)
|
||||
|
||||
# vim: ft=python et
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
def configure(ctx):
|
||||
pass
|
||||
|
||||
def build(bld):
|
||||
sources = bld.path.ant_glob("**/*.cpp")
|
||||
|
||||
bld.program(
|
||||
source = sources,
|
||||
name = 'makerd',
|
||||
target = 'makerd',
|
||||
use = 'INITRD KUTIL',
|
||||
)
|
||||
|
||||
# vim: ft=python et
|
||||
Reference in New Issue
Block a user