View | Details | Raw Unified | Return to bug 1327
Collapse All | Expand All

(-)a/src/config-store/wscript (-1 / +3 lines)
 Lines 1-5    Link Here 
1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
2
3
import wutils
4
3
def configure(conf):
5
def configure(conf):
4
    have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False)
6
    have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False)
5
    conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk
7
    conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk
 Lines 18-24    Link Here 
18
20
19
21
20
def build(bld):
22
def build(bld):
21
    bld.install_files('${PREFIX}/include/ns3', '../../ns3/config-store-config.h')
23
    bld.install_files('${INCLUDEDIR}/%s%s/ns3' % (wutils.APPNAME, wutils.VERSION), '../../ns3/config-store-config.h')
22
24
23
    module = bld.create_ns3_module('config-store', ['core', 'network'])
25
    module = bld.create_ns3_module('config-store', ['core', 'network'])
24
    module.source = [
26
    module.source = [
(-)a/src/core/wscript (-1 / +3 lines)
 Lines 3-8    Link Here 
3
3
4
import Options
4
import Options
5
5
6
import wutils
7
6
def options(opt):
8
def options(opt):
7
    opt.add_option('--int64x64-as-double',
9
    opt.add_option('--int64x64-as-double',
8
                   help=('Whether to use a double floating point'
10
                   help=('Whether to use a double floating point'
 Lines 94-100    Link Here 
94
    conf.write_config_header('ns3/core-config.h', top=True)
96
    conf.write_config_header('ns3/core-config.h', top=True)
95
97
96
def build(bld):
98
def build(bld):
97
    bld.install_files('${PREFIX}/include/ns3', '../../ns3/core-config.h')
99
    bld.install_files('${INCLUDEDIR}/%s%s/ns3' % (wutils.APPNAME, wutils.VERSION), '../../ns3/core-config.h')
98
100
99
    core = bld.create_ns3_module('core')
101
    core = bld.create_ns3_module('core')
100
    core.source = [
102
    core.source = [
(-)a/src/netanim/wscript (-1 / +3 lines)
 Lines 1-7    Link Here 
1
## -*-Mode : python; py-indent-offset : 4; indent-tabs-mode : nil; coding : utf-8; -*-
1
## -*-Mode : python; py-indent-offset : 4; indent-tabs-mode : nil; coding : utf-8; -*-
2
2
3
import wutils
4
3
def build (bld) :
5
def build (bld) :
4
        bld.install_files('${PREFIX}/include/ns3', '../../ns3/netanim-config.h')
6
        bld.install_files('${INCLUDEDIR}/%s%s/ns3' % (wutils.APPNAME, wutils.VERSION), '../../ns3/netanim-config.h')
5
	module = bld.create_ns3_module ('netanim', ['internet', 'mobility', 'wimax', 'wifi', 'csma'])
7
	module = bld.create_ns3_module ('netanim', ['internet', 'mobility', 'wimax', 'wifi', 'csma'])
6
	module.includes = '.'
8
	module.includes = '.'
7
	module.source = [
9
	module.source = [
(-)a/src/wscript (-8 / +10 lines)
 Lines 79-85    Link Here 
79
        module = bld.new_task_gen(features=['cxx', 'cxxstlib', 'ns3module'])
79
        module = bld.new_task_gen(features=['cxx', 'cxxstlib', 'ns3module'])
80
    else:
80
    else:
81
        module = bld.new_task_gen(features=['cxx', 'cxxshlib', 'ns3module'])
81
        module = bld.new_task_gen(features=['cxx', 'cxxshlib', 'ns3module'])
82
    module.target = '%s/ns3-%s' % (bld.srcnode.relpath_gen(module.path), name)
82
    module.target = '%s/ns%s-%s-%s' % (bld.srcnode.relpath_gen(module.path), wutils.VERSION,
83
                                       name, bld.env['BUILD_PROFILE'])
83
    linkflags = []
84
    linkflags = []
84
    cxxflags = []
85
    cxxflags = []
85
    ccflags = []
86
    ccflags = []
 Lines 123-130    Link Here 
123
124
124
    module.env.append_value("INCLUDES", '#')
125
    module.env.append_value("INCLUDES", '#')
125
126
126
    pcfilegen = bld(features='ns3pcfile')
127
    module.pcfilegen = bld(features='ns3pcfile')
127
    pcfilegen.module = module
128
    module.pcfilegen.module = module
128
    
129
    
129
    return module
130
    return module
130
131
 Lines 372-378    Link Here 
372
    def _generate_pcfile(self, name, use, env, outfilename):
373
    def _generate_pcfile(self, name, use, env, outfilename):
373
        outfile = open(outfilename, 'wt')
374
        outfile = open(outfilename, 'wt')
374
        prefix = env.PREFIX
375
        prefix = env.PREFIX
375
        includedir = env.INCLUDEDIR
376
        includedir = Utils.subst_vars('${INCLUDEDIR}/%s%s' % (wutils.APPNAME, wutils.VERSION), env)
376
        libdir = env.LIBDIR
377
        libdir = env.LIBDIR
377
        libs = self._self_libs(env, name, '${libdir}')
378
        libs = self._self_libs(env, name, '${libdir}')
378
        for dep in use:
379
        for dep in use:
 Lines 385-391    Link Here 
385
            cflags = cflags + self._cflags(dep) + self._cxxflags(dep) + \
386
            cflags = cflags + self._cflags(dep) + self._cxxflags(dep) + \
386
                self._defines(dep) + self._includes(dep)
387
                self._defines(dep) + self._includes(dep)
387
            if dep.startswith('ns3-'):
388
            if dep.startswith('ns3-'):
388
                requires.append("lib"+dep)
389
                dep_name = dep[4:]
390
                requires.append("libns%s-%s-%s" % (wutils.VERSION, dep_name, env['BUILD_PROFILE']))
389
        print >> outfile, """\
391
        print >> outfile, """\
390
prefix=%s
392
prefix=%s
391
libdir=%s
393
libdir=%s
 Lines 411-417    Link Here 
411
@TaskGen.feature('ns3pcfile')
413
@TaskGen.feature('ns3pcfile')
412
@TaskGen.after_method('process_rule')
414
@TaskGen.after_method('process_rule')
413
def apply(self):
415
def apply(self):
414
    output_filename = 'lib%s.pc' % self.module.name
416
    output_filename = 'lib%s.pc' % os.path.basename(self.module.target)
415
    output_node = self.path.find_or_declare(output_filename)
417
    output_node = self.path.find_or_declare(output_filename)
416
    assert output_node is not None, str(self)
418
    assert output_node is not None, str(self)
417
    task = self.create_task('ns3pcfile')
419
    task = self.create_task('ns3pcfile')
 Lines 436-442    Link Here 
436
        task = self.create_task('ns3header')
438
        task = self.create_task('ns3header')
437
        task.mode = getattr(self, 'mode', 'install')
439
        task.mode = getattr(self, 'mode', 'install')
438
        if task.mode == 'install':
440
        if task.mode == 'install':
439
            self.bld.install_files('${PREFIX}/include/ns3', [src_node])
441
            self.bld.install_files('${INCLUDEDIR}/%s%s/ns3' % (wutils.APPNAME, wutils.VERSION), [src_node])
440
            task.set_inputs([src_node])
442
            task.set_inputs([src_node])
441
            task.set_outputs([dst_node])
443
            task.set_outputs([dst_node])
442
        else:
444
        else:
 Lines 630-636    Link Here 
630
    task.mode = getattr(self, "mode", "install")
632
    task.mode = getattr(self, "mode", "install")
631
    if task.mode == 'install':
633
    if task.mode == 'install':
632
        assert module_obj is not None, self.module
634
        assert module_obj is not None, self.module
633
        self.bld.install_files('${PREFIX}/include/ns3', 
635
        self.bld.install_files('${INCLUDEDIR}/%s%s/ns3' % (wutils.APPNAME, wutils.VERSION),
634
                               ns3_dir_node.find_or_declare("%s-module.h" % self.module))
636
                               ns3_dir_node.find_or_declare("%s-module.h" % self.module))
635
        task.set_inputs(all_headers_inputs)
637
        task.set_inputs(all_headers_inputs)
636
        task.set_outputs(all_headers_outputs)
638
        task.set_outputs(all_headers_outputs)
(-)a/wscript (-2 / +5 lines)
 Lines 320-325    Link Here 
320
        env.append_value('DEFINES', 'NS3_LOG_ENABLE')
320
        env.append_value('DEFINES', 'NS3_LOG_ENABLE')
321
321
322
    env['PLATFORM'] = sys.platform
322
    env['PLATFORM'] = sys.platform
323
    env['BUILD_PROFILE'] = Options.options.build_profile
323
324
324
    if conf.env['CXX_NAME'] in ['gcc', 'icc']:
325
    if conf.env['CXX_NAME'] in ['gcc', 'icc']:
325
        if Options.options.build_profile == 'release': 
326
        if Options.options.build_profile == 'release': 
 Lines 570-576    Link Here 
570
    program.is_ns3_program = True
571
    program.is_ns3_program = True
571
    program.module_deps = list()
572
    program.module_deps = list()
572
    program.name = name
573
    program.name = name
573
    program.target = name
574
    program.target = "%s%s-%s-%s" % (wutils.APPNAME, wutils.VERSION, name, bld.env.BUILD_PROFILE)
574
575
575
    if bld.env['ENABLE_SUDO']:
576
    if bld.env['ENABLE_SUDO']:
576
        program.create_task("SuidBuild")
577
        program.create_task("SuidBuild")
 Lines 584-590    Link Here 
584
585
585
    program.is_ns3_program = True
586
    program.is_ns3_program = True
586
    program.name = name
587
    program.name = name
587
    program.target = program.name
588
    program.target = "%s%s-%s-%s" % (wutils.APPNAME, wutils.VERSION, name, bld.env.BUILD_PROFILE)
588
    # Each of the modules this program depends on has its own library.
589
    # Each of the modules this program depends on has its own library.
589
    program.ns3_module_dependencies = ['ns3-'+dep for dep in dependencies]
590
    program.ns3_module_dependencies = ['ns3-'+dep for dep in dependencies]
590
    program.includes = "# #/.."
591
    program.includes = "# #/.."
 Lines 628-633    Link Here 
628
            obj.find_sources_in_dirs('.')
629
            obj.find_sources_in_dirs('.')
629
            obj.target = filename
630
            obj.target = filename
630
            obj.name = obj.target
631
            obj.name = obj.target
632
            obj.install_path = None
631
        elif filename.endswith(".cc"):
633
        elif filename.endswith(".cc"):
632
            name = filename[:-len(".cc")]
634
            name = filename[:-len(".cc")]
633
            obj = bld.create_ns3_program(name, all_modules)
635
            obj = bld.create_ns3_program(name, all_modules)
 Lines 635-640    Link Here 
635
            obj.source = filename
637
            obj.source = filename
636
            obj.target = name
638
            obj.target = name
637
            obj.name = obj.target
639
            obj.name = obj.target
640
            obj.install_path = None
638
641
639
642
640
def _get_all_task_gen(self):
643
def _get_all_task_gen(self):

Return to bug 1327