-# 'targetarch' is a symlink to arch/$TARGET_ISA.
-def link_targetarch(target, source, env):
- link_target = str(target[0])
- link_source = env.subst('$SRCDIR/arch/$TARGET_ISA')
- if not os.path.isdir(link_target):
- print "symlinking", link_source, "to", link_target
- try:
- os.symlink(link_source, link_target)
- except OSError, desc:
- print "Error creating symlink %s: %s" % (link_target, desc)
- sys.exit(-1)
-
-# Tell SCons to use the link_targetarch function to make 'targetarch'
-env.Command('targetarch', None, link_targetarch)
+# libelf build is described in its own SConscript file.
+# SConscript-local is the per-config build, which just copies some
+# header files into a place where they can be found.
+SConscript('libelf/SConscript-local', exports = 'env', duplicate=0)
+SConscript('sim/pyconfig/SConscript', exports = ['env'], duplicate=0)