diff options
-rw-r--r-- | src/client/wscript | 25 | ||||
-rw-r--r-- | src/engine/wscript | 73 | ||||
-rw-r--r-- | src/gui/wscript | 70 | ||||
-rw-r--r-- | wscript | 84 |
4 files changed, 125 insertions, 127 deletions
diff --git a/src/client/wscript b/src/client/wscript index a04a02e..0181745 100644 --- a/src/client/wscript +++ b/src/client/wscript @@ -2,17 +2,16 @@ from waflib.extras import autowaf as autowaf def build(bld): - obj = bld(features = 'cxx cxxshlib') - obj.source = ''' - ClientModel.cpp - ClientObject.cpp - ''' - obj.export_includes = ['.'] - obj.includes = ['.', '..', '../..'] - obj.name = 'libmachina_client' - obj.target = 'machina_client' - obj.use = 'libmachina_engine' - autowaf.use_lib(bld, obj, 'RAUL') - - bld.add_post_fun(autowaf.run_ldconfig) + obj = bld(features = 'cxx cxxshlib') + obj.source = ''' + ClientModel.cpp + ClientObject.cpp + ''' + obj.export_includes = ['.'] + obj.includes = ['.', '..', '../..'] + obj.name = 'libmachina_client' + obj.target = 'machina_client' + obj.use = 'libmachina_engine' + autowaf.use_lib(bld, obj, 'RAUL') + bld.add_post_fun(autowaf.run_ldconfig) diff --git a/src/engine/wscript b/src/engine/wscript index 43445a8..bacffbe 100644 --- a/src/engine/wscript +++ b/src/engine/wscript @@ -2,41 +2,40 @@ from waflib.extras import autowaf as autowaf def build(bld): - core_source = ''' - Action.cpp - ActionFactory.cpp - Controller.cpp - Edge.cpp - Engine.cpp - JackDriver.cpp - LearnRequest.cpp - Loader.cpp - Machine.cpp - MachineBuilder.cpp - MidiAction.cpp - Mutation.cpp - Node.cpp - Recorder.cpp - SMFDriver.cpp - Stateful.cpp - Updates.cpp - URIs.cpp - ''' - if bld.is_defined('HAVE_EUGENE'): - core_source += ''' - Evolver.cpp - Problem.cpp - ''' - obj = bld(features = 'cxx cxxshlib') - obj.source = core_source - obj.export_includes = ['.'] - obj.includes = ['.', '..', '../..'] - obj.name = 'libmachina_engine' - obj.target = 'machina_engine' - core_libs = 'GLIBMM GTHREAD RAUL SORD JACK' - if bld.is_defined('HAVE_EUGENE'): - core_libs += ' EUGENE ' - autowaf.use_lib(bld, obj, core_libs) - - bld.add_post_fun(autowaf.run_ldconfig) + core_source = ''' + Action.cpp + ActionFactory.cpp + Controller.cpp + Edge.cpp + Engine.cpp + JackDriver.cpp + LearnRequest.cpp + Loader.cpp + Machine.cpp + MachineBuilder.cpp + MidiAction.cpp + Mutation.cpp + Node.cpp + Recorder.cpp + SMFDriver.cpp + Stateful.cpp + Updates.cpp + URIs.cpp + ''' + if bld.is_defined('HAVE_EUGENE'): + core_source += ''' + Evolver.cpp + Problem.cpp + ''' + obj = bld(features = 'cxx cxxshlib') + obj.source = core_source + obj.export_includes = ['.'] + obj.includes = ['.', '..', '../..'] + obj.name = 'libmachina_engine' + obj.target = 'machina_engine' + core_libs = 'GLIBMM GTHREAD RAUL SORD JACK' + if bld.is_defined('HAVE_EUGENE'): + core_libs += ' EUGENE ' + autowaf.use_lib(bld, obj, core_libs) + bld.add_post_fun(autowaf.run_ldconfig) diff --git a/src/gui/wscript b/src/gui/wscript index 930a0e0..089a70b 100644 --- a/src/gui/wscript +++ b/src/gui/wscript @@ -2,41 +2,41 @@ from waflib.extras import autowaf as autowaf def build(bld): - obj = bld(features = 'cxx cxxshlib') - obj.source = ''' - EdgeView.cpp - MachinaCanvas.cpp - MachinaGUI.cpp - NodePropertiesWindow.cpp - NodeView.cpp - ''' + obj = bld(features = 'cxx cxxshlib') + obj.source = ''' + EdgeView.cpp + MachinaCanvas.cpp + MachinaGUI.cpp + NodePropertiesWindow.cpp + NodeView.cpp + ''' - obj.includes = ['.', '..', '../..', '../engine'] - obj.export_includes = ['.'] - obj.name = 'libmachina_gui' - obj.target = 'machina_gui' - obj.use = 'libmachina_engine libmachina_client' - autowaf.use_lib(bld, obj, ''' - FLOWCANVAS - GLADEMM - GLIBMM - GNOMECANVASMM - GTKMM - RAUL - SORD - SIGCPP - EUGENE - ''') + obj.includes = ['.', '..', '../..', '../engine'] + obj.export_includes = ['.'] + obj.name = 'libmachina_gui' + obj.target = 'machina_gui' + obj.use = 'libmachina_engine libmachina_client' + autowaf.use_lib(bld, obj, ''' + FLOWCANVAS + GLADEMM + GLIBMM + GNOMECANVASMM + GTKMM + RAUL + SORD + SIGCPP + EUGENE + ''') - # GUI runtime files - bld.install_files('${DATADIR}/machina', 'machina.glade') - bld.install_files('${DATADIR}/machina', 'machina.svg') + # GUI runtime files + bld.install_files('${DATADIR}/machina', 'machina.glade') + bld.install_files('${DATADIR}/machina', 'machina.svg') - # Executable - obj = bld(features = 'cxx cxxprogram') - obj.target = 'machina_gui' - obj.source = 'main.cpp' - obj.includes = ['.', '../..', '../engine'] - obj.defines = 'VERSION="' + bld.env['MACHINA_VERSION'] + '"' - obj.use = 'libmachina_engine libmachina_gui' - autowaf.use_lib(bld, obj, 'GTHREAD GLIBMM SORD RAUL MACHINA EUGENE FLOWCANVAS') + # Executable + obj = bld(features = 'cxx cxxprogram') + obj.target = 'machina_gui' + obj.source = 'main.cpp' + obj.includes = ['.', '../..', '../engine'] + obj.defines = 'VERSION="' + bld.env['MACHINA_VERSION'] + '"' + obj.use = 'libmachina_engine libmachina_gui' + autowaf.use_lib(bld, obj, 'GTHREAD GLIBMM SORD RAUL MACHINA EUGENE FLOWCANVAS') @@ -15,54 +15,54 @@ top = '.' out = 'build' def options(opt): - autowaf.set_options(opt) + autowaf.set_options(opt) def configure(conf): - autowaf.configure(conf) - autowaf.display_header('Machina Configuration') - conf.load('compiler_cxx') - autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', - atleast_version='2.14.0', mandatory=True) - autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', - atleast_version='2.14.0', mandatory=True) - autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', - atleast_version='2.11.12', mandatory=False) - autowaf.check_pkg(conf, 'jack', uselib_store='JACK', - atleast_version='0.109.0', mandatory=True) - autowaf.check_pkg(conf, 'raul', uselib_store='RAUL', - atleast_version='0.5.1', mandatory=True) - autowaf.check_pkg(conf, 'flowcanvas', uselib_store='FLOWCANVAS', - atleast_version='0.5.1', mandatory=False) - autowaf.check_pkg(conf, 'libglademm-2.4', uselib_store='GLADEMM', - atleast_version='2.6.0', mandatory=False) - autowaf.check_pkg(conf, 'sord', uselib_store='SORD', - atleast_version='0.1.0', mandatory=False) - #autowaf.check_pkg(conf, 'eugene', uselib_store='EUGENE', - # atleast_version='0.0.0', mandatory=False) + autowaf.configure(conf) + autowaf.display_header('Machina Configuration') + conf.load('compiler_cxx') + autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', + atleast_version='2.14.0', mandatory=True) + autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', + atleast_version='2.14.0', mandatory=True) + autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', + atleast_version='2.11.12', mandatory=False) + autowaf.check_pkg(conf, 'jack', uselib_store='JACK', + atleast_version='0.109.0', mandatory=True) + autowaf.check_pkg(conf, 'raul', uselib_store='RAUL', + atleast_version='0.5.1', mandatory=True) + autowaf.check_pkg(conf, 'flowcanvas', uselib_store='FLOWCANVAS', + atleast_version='0.5.1', mandatory=False) + autowaf.check_pkg(conf, 'libglademm-2.4', uselib_store='GLADEMM', + atleast_version='2.6.0', mandatory=False) + autowaf.check_pkg(conf, 'sord', uselib_store='SORD', + atleast_version='0.1.0', mandatory=False) + #autowaf.check_pkg(conf, 'eugene', uselib_store='EUGENE', + # atleast_version='0.0.0', mandatory=False) - # Check for posix_memalign (OSX, amazingly, doesn't have it) - conf.check(function_name='posix_memalign', - header_name='stdlib.h', - define_name='HAVE_POSIX_MEMALIGN', - mandatory=False) + # Check for posix_memalign (OSX, amazingly, doesn't have it) + conf.check(function_name='posix_memalign', + header_name='stdlib.h', + define_name='HAVE_POSIX_MEMALIGN', + mandatory=False) - if conf.is_defined('HAVE_GLADEMM') and conf.is_defined('HAVE_FLOWCANVAS'): - autowaf.define(conf, 'MACHINA_BUILD_GUI', 1) - - autowaf.define(conf, 'MACHINA_PPQN', 19200) - autowaf.define(conf, 'MACHINA_VERSION', MACHINA_VERSION) - autowaf.define(conf, 'MACHINA_DATA_DIR', os.path.join( - conf.env['DATADIR'], 'machina')) + if conf.is_defined('HAVE_GLADEMM') and conf.is_defined('HAVE_FLOWCANVAS'): + autowaf.define(conf, 'MACHINA_BUILD_GUI', 1) - conf.write_config_header('machina-config.h', remove=False) + autowaf.define(conf, 'MACHINA_PPQN', 19200) + autowaf.define(conf, 'MACHINA_VERSION', MACHINA_VERSION) + autowaf.define(conf, 'MACHINA_DATA_DIR', os.path.join( + conf.env['DATADIR'], 'machina')) - autowaf.display_msg(conf, "Jack", conf.is_defined('HAVE_JACK')) - autowaf.display_msg(conf, "GUI", conf.is_defined('MACHINA_BUILD_GUI')) - print('') + conf.write_config_header('machina-config.h', remove=False) + + autowaf.display_msg(conf, "Jack", conf.is_defined('HAVE_JACK')) + autowaf.display_msg(conf, "GUI", conf.is_defined('MACHINA_BUILD_GUI')) + print('') def build(bld): - bld.recurse('src/engine') - bld.recurse('src/client') + bld.recurse('src/engine') + bld.recurse('src/client') - if bld.is_defined('MACHINA_BUILD_GUI'): - bld.recurse('src/gui') + if bld.is_defined('MACHINA_BUILD_GUI'): + bld.recurse('src/gui') |