SConscript (4182:5b2c0d266107) | SConscript (4202:f7a05daec670) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2005-2006 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 --- 69 unchanged lines hidden (view full) --- 78# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 79# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 80# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 81# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 82# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 83# 84# Authors: Gabe Black 85 | 1# -*- mode:python -*- 2 3# Copyright (c) 2005-2006 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 --- 69 unchanged lines hidden (view full) --- 78# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 79# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 80# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 81# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 82# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 83# 84# Authors: Gabe Black 85 |
86import os 87import sys 88from os.path import isdir | 86Import('*') |
89 | 87 |
90# Import build environment variable from SConstruct. 91Import('env') | 88if env['TARGET_ISA'] == 'x86': 89 Source('floatregfile.cc') 90 Source('intregfile.cc') 91 Source('miscregfile.cc') 92 Source('regfile.cc') 93 Source('remote_gdb.cc') |
92 | 94 |
93################################################### 94# 95# Define needed sources. 96# 97################################################### | 95 if env['FULL_SYSTEM']: 96 # Full-system sources 97 pass 98 else: 99 Source('process.cc') |
98 | 100 |
99# Base sources used by all configurations. 100base_sources = Split(''' 101 floatregfile.cc 102 intregfile.cc 103 miscregfile.cc 104 regfile.cc 105 remote_gdb.cc 106 predecoder_tables.cc 107 ''') | 101 Source('linux/linux.cc') 102 Source('linux/process.cc') 103 Source('linux/syscalls.cc') |
108 | 104 |
109# Full-system sources 110full_system_sources = Split(''' 111 ''') 112 113# Syscall emulation (non-full-system) sources 114syscall_emulation_sources = Split(''' 115 linux/linux.cc 116 linux/process.cc 117 linux/syscalls.cc 118 process.cc 119 ''') 120 121sources = base_sources 122 123if env['FULL_SYSTEM']: 124 sources += full_system_sources 125else: 126 sources += syscall_emulation_sources 127 128# Convert file names to SCons File objects. This takes care of the 129# path relative to the top of the directory tree. 130sources = [File(s) for s in sources] 131 132# Add in files generated by the ISA description. 133isa_desc_files = env.ISADesc('isa/main.isa') 134# Only non-header files need to be compiled. 135isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')] 136sources += isa_desc_sources 137 138Return('sources') | 105 # Add in files generated by the ISA description. 106 isa_desc_files = env.ISADesc('isa/main.isa') 107 # Only non-header files need to be compiled. 108 for f in isa_desc_files: 109 if not f.path.endswith('.hh'): 110 Source(f) |