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

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

172# files.
173env.Append(CPPPATH=Dir('.'))
174
175# Add a flag defining what THE_ISA should be for all compilation
176env.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())])
177
178########################################################################
179#
180# Walk the tree and execute all SConscripts in 'src' subdirectories
180# Walk the tree and execute all SConscripts in subdirectories
181#
182
183for base_dir in base_dir_list:
184 src_dir = joinpath(base_dir, 'src')
185 if not isdir(src_dir):
186 continue
184 here = Dir('.').srcnode().abspath
188 for root, dirs, files in os.walk(src_dir, topdown=True):
185 for root, dirs, files in os.walk(base_dir, topdown=True):
186 if root == here:
187 # we don't want to recurse back into this SConscript
188 continue
189
190 if 'SConscript' in files:
194 build_dir = joinpath(env['BUILDDIR'], root[len(src_dir) + 1:])
191 build_dir = joinpath(env['BUILDDIR'], root[len(base_dir) + 1:])
192 SConscript(joinpath(root, 'SConscript'), build_dir=build_dir)
193
194for opt in env.ExportOptions:
195 env.ConfigFile(opt)
196
197########################################################################
198#
199# Prevent any SimObjects from being added after this point, they

--- 242 unchanged lines hidden ---