a896a34e44b5097fc9fc6e85e4cd3bf552fb4578
3 # Copyright (c) 2016, Dresden University of Technology (TU Dresden)
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
10 # 1. Redistributions of source code must retain the above copyright notice,
11 # this list of conditions and the following disclaimer.
13 # 2. Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in the
15 # documentation and/or other materials provided with the distribution.
17 # 3. Neither the name of the copyright holder nor the names of its
18 # contributors may be used to endorse or promote products derived from
19 # this software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
25 # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 # Authors: Christian Menard
39 #gem5_variant = 'debug'
41 gem5_root
= '#../../../..'
43 target
= 'gem5.' + gem5_variant
+ '.sc'
47 # Import PKG_CONFIG_PATH from the external environment
48 if os
.environ
.has_key('PKG_CONFIG_PATH'):
49 env
['ENV']['PKG_CONFIG_PATH'] = os
.environ
['PKG_CONFIG_PATH']
52 env
.ParseConfig('pkg-config --cflags --libs systemc')
55 env
.Append(CPPPATH
=[gem5_root
+ '/build/' + gem5_arch
,
56 gem5_root
+ '/util/systemc',
57 gem5_root
+ '/util/tlm',
60 env
.Append(LIBS
=['gem5_' + gem5_variant
])
61 env
.Append(LIBPATH
=[gem5_root
+ '/build/' + gem5_arch
])
63 env
.Append(CXXFLAGS
=['-std=c++11',
64 '-DSC_INCLUDE_DYNAMIC_PROCESSES',
67 if gem5_variant
== 'debug':
68 env
.Append(CXXFLAGS
=['-g', '-DDEBUG'])
70 src_systemc
= [gem5_root
+ '/util/systemc/sc_gem5_control.cc',
71 gem5_root
+ '/util/systemc/sc_logger.cc',
72 gem5_root
+ '/util/systemc/sc_module.cc',
73 gem5_root
+ '/util/systemc/stats.cc']
75 src_tlm
= Glob(gem5_root
+ '/util/tlm/*.cc')
76 src_main
= Glob('*.cc') + Glob('../common/*.cc')
78 main
= env
.Program(target
, src_systemc
+ src_tlm
+ src_main
)