ff32166f8ff2a1650c5a87cab5c6bf39d2ac63f4
[gem5.git] / src / base / SConscript
1 # -*- mode:python -*-
2
3 # Copyright (c) 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
9 # notice, this list of conditions and the following disclaimer;
10 # redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the distribution;
13 # neither the name of the copyright holders nor the names of its
14 # contributors may be used to endorse or promote products derived from
15 # this software without specific prior written permission.
16 #
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 Import('*')
30
31 SimObject('Graphics.py')
32 GTest('amo.test', 'amo.test.cc')
33 Source('atomicio.cc')
34 GTest('atomicio.test', 'atomicio.test.cc', 'atomicio.cc')
35 Source('bitfield.cc')
36 GTest('bitfield.test', 'bitfield.test.cc', 'bitfield.cc')
37 Source('imgwriter.cc')
38 Source('bmpwriter.cc')
39 Source('channel_addr.cc')
40 Source('cprintf.cc', add_tags='gtest lib')
41 GTest('cprintf.test', 'cprintf.test.cc')
42 Source('debug.cc')
43 GTest('debug.test', 'debug.test.cc', 'debug.cc')
44 if env['USE_FENV']:
45 Source('fenv.c')
46 if env['USE_PNG']:
47 Source('pngwriter.cc')
48 Source('fiber.cc')
49 GTest('fiber.test', 'fiber.test.cc', 'fiber.cc')
50 GTest('flags.test', 'flags.test.cc')
51 GTest('coroutine.test', 'coroutine.test.cc', 'fiber.cc')
52 Source('framebuffer.cc')
53 Source('hostinfo.cc')
54 Source('inet.cc')
55 Source('inifile.cc')
56 GTest('inifile.test', 'inifile.test.cc', 'inifile.cc', 'str.cc')
57 GTest('intmath.test', 'intmath.test.cc')
58 Source('logging.cc')
59 Source('match.cc')
60 GTest('match.test', 'match.test.cc', 'match.cc', 'str.cc')
61 Source('output.cc')
62 Source('pixel.cc')
63 GTest('pixel.test', 'pixel.test.cc', 'pixel.cc')
64 Source('pollevent.cc')
65 Source('random.cc')
66 if env['TARGET_ISA'] != 'null':
67 Source('remote_gdb.cc')
68 Source('socket.cc')
69 GTest('socket.test', 'socket.test.cc', 'socket.cc')
70 Source('statistics.cc')
71 Source('str.cc')
72 GTest('str.test', 'str.test.cc', 'str.cc')
73 Source('time.cc')
74 Source('version.cc')
75 Source('temperature.cc')
76 GTest('temperature.test', 'temperature.test.cc', 'temperature.cc')
77 Source('trace.cc')
78 GTest('trie.test', 'trie.test.cc')
79 Source('types.cc')
80 GTest('types.test', 'types.test.cc', 'types.cc')
81 GTest('uncontended_mutex.test', 'uncontended_mutex.test.cc')
82
83 Source('stats/group.cc')
84 Source('stats/text.cc')
85 if env['USE_HDF5']:
86 if main['GCC']:
87 Source('stats/hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated-copy'})
88 else:
89 Source('stats/hdf5.cc')
90
91 GTest('addr_range.test', 'addr_range.test.cc')
92 GTest('addr_range_map.test', 'addr_range_map.test.cc')
93 GTest('bitunion.test', 'bitunion.test.cc')
94 GTest('channel_addr.test', 'channel_addr.test.cc', 'channel_addr.cc')
95 GTest('circlebuf.test', 'circlebuf.test.cc')
96 GTest('circular_queue.test', 'circular_queue.test.cc')
97 GTest('sat_counter.test', 'sat_counter.test.cc')
98 GTest('refcnt.test','refcnt.test.cc')
99 GTest('condcodes.test', 'condcodes.test.cc')
100 GTest('chunk_generator.test', 'chunk_generator.test.cc')
101
102 DebugFlag('Annotate', "State machine annotation debugging")
103 DebugFlag('AnnotateQ', "State machine annotation queue debugging")
104 DebugFlag('AnnotateVerbose', "Dump all state machine annotation details")
105 DebugFlag('GDBAcc', "Remote debugger accesses")
106 DebugFlag('GDBExtra', "Dump extra information on reads and writes")
107 DebugFlag('GDBMisc', "Breakpoints, traps, watchpoints, etc.")
108 DebugFlag('GDBRead', "Reads to the remote address space")
109 DebugFlag('GDBRecv', "Messages received from the remote application")
110 DebugFlag('GDBSend', "Messages sent to the remote application")
111 DebugFlag('GDBWrite', "Writes to the remote address space")
112 DebugFlag('SQL', "SQL queries sent to the server")
113 DebugFlag('Stats', "Statistics management")
114 DebugFlag('StatEvents', "Statistics event tracking")
115
116 CompoundFlag('GDBAll',
117 [ 'GDBMisc', 'GDBAcc', 'GDBRead', 'GDBWrite', 'GDBSend', 'GDBRecv',
118 'GDBExtra' ],
119 desc="All Remote debugging flags")
120 CompoundFlag('AnnotateAll', ['Annotate', 'AnnotateQ', 'AnnotateVerbose'],
121 desc="All Annotation flags")
122
123 DebugFormatFlag('FmtFlag',
124 "Show the --debug-flag that enabled each debug message")
125 DebugFormatFlag('FmtStackTrace',
126 "Print a stack trace after every debug message")
127 DebugFormatFlag('FmtTicksOff', "Don't show tick count on debug messages")