|
|
| 194 |
help=('Compile NS-3 statically: works only on linux, without python'), |
194 |
help=('Compile NS-3 statically: works only on linux, without python'), |
| 195 |
dest='enable_static', action='store_true', |
195 |
dest='enable_static', action='store_true', |
| 196 |
default=False) |
196 |
default=False) |
|
|
197 |
opt.add_option('--enable-strip', |
| 198 |
help=('Remove all symbol table and relocation information from the executable'), |
| 199 |
dest='enable_strip', action='store_true', |
| 200 |
default=False) |
| 197 |
|
201 |
|
| 198 |
# options provided in a script in a subdirectory named "src" |
202 |
# options provided in a script in a subdirectory named "src" |
| 199 |
opt.sub_options('src') |
203 |
opt.sub_options('src') |
|
|
| 324 |
|
328 |
|
| 325 |
conf.report_optional_feature("ENABLE_SUDO", "Use sudo to set suid bit", env['ENABLE_SUDO'], why_not_sudo) |
329 |
conf.report_optional_feature("ENABLE_SUDO", "Use sudo to set suid bit", env['ENABLE_SUDO'], why_not_sudo) |
| 326 |
|
330 |
|
|
|
331 |
# enable executables strip |
| 332 |
if Options.options.enable_strip: |
| 333 |
env['ENABLE_STRIP'] = True |
| 334 |
conf.report_optional_feature("strip", "Strip executables", True, '') |
| 335 |
else: |
| 336 |
env['ENABLE_STRIP'] = False |
| 337 |
conf.report_optional_feature("strip", "Strip executables", False, |
| 338 |
"option --enable-strip not selected") |
| 339 |
|
| 327 |
# we cannot pull regression traces without mercurial |
340 |
# we cannot pull regression traces without mercurial |
| 328 |
conf.find_program('hg', var='MERCURIAL') |
341 |
conf.find_program('hg', var='MERCURIAL') |
| 329 |
|
342 |
|
|
|
| 441 |
program.env.append_value('LINKFLAGS', '-Wl,--whole-archive,-Bstatic') |
454 |
program.env.append_value('LINKFLAGS', '-Wl,--whole-archive,-Bstatic') |
| 442 |
program.env.append_value('LINKFLAGS', '-lns3') |
455 |
program.env.append_value('LINKFLAGS', '-lns3') |
| 443 |
program.env.append_value('LINKFLAGS', '-Wl,-Bdynamic,--no-whole-archive') |
456 |
program.env.append_value('LINKFLAGS', '-Wl,-Bdynamic,--no-whole-archive') |
|
|
457 |
if program.env['ENABLE_STRIP']: |
| 458 |
program.env.append_value('LINKFLAGS', '-s') |
| 444 |
return program |
459 |
return program |
| 445 |
|
460 |
|
| 446 |
def add_scratch_programs(bld): |
461 |
def add_scratch_programs(bld): |