wscript tweak

pull/9/head
bebopagogo 2020-02-29 15:10:33 -05:00
parent 614254abcb
commit 2cbb93d53c
4 changed files with 17 additions and 17 deletions

2
.gitignore vendored
View File

@ -1,5 +1,3 @@
# protolib source tree
protolib/
# build executables # build executables
build/ build/

@ -1 +1 @@
Subproject commit 6e0840332b2fab4adef33ca817d0cc1a2bc7dadd Subproject commit b3294d87cb5f5007b61040098fd7135f83775e17

16
waf vendored

File diff suppressed because one or more lines are too long

14
wscript
View File

@ -52,7 +52,7 @@ 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', 'protolib'] ctx.env.USE_BUILD_NORM += ['BUILD_NORM', 'protokit']
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']
@ -63,6 +63,8 @@ def configure(ctx):
if ctx.env.COMPILER_CXX == 'g++' or ctx.env.COMPILER_CXX == 'clang++': if ctx.env.COMPILER_CXX == 'g++' or ctx.env.COMPILER_CXX == 'clang++':
ctx.env.CFLAGS += ['-fvisibility=hidden', '-Wno-attributes'] ctx.env.CFLAGS += ['-fvisibility=hidden', '-Wno-attributes']
ctx.env.CXXFLAGS += ['-fvisibility=hidden', '-Wno-attributes'] ctx.env.CXXFLAGS += ['-fvisibility=hidden', '-Wno-attributes']
#if 'darwin' == system:
# ctx.env.LINKFLAGS += ['-L/opt/local/lib']
# Will be used by the pkg-config generator # Will be used by the pkg-config generator
ctx.env.VERSION = VERSION ctx.env.VERSION = VERSION
@ -78,7 +80,7 @@ def build(ctx):
includes = ['include'], includes = ['include'],
export_includes = ['include'], export_includes = ['include'],
use = ctx.env.USE_BUILD_NORM, use = ctx.env.USE_BUILD_NORM,
stlib = ["protolib"], 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',
@ -103,7 +105,7 @@ def build(ctx):
includes = ['include'], includes = ['include'],
export_includes = ['include'], export_includes = ['include'],
vnum = VERSION, vnum = VERSION,
stlib = ["protolib"], stlib = ["protokit"],
use = ['objs'] + ctx.env.USE_BUILD_NORM, use = ['objs'] + ctx.env.USE_BUILD_NORM,
source = [], source = [],
features = 'cxx cxxshlib', features = 'cxx cxxshlib',
@ -116,7 +118,7 @@ def build(ctx):
includes = ['include'], includes = ['include'],
export_includes = ['include'], export_includes = ['include'],
vnum = VERSION, vnum = VERSION,
stlib = ["protolib"], stlib = ["protokit"],
use = ['objs'] + ctx.env.USE_BUILD_NORM, use = ['objs'] + ctx.env.USE_BUILD_NORM,
source = [], source = [],
features = 'cxx cxxstlib', features = 'cxx cxxstlib',
@ -163,7 +165,7 @@ def build(ctx):
name = 'normapp', name = 'normapp',
target = 'normapp', target = 'normapp',
includes = ['include'], includes = ['include'],
use = ['protolib', 'norm_stlib'], use = ['protokit', 'norm_stlib'],
defines = [], defines = [],
source = ['src/common/{0}.cpp'.format(x) for x in [ source = ['src/common/{0}.cpp'.format(x) for x in [
'normPostProcess', 'normPostProcess',
@ -219,7 +221,7 @@ def build(ctx):
# 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++ -lprotolib' 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)