from imp import new_module from os.path import basename def build(ctx): source = [] ctx.recurse("shared") ctx.recurse("%s/shared" % ctx.env.RTEMS_ARCH) ctx.recurse("%s/%s" % (ctx.env.RTEMS_ARCH, ctx.env.BSP_SOURCE_DIR)) ctx( target = "rtemsbsp", use = [ "auto_libbsp_objects" ], includes = ["%s/include/libchip" % ctx.srcnode.abspath()], features = "c cstlib", install_path = ctx.env.LIBDIR # use = "linkcmds_linkcmds linkcmds_base" ) # First file is always installed as "linkcmds" # XXX: This needs to be removed eventually by fixing the filenames. # if ctx.env.LINKCMDS: ctx.copy_or_subst( ctx.env.LINKCMDS[0], "linkcmds", "linkcmds_linkcmds" ) for file in ctx.env.LINKCMDS[1:]: base = basename(file) ctx.copy_or_subst( file, base, "linkcmds_base" )