updated waf wscript with hack for getting clang to link to static libnorm.a where desired
parent
1c3283fd3b
commit
269320f4f1
13
wscript
13
wscript
|
|
@ -19,7 +19,6 @@ To build examples, use the --target directive. For example:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
import waflib
|
import waflib
|
||||||
|
|
||||||
# Fetch VERSION from include/normVersion.h file
|
# Fetch VERSION from include/normVersion.h file
|
||||||
|
|
@ -74,7 +73,7 @@ def build(ctx):
|
||||||
# Setup to install NORM header file
|
# Setup to install NORM header file
|
||||||
ctx.install_files("${PREFIX}/include/", "include/normApi.h")
|
ctx.install_files("${PREFIX}/include/", "include/normApi.h")
|
||||||
|
|
||||||
ctx.objects(
|
obj = ctx.objects(
|
||||||
target = 'objs',
|
target = 'objs',
|
||||||
includes = ['include'],
|
includes = ['include'],
|
||||||
export_includes = ['include'],
|
export_includes = ['include'],
|
||||||
|
|
@ -108,6 +107,7 @@ def build(ctx):
|
||||||
use = ['objs'] + ctx.env.USE_BUILD_NORM,
|
use = ['objs'] + ctx.env.USE_BUILD_NORM,
|
||||||
source = [],
|
source = [],
|
||||||
features = 'cxx cxxshlib',
|
features = 'cxx cxxshlib',
|
||||||
|
install_path = '${LIBDIR}',
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx.stlib(
|
ctx.stlib(
|
||||||
|
|
@ -173,6 +173,10 @@ def build(ctx):
|
||||||
posted = True,
|
posted = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Hack to force clang to link static libnorm.a
|
||||||
|
if ctx.env.COMPILER_CXX == 'clang++':
|
||||||
|
normapp.linkflags ='libnorm.a'
|
||||||
|
|
||||||
if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'):
|
if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'):
|
||||||
normapp.source.append('src/unix/unixPostProcess.cpp')
|
normapp.source.append('src/unix/unixPostProcess.cpp')
|
||||||
|
|
||||||
|
|
@ -219,6 +223,7 @@ def build(ctx):
|
||||||
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'):
|
||||||
'''Makes a task from a single source file in the examples directory.
|
'''Makes a task from a single source file in the examples directory.
|
||||||
|
|
||||||
|
|
@ -244,3 +249,7 @@ def _make_simple_example(ctx, name, path='examples'):
|
||||||
else:
|
else:
|
||||||
example.use.append('norm_stlib')
|
example.use.append('norm_stlib')
|
||||||
|
|
||||||
|
# Hack to force clang to link static libnorm.a
|
||||||
|
if ctx.env.COMPILER_CXX == 'clang++':
|
||||||
|
example.linkflags ='libnorm.a'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue