Index: src/demo/Makefile.am
===================================================================
--- src/demo/Makefile.am	(revision 1349)
+++ src/demo/Makefile.am	(revision 1361)
@@ -12,5 +12,5 @@
 
 if HAVE_GLPK
-noinst_PROGRAMS += lp_demo
+noinst_PROGRAMS += lp_demo lp_maxflow_demo
 endif
 
@@ -30,2 +30,6 @@
 lp_demo_CXXFLAGS = $(GLPK_CFLAGS)
 lp_demo_LDFLAGS = $(GLPK_LIBS)
+
+lp_demo_SOURCES = lp_maxflow_demo.cc
+lp_demo_CXXFLAGS = $(GLPK_CFLAGS)
+lp_demo_LDFLAGS = $(GLPK_LIBS)
Index: c/demo/lp_demo.cc
===================================================================
--- src/demo/lp_demo.cc	(revision 1326)
+++ 	(revision )
@@ -1,68 +1,0 @@
-#include<lemon/lp_glpk.h>
-#include<lemon/graph_reader.h>
-#include<lemon/list_graph.h>
-
-using namespace lemon;
-
-template<class G,class C>
-double maxFlow(const G &g,const C &cap,typename G::Node s,typename G::Node t)
-{
-  LpGlpk lp;
-  
-  typedef G Graph;
-  typedef typename G::Node Node;
-  typedef typename G::NodeIt NodeIt;
-  typedef typename G::Edge Edge;
-  typedef typename G::EdgeIt EdgeIt;
-  typedef typename G::OutEdgeIt OutEdgeIt;
-  typedef typename G::InEdgeIt InEdgeIt;
-  
-  typename G::template EdgeMap<LpGlpk::Col> x(g);
-  lp.addColSet(x);
-  
-  for(EdgeIt e(g);e!=INVALID;++e) {
-    lp.colUpperBound(x[e],cap[e]);
-    lp.colLowerBound(x[e],0);
-  }
-
-  for(NodeIt n(g);n!=INVALID;++n) if(n!=s&&n!=t) {
-    LpGlpk::Expr ex;
-    for(InEdgeIt  e(g,n);e!=INVALID;++e) ex+=x[e];
-    for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e];
-    lp.addRow(ex==0);
-  }
-  {
-    LpGlpk::Expr ex;
-    for(InEdgeIt  e(g,t);e!=INVALID;++e) ex+=x[e];
-    for(OutEdgeIt e(g,t);e!=INVALID;++e) ex-=x[e];
-    lp.setObj(ex);
-  }
-  lp.max();
-
-  lp.presolver(true);
-  
-  lp.messageLevel(3);
-
-  lp.solve();
-
-  return lp.primalValue();
-}
-
-int main() 
-{
-  ListGraph g;
-  ListGraph::Node s;
-  ListGraph::Node t;
-  
-  ListGraph::EdgeMap<double> cap(g);
-  
-  GraphReader<ListGraph> reader(std::cin,g);
-  reader.addNode("source",s).addNode("target",t)
-    .addEdgeMap("capacity",cap).run();
-  
-  // std::ifstream file("../test/preflow_");
-//   readDimacs(file, g, cap, s, t);
-
-  std::cout << "Max flow value = " << maxFlow(g,cap,s,t) << std::endl;
-
-}
Index: src/demo/lp_maxflow_demo.cc
===================================================================
--- src/demo/lp_maxflow_demo.cc	(revision 1361)
+++ src/demo/lp_maxflow_demo.cc	(revision 1361)
@@ -0,0 +1,68 @@
+#include<lemon/lp_glpk.h>
+#include<lemon/graph_reader.h>
+#include<lemon/list_graph.h>
+
+using namespace lemon;
+
+template<class G,class C>
+double maxFlow(const G &g,const C &cap,typename G::Node s,typename G::Node t)
+{
+  LpGlpk lp;
+  
+  typedef G Graph;
+  typedef typename G::Node Node;
+  typedef typename G::NodeIt NodeIt;
+  typedef typename G::Edge Edge;
+  typedef typename G::EdgeIt EdgeIt;
+  typedef typename G::OutEdgeIt OutEdgeIt;
+  typedef typename G::InEdgeIt InEdgeIt;
+  
+  typename G::template EdgeMap<LpGlpk::Col> x(g);
+  lp.addColSet(x);
+  
+  for(EdgeIt e(g);e!=INVALID;++e) {
+    lp.colUpperBound(x[e],cap[e]);
+    lp.colLowerBound(x[e],0);
+  }
+
+  for(NodeIt n(g);n!=INVALID;++n) if(n!=s&&n!=t) {
+    LpGlpk::Expr ex;
+    for(InEdgeIt  e(g,n);e!=INVALID;++e) ex+=x[e];
+    for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e];
+    lp.addRow(ex==0);
+  }
+  {
+    LpGlpk::Expr ex;
+    for(InEdgeIt  e(g,t);e!=INVALID;++e) ex+=x[e];
+    for(OutEdgeIt e(g,t);e!=INVALID;++e) ex-=x[e];
+    lp.setObj(ex);
+  }
+  lp.max();
+
+  lp.presolver(true);
+  
+  lp.messageLevel(3);
+
+  lp.solve();
+
+  return lp.primalValue();
+}
+
+int main() 
+{
+  ListGraph g;
+  ListGraph::Node s;
+  ListGraph::Node t;
+  
+  ListGraph::EdgeMap<double> cap(g);
+  
+  GraphReader<ListGraph> reader(std::cin,g);
+  reader.addNode("source",s).addNode("target",t)
+    .addEdgeMap("capacity",cap).run();
+  
+  // std::ifstream file("../test/preflow_");
+//   readDimacs(file, g, cap, s, t);
+
+  std::cout << "Max flow value = " << maxFlow(g,cap,s,t) << std::endl;
+
+}
