SConscript (12305:b6ebf3d20329) SConscript (12306:25caccab1be4)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 937 unchanged lines hidden (view full) ---

946 libname = 'gem5_' + label
947 exename = 'gem5.' + label
948 secondary_exename = 'm5.' + label
949
950 new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
951 new_env.Label = label
952 new_env.Append(**kwargs)
953
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 937 unchanged lines hidden (view full) ---

946 libname = 'gem5_' + label
947 exename = 'gem5.' + label
948 secondary_exename = 'm5.' + label
949
950 new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
951 new_env.Label = label
952 new_env.Append(**kwargs)
953
954 def make_obj(source, static, extra_deps=None):
955 '''This function creates a scons node of the requested type, and sets
956 up any additional dependencies.'''
957
954 def make_obj(source, static):
955 '''This function creates a scons node of the requested type.'''
958 if static:
956 if static:
959 obj = new_env.StaticObject(source.tnode)
957 return new_env.StaticObject(source.tnode)
960 else:
958 else:
961 obj = new_env.SharedObject(source.tnode)
959 return new_env.SharedObject(source.tnode)
962
960
963 if extra_deps:
964 new_env.Depends(obj, extra_deps)
965
966 return obj
967
968 lib_sources = Source.all.with_tag('gem5 lib')
969
970 # Without Python, leave out all Python content from the library
971 # builds. The option doesn't affect gem5 built as a program
972 if GetOption('without_python'):
973 lib_sources = lib_sources.without_tag('python')
974
975 static_objs = []

--- 27 unchanged lines hidden (view full) ---

1003
1004 # Set up the shared partially linked objects.
1005 source_objs = [ make_obj(s, False) for s in srcs ]
1006 file_name = new_env.subst("${SHOBJPREFIX}lib${SHOBJSUFFIX}.partial")
1007 target = File(joinpath(group, file_name))
1008 partial = env.PartialShared(target=target, source=source_objs)
1009 shared_objs.append(partial)
1010
961 lib_sources = Source.all.with_tag('gem5 lib')
962
963 # Without Python, leave out all Python content from the library
964 # builds. The option doesn't affect gem5 built as a program
965 if GetOption('without_python'):
966 lib_sources = lib_sources.without_tag('python')
967
968 static_objs = []

--- 27 unchanged lines hidden (view full) ---

996
997 # Set up the shared partially linked objects.
998 source_objs = [ make_obj(s, False) for s in srcs ]
999 file_name = new_env.subst("${SHOBJPREFIX}lib${SHOBJSUFFIX}.partial")
1000 target = File(joinpath(group, file_name))
1001 partial = env.PartialShared(target=target, source=source_objs)
1002 shared_objs.append(partial)
1003
1011 static_date = make_obj(date_source, static=True, extra_deps=static_objs)
1004 static_date = make_obj(date_source, static=True)
1005 new_env.Depends(static_date, static_objs)
1012 static_objs.append(static_date)
1013
1006 static_objs.append(static_date)
1007
1014 shared_date = make_obj(date_source, static=False, extra_deps=shared_objs)
1008 shared_date = make_obj(date_source, static=False)
1009 new_env.Depends(shared_date, shared_objs)
1015 shared_objs.append(shared_date)
1016
1017 # First make a library of everything but main() so other programs can
1018 # link against m5.
1019 static_lib = new_env.StaticLibrary(libname, static_objs)
1020 shared_lib = new_env.SharedLibrary(libname, shared_objs)
1021
1022 # Now link a stub with main() and the static library.

--- 136 unchanged lines hidden ---
1010 shared_objs.append(shared_date)
1011
1012 # First make a library of everything but main() so other programs can
1013 # link against m5.
1014 static_lib = new_env.StaticLibrary(libname, static_objs)
1015 shared_lib = new_env.SharedLibrary(libname, shared_objs)
1016
1017 # Now link a stub with main() and the static library.

--- 136 unchanged lines hidden ---