source: rtems-tools/tester/covoar/wscript @ f9a4b2c

5
Last change on this file since f9a4b2c was f9a4b2c, checked in by Cillian O'Donnell <cpodonnell8@…>, on 08/26/17 at 08:15:58

covoar: Remove config file and test critical options are valid.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1#
2# RTEMS Tools Project (http://www.rtems.org/)
3# Copyright 2014 Chris Johns (chrisj@rtems.org)
4# All rights reserved.
5#
6# This file is part of the RTEMS Tools package in 'rtems-tools'.
7#
8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions are met:
10#
11# 1. Redistributions of source code must retain the above copyright notice,
12# this list of conditions and the following disclaimer.
13#
14# 2. Redistributions in binary form must reproduce the above copyright notice,
15# this list of conditions and the following disclaimer in the documentation
16# and/or other materials provided with the distribution.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28# POSSIBILITY OF SUCH DAMAGE.
29#
30
31#
32# Build the covoar application.
33#
34# Taken from the waf C++ demo.
35#
36
37#
38# The following two variables are used by the target "waf dist".
39#
40VERSION='0.0.1'
41APPNAME='covoar'
42
43#
44# These variables are mandatory ('/' are converted automatically)
45#
46top = '.'
47out = 'build'
48
49def init(ctx):
50    pass
51
52rtl_includes = ['../../rtemstoolkit',
53                '../../rtemstoolkit/elftoolchain/common',
54                '../../rtemstoolkit/elftoolchain/libelf',
55                '../../rtemstoolkit/libiberty']
56
57def options(opt):
58    opt.load('compiler_cxx')
59
60def configure(conf):
61    conf.load('compiler_cxx')
62    conf.check_cc(function_name='open64', header_name="stdlib.h", mandatory = False)
63    conf.check_cc(function_name='stat64', header_name="stdlib.h", mandatory = False)
64    conf.write_config_header('covoar-config.h')
65    conf.env.STLIBPATH_RLD = conf.path.abspath() + '/../../build/rtemstoolkit'
66    conf.env.STLIB_RLD = ['rld','iberty','elf']
67
68def build(bld):
69    bld.stlib(target = 'ccovoar',
70              source = ['app_common.cc',
71                        'CoverageFactory.cc',
72                        'CoverageMap.cc',
73                        'CoverageMapBase.cc',
74                        'CoverageRanges.cc',
75                        'CoverageReaderBase.cc',
76                        'CoverageReaderQEMU.cc',
77                        'CoverageReaderRTEMS.cc',
78                        'CoverageReaderSkyeye.cc',
79                        'CoverageReaderTSIM.cc',
80                        'CoverageWriterBase.cc',
81                        'CoverageWriterRTEMS.cc',
82                        'CoverageWriterSkyeye.cc',
83                        'CoverageWriterTSIM.cc',
84                        'DesiredSymbols.cc',
85                        'ExecutableInfo.cc',
86                        'Explanations.cc',
87                        'GcovData.cc',
88                        'GcovFunctionData.cc',
89                        'ObjdumpProcessor.cc',
90                        'ReportsBase.cc',
91                        'ReportsText.cc',
92                        'ReportsHtml.cc',
93                        'SymbolTable.cc',
94                        'Target_arm.cc',
95                        'TargetBase.cc',
96                        'TargetFactory.cc',
97                        'Target_i386.cc',
98                        'Target_lm32.cc',
99                        'Target_m68k.cc',
100                        'Target_powerpc.cc',
101                        'Target_sparc.cc'],
102              cflags = ['-O2', '-g'],
103              cxxflags = ['-std=c++11', '-O2', '-g'],
104              includes = ['.'] + rtl_includes)
105
106    bld.program(target = 'trace-converter',
107                source = ['TraceConverter.cc',
108                          'TraceList.cc',
109                          'TraceReaderBase.cc',
110                          'TraceReaderLogQEMU.cc',
111                          'TraceWriterBase.cc',
112                          'TraceWriterQEMU.cc'],
113                use = ['ccovoar','RLD'],
114                cflags = ['-O2', '-g'],
115                includes = ['.'] + rtl_includes)
116
117    bld.program(target = 'covoar',
118                source = ['covoar.cc'],
119                use = ['ccovoar','RLD'],
120                cflags = ['-O2', '-g'],
121                includes = ['.'] + rtl_includes)
Note: See TracBrowser for help on using the repository browser.