wscript: add /MD and /D_CRT_SECURE_NO_WARNINGS on windows
[aubio.git] / wscript
diff --git a/wscript b/wscript
index f4eb8fe..e91ea27 100644 (file)
--- a/wscript
+++ b/wscript
@@ -116,10 +116,11 @@ def configure(ctx):
         target_platform = ctx.options.target_platform
     ctx.env['DEST_OS'] = target_platform
 
-    if 'CL.exe' not in ctx.env.CC[0]:
+    if ctx.env.CC_NAME != 'msvc':
         ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra']
     else:
-        ctx.env.CFLAGS += ['/W4']
+        ctx.env.CFLAGS += ['/W4', '/MD']
+        ctx.env.CFLAGS += ['/D_CRT_SECURE_NO_WARNINGS']
 
     ctx.check_cc(lib='m', uselib_store='M', mandatory=False)
 
@@ -376,11 +377,15 @@ def dist(ctx):
     ctx.excl  = ' **/.waf-1* **/*~ **/*.pyc **/*.swp **/.lock-w* **/.git*'
     ctx.excl += ' **/build/*'
     ctx.excl += ' **/python/gen **/python/build **/python/dist'
+    ctx.excl += ' **/python/ext/config.h'
     ctx.excl += ' **/**.zip **/**.tar.bz2'
     ctx.excl += ' **/doc/full/* **/doc/web/*'
     ctx.excl += ' **/python/*.db'
     ctx.excl += ' **/python.old/*'
+    ctx.excl += ' **/python/*/*.old'
     ctx.excl += ' **/python/tests/sounds'
     ctx.excl += ' **/**.asc'
     ctx.excl += ' **/.DS_Store'
     ctx.excl += ' **/.travis.yml'
+    ctx.excl += ' **/dist*'
+    ctx.excl += ' **/appveyor.yml'