[935f5c]: trunk / src / ladspa / wscript  Maximize  Restore  History

Download this file

72 lines (66 with data), 2.5 kB

#!/usr/bin/env python
# encoding: utf-8

import sys, os, TaskGen, ctypes, wscript_helper

def configure(conf):
    pass

@TaskGen.feature('test_loadable')
def test_loadable(self):
    def link_and_test(lib=self.link_task.outputs[0].bldpath(self.env), link=self.link_task.run):
        link()
        try:
            ctypes.cdll.LoadLibrary(lib)
        except Exception as e:
            raise RuntimeError("LADSPA load test failed: %s" % e)
    self.link_task.run = link_and_test

def build(bld):
    bsources = [
        '../gx_head/engine/gx_json.cpp',
        '../gx_head/engine/gx_faust_plugins.cpp',
        '../gx_head/engine/gx_internal_plugins.cpp',
        '../gx_head/engine/gx_engine_audio.cpp',
        '../gx_head/engine/gx_paramtable.cpp',
        '../gx_head/engine/gx_convolver.cpp',
        '../gx_head/engine/gx_resampler.cpp',
        '../gx_head/engine/gx_system.cpp',
        '../gx_head/engine/gx_logging.cpp',
        '../gx_head/engine/gx_pluginloader.cpp',
        ## lib can't be used (-fPIC)
        '../plugins/zita_rev1.cc',
        '../plugins/vibe.cc',
        '../plugins/abgate.cc',
        '../plugins/ts9sim.cc',
        '../plugins/flanger_gx.cc',
        '../plugins/mbc.cc',
        '../plugins/mbcs.cc',
        '../plugins/mbd.cc',
        '../plugins/mbe.cc',
        '../plugins/mbdel.cc',
        '../plugins/mbchor.cc',
        '../plugins/reversedelay.cc',
        #'../plugins/dubbe.cc',
        ]
    
    src = ['ladspa_guitarix.cpp'] + bsources
    incl = ['../headers', '..','../gx_head/engine','../plugins','../../libgxwmm','../../libgxw']
    lib = []
    if sys.platform.startswith("linux"):
        lib.append('dl')
    uselib = ['JACK', 'SNDFILE', 'GTHREAD', 'GMODULE_EXPORT',
              'GLIBMM', 'GIOMM', 'FFTW3', 'BOOST_SYSTEM', 'LILV']
    wscript_helper.add_zita_convolver(bld, uselib, src, incl)
    wscript_helper.add_zita_resampler(bld, uselib, src, incl)
    ladspa_plugin = bld(
        #features='cxx cprogram',  ## for debugging
        features='cxx cshlib test_loadable',
        includes = incl,
        lib = lib,
        uselib = uselib,
        #uselib_local = ["plugins"], ## needs -fPIC
        cxxflags = ["-fvisibility=hidden"],
        defines = ["LADSPA_SO"],
        target   = 'ladspa_guitarix',
        source   = src,
        install_path = '${LADSPADIR}',
        chmod = 0o755,
        )
    ladspa_plugin.env['shlib_PATTERN'] = '%s.so'
    bld.install_files('${SHAREDIR}/ladspa/rdf', 'guitarix_amp.rdf')

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks