import SCons
-# This file defines how to build a particular configuration of M5
+# This file defines how to build a particular configuration of gem5
# based on variable settings in the 'env' build environment.
Import('*')
# get specifies a set of filters, only files that match those filters
# will be accepted (unspecified filters on files are assumed to be
# false). Current filters are:
-# main -- specifies the m5 main() function
-# skip_lib -- do not put this file into the m5 library
+# main -- specifies the gem5 main() function
+# skip_lib -- do not put this file into the gem5 library
# <unittest> -- unit tests use filters based on the unit test name
#
# A parent can now be specified for a source file and default filter
env.Append(CPPPATH=Dir(extra_dir))
# Workaround for bug in SCons version > 0.97d20071212
-# Scons bug id: 2006 M5 Bug id: 308
+# Scons bug id: 2006 gem5 Bug id: 308
for root, dirs, files in os.walk(base_dir, topdown=True):
Dir(root[len(base_dir) + 1:])
def makeEnv(label, objsfx, strip = False, **kwargs):
# SCons doesn't know to append a library suffix when there is a '.' in the
# name. Use '_' instead.
- libname = 'm5_' + label
- exename = 'm5.' + label
+ libname = 'gem5_' + label
+ exename = 'gem5.' + label
+ secondary_exename = 'm5.' + label
new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
new_env.Label = label
cmd = 'strip $SOURCE -o $TARGET'
targets = new_env.Command(exename, progname,
MakeAction(cmd, Transform("STRIP")))
-
+
+ new_env.Command(secondary_exename, exename,
+ MakeAction('ln $SOURCE $TARGET', Transform("HARDLINK")))
+
new_env.M5Binary = targets[0]
envList.append(new_env)