Index: sources/src/schedulers.cc
===================================================================
--- sources/src/schedulers.cc	(revision 17)
+++ sources/src/schedulers.cc	(revision 27)
@@ -35,16 +35,21 @@
  */
 
-#include<iostream>
-#include<algorithm> //std::sort
-#include"sc_module.h" // method_process_t
-#include"gen_code.h"  // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func
-#include"internal.h"  // dump_all_graph
-#include"graph_cass.h" // makegraph
-#include"process_dependency.h" // MakeProcessDependencyList
-#include"signal_dependency.h" // MakeSignalDependencyGraph
-#include"mouchard_scheduling.h" // MakeMouchardScheduling
-#include"graph_signals.h" // makegraph
-//#include"module_hierarchy2dot.h"
-#include"assert.h"
+#include "sc_module.h" // method_process_t
+#include "gen_code.h"  // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func
+#include "internal.h"  // dump_all_graph
+#include "graph_cass.h" // makegraph
+#include "process_dependency.h" // MakeProcessDependencyList
+#include "signal_dependency.h" // MakeSignalDependencyGraph
+#include "mouchard_scheduling.h" // MakeMouchardScheduling
+#include "graph_signals.h" // makegraph
+//#include "module_hierarchy2dot.h"
+
+#include <cassert>
+#include <iostream>
+#include <algorithm> //std::sort
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 using namespace std;
@@ -95,6 +100,6 @@
                          const method_process_t *a2)
 {
-  ASSERT(a1 != NULL);
-  ASSERT(a2 != NULL);
+  assert(a1 != NULL);
+  assert(a2 != NULL);
   sc_module *m1 = a1->module;
   sc_module *m2 = a2->module;
@@ -114,5 +119,5 @@
     addr1.func = a1->func;
     addr2.func = a2->func;
-    ASSERT(addr1.addr_ll != addr2.addr_ll);
+    assert(addr1.addr_ll != addr2.addr_ll);
     if ( sizeof(SC_ENTRY_FUNC) == 4 ) {
         return (addr1.addr_l < addr2.addr_l);
@@ -130,6 +135,6 @@
                     const method_process_t *a2)
 {
-  ASSERT(a1 != NULL);
-  ASSERT(a2 != NULL);
+  assert(a1 != NULL);
+  assert(a2 != NULL);
   return (a1->module < a2->module);
 }
@@ -140,6 +145,6 @@
                  const method_process_t *a2)
 {
-    ASSERT(a1 != NULL);
-    ASSERT(a2 != NULL);
+    assert(a1 != NULL);
+    assert(a2 != NULL);
     union {
         SC_ENTRY_FUNC func;
@@ -237,8 +242,8 @@
 {
   SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph ();
-  ASSERT(sig_graph != NULL);
+  assert(sig_graph != NULL);
   // Create the process evaluation list
   ProcessDependencyList* process_list = MakeMouchardScheduling (*sig_graph);
-  ASSERT(process_list != NULL);
+  assert(process_list != NULL);
 
   if (dump_all_graph)
@@ -284,6 +289,8 @@
     // Uses port dependancies like Dr. Mouchard.
     ProcessDependencyList* process_list = BuchmannScheduling ();
-    base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list);
-    gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
+	if (dynamic_link_of_scheduling_code)
+		base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list);
+	else
+		gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
     break;
   }
@@ -295,6 +302,8 @@
     // and does not use an event-driven scheduler.
     ProcessDependencyList* process_list = MouchardScheduling ();
-    base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list);
-    gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
+	if (dynamic_link_of_scheduling_code)
+		base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list);
+	else
+		gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
     break;
   }
@@ -307,6 +316,8 @@
       graph2dot("module_graph", *g);
     strong_component_list_t *strong_list = strong_component (g);
-    base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list);
-    gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list);
+	if (dynamic_link_of_scheduling_code)
+		base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list);
+	else
+		gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list);
     break;
   }
