shithub: aubio

Download patch

ref: 5c411dcfae7a18946effb745fedbe6dce13327ef
parent: 26ac356f067cd2d6467ab122d8b6fa3276f74e68
author: Paul Brossier <piem@piem.org>
date: Thu Sep 24 13:28:55 EDT 2009

wscript: add --with-target-platform option for cross-compiling, change name from aubio-2.dll to libaubio-2.dll

--- a/wscript
+++ b/wscript
@@ -1,3 +1,5 @@
+#! /usr/bin/python
+# 
 # TODO
 #  - plugins/puredata: add pd compilation
 #  - java: add swig compilation
@@ -28,6 +30,8 @@
       help='compile without lash support')
   opt.add_option('--enable-java', action='store_true', default=False,
       help='compile with java support')
+  opt.add_option('--with-target-platform', type='string',
+      help='set target platform for cross-compilation', dest='target_platform')
   opt.tool_options('compiler_cc')
   opt.tool_options('compiler_cxx')
   opt.tool_options('gnu_dirs')
@@ -39,6 +43,12 @@
   conf.check_tool('compiler_cxx')
   conf.check_tool('gnu_dirs') # helpful for autotools transition and .pc generation
   conf.check_tool('misc') # needed for subst
+
+  if Options.options.target_platform:
+    Options.platform = Options.options.target_platform
+
+  if Options.platform == 'win32':
+    conf.env['shlib_PATTERN'] = 'lib%s.dll'
 
   # check for required headers
   conf.check(header_name='stdlib.h')