Note: The following information is taken from the soclib trac.
SoCLib's configuration file is used by soclib-cc to find your tools paths. You may override:
libraries: SystemC implementation to use (its paths, ...), tlm, ...toolchain: Compiler and compiler flagsbuild env: toolchain, libraries and other flags (where objects reside, ...)
Let's suppose we want to override SystemC's path, we can write the following ~/.soclib/global.conf:
config.libsystemc_22 = Library(
parent = config.systemc,
dir = "/home/me/tools/systemc/2.2"
)
config.foo = BuildEnv(
parent = config.build_env,
libraries = [config.libsystemc_22],
)
config.default = config.foo
Now let's suppose we would like to add another configuration where we use SystemCass. We don't want compiled objects to mix-up, so we'll set another repository for built files.
config.libsystemcass = Library(
parent = config.systemc,
dir = "/home/me/tools/systemc/cass",
libs = config.systemc.libs + ["-Wl,-rpath,%(libdir)s", "-ldl", "-fopenmp"],
)
config.systemcass = BuildEnv(
parent = config.default,
repos = "repos/systemcass_objs",
libraries = [config.libsystemcass],
)
Now if we want to compile a platform with SystemCass, the only thing to do is to tell it to soclib-cc:
$ soclib-cc -t systemcass
The argument after -t is the configuration name, attribute set to config in this line:
config.systemcass = BuildEnv( ....
The only configuration names that can be passed to -t are the ones associated to BuildEnvs.
