From 87e0e76be5b17d1dd27274d58ac9b58cdf71c0ca Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 13 Sep 2014 12:09:16 +1000 Subject: Refactor code into the RTEMS Toolkit. --- wscript | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 8cefb93..edfa91f 100644 --- a/wscript +++ b/wscript @@ -28,7 +28,8 @@ # POSSIBILITY OF SUCH DAMAGE. # -subdirs = ['linkers', +subdirs = ['rtemstoolkit', + 'linkers', 'tester', 'tools/gdb/python'] @@ -37,9 +38,23 @@ def recurse(ctx): ctx.recurse(sd) def options(ctx): + ctx.add_option('--rtems-version', + default = '4.11', + dest='rtems_version', + help = 'Set the RTEMS version') + ctx.add_option('--c-opts', + default = '-O2', + dest='c_opts', + help = 'Set build options, default: -O2.') recurse(ctx) def configure(ctx): + try: + ctx.load("doxygen", tooldir = 'waf-tools') + except: + pass + ctx.env.C_OPTS = ctx.options.c_opts.split(',') + ctx.env.RTEMS_VERSION = ctx.options.rtems_version recurse(ctx) def build(ctx): @@ -50,3 +65,15 @@ def install(ctx): def clean(ctx): recurse(ctx) + +def rebuild(ctx): + import waflib.Options + waflib.Options.commands.extend(['clean', 'build']) + +# +# The doxy command. +# +from waflib import Build +class doxy(Build.BuildContext): + fun = 'build' + cmd = 'doxy' -- cgit v1.2.3