From 5c411dcfae7a18946effb745fedbe6dce13327ef Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 24 Sep 2009 17:28:55 +0200 Subject: [PATCH] wscript: add --with-target-platform option for cross-compiling, change name from aubio-2.dll to libaubio-2.dll --- wscript | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wscript b/wscript index 9eff5cad..90b508b5 100644 --- 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 @@ def set_options(opt): 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') @@ -40,6 +44,12 @@ def configure(conf): 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') conf.check(header_name='stdio.h') -- 2.26.2