fix to update wscript

pull/9/head
bebopagogo 2020-02-29 17:07:06 -05:00
parent 711024bf07
commit 273528586d
2 changed files with 13 additions and 10 deletions

@ -1 +1 @@
Subproject commit b3294d87cb5f5007b61040098fd7135f83775e17 Subproject commit fc8273aaa997535d7eaaca335689170e6e2a1ec3

21
wscript
View File

@ -52,8 +52,8 @@ def configure(ctx):
ctx.recurse('protolib') ctx.recurse('protolib')
# Use this USE variable to add flags to NORM's compilation # Use this USE variable to add flags to NORM's compilation
ctx.env.USE_BUILD_NORM += ['BUILD_NORM', 'protokit'] ctx.env.USE_BUILD_NORM += ['BUILD_NORM']
if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'): if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'):
ctx.env.DEFINES_BUILD_NORM += ['ECN_SUPPORT'] ctx.env.DEFINES_BUILD_NORM += ['ECN_SUPPORT']
@ -76,11 +76,11 @@ def build(ctx):
ctx.install_files("${PREFIX}/include/", "include/normApi.h") ctx.install_files("${PREFIX}/include/", "include/normApi.h")
obj = ctx.objects( obj = ctx.objects(
target = 'objs', target = 'norm_objs',
includes = ['include'], includes = ['include'],
export_includes = ['include'], export_includes = ['include'],
use = ctx.env.USE_BUILD_NORM, use = ctx.env.USE_BUILD_NORM + ['protolib_st'],
stlib = ["protokit"], #stlib = ["protokit"],
source = ['src/common/{0}.cpp'.format(x) for x in [ source = ['src/common/{0}.cpp'.format(x) for x in [
'galois', 'galois',
'normApi', 'normApi',
@ -97,7 +97,7 @@ def build(ctx):
]], ]],
) )
# Use static lib for Unix examples for convenience # Use static lib for Unix examples for convenience
# (so we don't have to worry about LD_LIBRARY_PATH) # (so we don't have to worry about LD_LIBRARY_PATH)
ctx.shlib( ctx.shlib(
target = 'norm', target = 'norm',
@ -106,12 +106,12 @@ def build(ctx):
export_includes = ['include'], export_includes = ['include'],
vnum = VERSION, vnum = VERSION,
stlib = ["protokit"], stlib = ["protokit"],
use = ['objs'] + ctx.env.USE_BUILD_NORM, use = ['norm_objs'],
source = [], source = [],
features = 'cxx cxxshlib', features = 'cxx cxxshlib',
install_path = '${LIBDIR}', install_path = '${LIBDIR}',
) )
ctx.stlib( ctx.stlib(
target = 'norm', target = 'norm',
name = 'norm_stlib', name = 'norm_stlib',
@ -119,11 +119,12 @@ def build(ctx):
export_includes = ['include'], export_includes = ['include'],
vnum = VERSION, vnum = VERSION,
stlib = ["protokit"], stlib = ["protokit"],
use = ['objs'] + ctx.env.USE_BUILD_NORM, use = ['norm_objs'],
source = [], source = [],
features = 'cxx cxxstlib', features = 'cxx cxxstlib',
install_path = '${LIBDIR}', install_path = '${LIBDIR}',
) )
if ctx.env.BUILD_PYTHON: if ctx.env.BUILD_PYTHON:
ctx( ctx(
@ -219,12 +220,14 @@ def build(ctx):
# Generate pkg-config file # Generate pkg-config file
# Add additional static compilation dependencies based on the system. # Add additional static compilation dependencies based on the system.
# libpcap is used by protolib on GNU/Hurd based systems. # libpcap is used by protolib on GNU/Hurd based systems.
'''
static_libs = '' static_libs = ''
if ctx.options.enable_static_library: if ctx.options.enable_static_library:
static_libs += ' -lstdc++ -lprotokit' static_libs += ' -lstdc++ -lprotokit'
if system == "gnu": if system == "gnu":
static_libs += ' -lpcap' static_libs += ' -lpcap'
ctx(source='norm.pc.in', STATIC_LIBS = static_libs) ctx(source='norm.pc.in', STATIC_LIBS = static_libs)
'''
def _make_simple_example(ctx, name, path='examples'): def _make_simple_example(ctx, name, path='examples'):