tests/wscript_build, src/wscript_build: no -lm on win32/64
authorPaul Brossier <piem@piem.org>
Fri, 22 Apr 2016 22:12:06 +0000 (00:12 +0200)
committerPaul Brossier <piem@piem.org>
Fri, 22 Apr 2016 22:12:06 +0000 (00:12 +0200)
src/wscript_build
tests/wscript_build

index 5a918aa..d424904 100644 (file)
@@ -12,11 +12,12 @@ uselib += ['BLAS']
 
 # 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)
index 55dcbf2..379c5cf 100644 (file)
@@ -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],