From 993ed5670175870c5b5930860e82db0efe158820 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 25 Feb 2014 05:37:55 +0100 Subject: prepare standalone VST scanner tool.. part one --- libs/fst/wscript | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 libs/fst/wscript (limited to 'libs/fst/wscript') diff --git a/libs/fst/wscript b/libs/fst/wscript new file mode 100644 index 0000000000..4f4de4e2ff --- /dev/null +++ b/libs/fst/wscript @@ -0,0 +1,75 @@ +#!/usr/bin/env python +from waflib.extras import autowaf as autowaf +from waflib import Options, TaskGen +import waflib.Logs as Logs, waflib.Utils as Utils +import os +import shutil +import sys +import re +import time +from waflib.Task import Task + +# Mandatory variables +top = '.' +out = 'build' + +scanner_app_src = [ + 'scanner.cc', + ] + +# needed for code used from libardour +I18N_PACKAGE = 'ardour3' + +def options(opt): + autowaf.set_options(opt) + +def configure(conf): + conf.load('misc') + conf.load('compiler_cxx') + autowaf.configure(conf) + +# Add a waf `feature' to allow compilation of things using winegcc +from waflib.TaskGen import feature +@feature("wine") +def set_winegcc(self): + self.env.LINK_CXX = self.env.LINK_CC = 'wineg++' + self.env.CC = 'winegcc' + +def build(bld): + VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR']) + if not (bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT')): + return + + if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': + # wine exec wrapper script + obj = bld(features = 'subst', rule= 'chmod 0755 ${TGT}') + obj.source = 'scanner.wine' + obj.target = 'ardour-' + bld.env['VERSION'] + '-vst-scanner' + obj.chmod = Utils.O755 + obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') + obj.dict = { + 'VERSION' : bld.env['VERSION'], + } + + obj = bld (features = 'c cxx cxxprogram wine') + obj.source = ( + 'scanner.cc', + 'fst.c', + 'vstwin.c', + ) + obj.target = 'ardour-' + bld.env['VERSION'] + '-vst-scanner.exe.so' + obj.linkflags = ['-mwindows', '-Wl,--export-dynamic'] + else: + obj = bld (features = 'cxx c cxxprogram') + obj.source = ( 'scanner.cc' ) + obj.target = 'ardour-' + bld.env['VERSION'] + '-vst-scanner' + + obj.includes = [ '../pbd/', '../ardour/', '.' ] + obj.defines = [ + '_POSIX_SOURCE', + 'USE_WS_PREFIX', + 'VST_SCANNER_APP', + 'PACKAGE="' + I18N_PACKAGE + '"', + ] + obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') + obj.uselib = ['GIOMM', 'DL'] -- cgit v1.2.3