source: rtems-tools/linkers/wscript @ 5025439

4.104.11
Last change on this file since 5025439 was 5025439, checked in by Chris Johns <chrisj@…>, on Sep 21, 2014 at 4:24:37 AM

rtems-tld: Add config options, fix void args, and SCore traces.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1#
2# RTEMS Linker build script.
3#
4import sys
5
6version_major = 1
7version_minor = 0
8version_revision = 0
9
10def options(opt):
11    opt.load("g++")
12    opt.load("gcc")
13
14def configure(conf):
15    conf.load("g++")
16    conf.load("gcc")
17
18    conf.env.C_OPTS = conf.options.c_opts.split(',')
19    conf.env.RTEMS_VERSION = conf.options.rtems_version
20    conf.write_config_header('config.h')
21
22def build(bld):
23    #
24    # Build the doxygen documentation.
25    #
26    if bld.cmd == 'doxy':
27        bld(features = 'doxygen',
28            doxyfile = 'rtl-host.conf')
29        return
30
31    #
32    # The local configuration.
33    #
34    conf = {}
35
36    #
37    # Build flags.
38    #
39    rtemstoolkit = '../rtemstoolkit'
40    conf['includes'] = [rtemstoolkit,
41                        rtemstoolkit + '/elftoolchain/libelf',
42                        rtemstoolkit + '/elftoolchain/common',
43                        rtemstoolkit + '/libiberty']
44    conf['warningflags'] = ['-Wall', '-Wextra', '-pedantic']
45    conf['optflags'] = bld.env.C_OPTS
46    conf['cflags'] = ['-pipe', '-g'] + conf['optflags']
47    conf['cxxflags'] = ['-pipe', '-g'] + conf['optflags']
48    conf['linkflags'] = ['-g']
49
50    #
51    # The list of modules.
52    #
53    modules = ['rld', 'elf', 'iberty']
54
55    #
56    # Build the linker.
57    #
58    bld.program(target = 'rtems-ld',
59                source = ['rtems-ld.cpp'],
60                defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
61                includes = ['.'] + conf['includes'],
62                cflags = conf['cflags'] + conf['warningflags'],
63                cxxflags = conf['cxxflags'] + conf['warningflags'],
64                linkflags = conf['linkflags'],
65                use = modules)
66
67    #
68    # Build the ra linker.
69    #
70    bld.program(target = 'rtems-ra',
71                source = ['rtems-ra.cpp'],
72                defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
73                includes = ['.'] + conf['includes'],
74                cflags = conf['cflags'] + conf['warningflags'],
75                cxxflags = conf['cxxflags'] + conf['warningflags'],
76                linkflags = conf['linkflags'],
77                use = modules)
78
79    #
80    # Build the trace linker.
81    #
82    bld.program(target = 'rtems-tld',
83                source = ['rtems-tld.cpp'],
84                defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
85                includes = ['.'] + conf['includes'],
86                cflags = conf['cflags'] + conf['warningflags'],
87                cxxflags = conf['cxxflags'] + conf['warningflags'],
88                linkflags = conf['linkflags'],
89                use = modules)
90    bld.install_files('${PREFIX}/share/rtems/trace-linker',
91                      ['rtems.ini',
92                       'rtems-api.ini',
93                       'rtems-score.ini',
94                       'rtems-score-object.ini',
95                       'rtems-score-thread.ini',
96                       'rtems-score-heap.ini',
97                       'rtems-score-coremutex.ini',
98                       'rtld-base.ini',
99                       'rtld-print.ini'])
100
101    #
102    # Build the symbols.
103    #
104    bld.program(target = 'rtems-syms',
105                source = ['rtems-syms.cpp'],
106                defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
107                includes = ['.'] + conf['includes'],
108                cflags = conf['cflags'] + conf['warningflags'],
109                cxxflags = conf['cxxflags'] + conf['warningflags'],
110                linkflags = conf['linkflags'],
111                use = modules)
112
113    #
114    # Build the RAP utility.
115    #
116    bld.program(target = 'rtems-rap',
117                source = ['rtems-rapper.cpp'],
118                defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
119                includes = ['.'] + conf['includes'],
120                cflags = conf['cflags'] + conf['warningflags'],
121                cxxflags = conf['cxxflags'] + conf['warningflags'],
122                linkflags = conf['linkflags'],
123                use = modules)
124
125def tags(ctx):
126    ctx.exec_command('etags $(find . -name \*.[sSch])', shell = True)
Note: See TracBrowser for help on using the repository browser.