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 --- 158 unchanged lines hidden (view full) --- 167 new_tag = Source.link_group_tag(group) 168 Source._current_group_tag = new_tag 169 Source.source_groups.add(group) 170 171 def _add_link_group_tag(self): 172 self.tags.add(Source._current_group_tag) 173 174 '''Add a c/c++ source file to the build''' |
175 def __init__(self, source, tags=None, add_tags=None): |
176 '''specify the source file, and any tags''' 177 super(Source, self).__init__(source, tags, add_tags) 178 self._add_link_group_tag() |
179 180class PySource(SourceFile): 181 '''Add a python source file to the named package''' 182 invalid_sym_char = re.compile('[^A-z0-9_]') 183 modules = {} 184 tnodes = {} 185 symnames = {} 186 --- 759 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 |
958 if static: |
959 obj = new_env.StaticObject(source.tnode) |
960 else: |
961 obj = new_env.SharedObject(source.tnode) |
962 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'): --- 186 unchanged lines hidden --- |