ref: 58cffeec70021b242c0a7d5e92371b5671ffc9c8
parent: 0806cd228d22f17add86b680b888c7f0a89a6837
author: Paul Brossier <piem@piem.org>
date: Fri Apr 22 20:12:06 EDT 2016
tests/wscript_build, src/wscript_build: no -lm on win32/64
--- a/src/wscript_build
+++ b/src/wscript_build
@@ -12,11 +12,12 @@
# build each source files
source = ctx.path.ant_glob('*.c **/*.c')
+lib = 'm' if ctx.env['DEST_OS'] not in ['win32', 'win64'] else None
ctx(features = 'c',
source = source,
includes = ['.'],
uselib = uselib,
- lib = 'm',
+ lib = lib,
target = 'lib_objects')
# build libaubio.so (cshlib) and/or libaubio.a (cstlib)
--- a/tests/wscript_build
+++ b/tests/wscript_build
@@ -1,21 +1,24 @@
# vim:set syntax=python:
+lib = 'm' if ctx.env['DEST_OS'] not in ['win32', 'win64'] else None
+
+uselib = []
+uselib += ['FFTW3', 'FFTW3F']
+uselib += ['SAMPLERATE']
+uselib += ['SNDFILE']
+uselib += ['AVCODEC']
+uselib += ['AVFORMAT']
+uselib += ['AVRESAMPLE']
+uselib += ['AVUTIL']
+uselib += ['JACK']
+uselib += ['BLAS']
+
+includes = ['../src', '.']
+
for target_name in ctx.path.ant_glob('src/**/*.c'):
- uselib = []
- uselib += ['FFTW3', 'FFTW3F']
- uselib += ['SAMPLERATE']
- uselib += ['SNDFILE']
- uselib += ['AVCODEC']
- uselib += ['AVFORMAT']
- uselib += ['AVRESAMPLE']
- uselib += ['AVUTIL']
- uselib += ['JACK']
- uselib += ['BLAS']
- includes = ['../src', '.']
extra_source = []
-
bld(features = 'c cprogram test',
- lib = 'm',
+ lib = lib,
uselib = uselib,
source = [target_name] + extra_source,
target = str(target_name).split('.')[0],