aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Loader.cpp7
-rw-r--r--src/engine/wscript12
2 files changed, 12 insertions, 7 deletions
diff --git a/src/engine/Loader.cpp b/src/engine/Loader.cpp
index 830ef47..07867ad 100644
--- a/src/engine/Loader.cpp
+++ b/src/engine/Loader.cpp
@@ -25,6 +25,7 @@
#include "machina/Edge.hpp"
#include "machina/Machine.hpp"
#include "machina/ActionFactory.hpp"
+#include "wafconfig.h"
using namespace Raul;
using namespace std;
@@ -74,7 +75,7 @@ Loader::load(const Glib::ustring& uri)
cout << "[Loader] Loading " << machine_uri << " from " << document_uri << endl;
- machine = SharedPtr<Machine>(new Machine(TimeUnit::beats(LV2_EVENT_PPQN)));
+ machine = SharedPtr<Machine>(new Machine(TimeUnit::beats(MACHINA_PPQN)));
typedef std::map<string, SharedPtr<Node> > Created;
Created created;
@@ -94,7 +95,7 @@ Loader::load(const Glib::ustring& uri)
for (Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
const char* node_id = (*i)["node"];
SharedPtr<Node> node(new Node(
- TimeStamp(TimeUnit(TimeUnit::BEATS, LV2_EVENT_PPQN), (double)(*i)["duration"]),
+ TimeStamp(TimeUnit(TimeUnit::BEATS, MACHINA_PPQN), (double)(*i)["duration"]),
true));
machine->add_node(node);
created[node_id] = node;
@@ -115,7 +116,7 @@ Loader::load(const Glib::ustring& uri)
const char* node_id = (*i)["node"];
if (created.find(node_id) == created.end()) {
SharedPtr<Node> node(new Node(
- TimeStamp(TimeUnit(TimeUnit::BEATS, LV2_EVENT_PPQN), (double)(*i)["duration"]),
+ TimeStamp(TimeUnit(TimeUnit::BEATS, MACHINA_PPQN), (double)(*i)["duration"]),
false));
machine->add_node(node);
created[node_id] = node;
diff --git a/src/engine/wscript b/src/engine/wscript
index 84b42a1..902ab78 100644
--- a/src/engine/wscript
+++ b/src/engine/wscript
@@ -7,7 +7,6 @@ def build(bld):
ActionFactory.cpp
Edge.cpp
Engine.cpp
- Evolver.cpp
JackDriver.cpp
LearnRequest.cpp
Loader.cpp
@@ -16,18 +15,23 @@ def build(bld):
MidiAction.cpp
Mutation.cpp
Node.cpp
- Problem.cpp
RaulJackDriver.cpp
Recorder.cpp
SMFDriver.cpp
'''
-
+ if bld.env['HAVE_EUGENE']:
+ core_source += '''
+ Evolver.cpp
+ Problem.cpp
+ '''
obj = bld.new_task_gen('cxx', 'shlib')
obj.source = core_source
obj.export_incdirs = ['.']
obj.includes = '.'
obj.name = 'libmachina_engine'
obj.target = 'machina_engine'
- core_libs = 'GLIBMM GTHREAD RAUL REDLANDMM JACK EUGENE'
+ core_libs = 'GLIBMM GTHREAD RAUL REDLANDMM JACK'
+ if bld.env['HAVE_EUGENE']:
+ core_libs += ' EUGENE '
autowaf.use_lib(bld, obj, core_libs)