summaryrefslogtreecommitdiff
path: root/bsps/wscript
blob: 7afe307f9b9e0e06d2a4c96d32ab552caac15b2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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"
		)