.
authormarci
Fri, 12 Mar 2004 20:09:35 +0000
changeset 18095f0c5f3fc70
parent 179 91646df36ffc
child 181 96f647f568c7
.
src/work/marci/dimacs.h
src/work/marci/makefile
     1.1 --- a/src/work/marci/dimacs.h	Fri Mar 12 16:37:08 2004 +0000
     1.2 +++ b/src/work/marci/dimacs.h	Fri Mar 12 20:09:35 2004 +0000
     1.3 @@ -18,6 +18,7 @@
     1.4      int i, j;
     1.5      std::string str;
     1.6      int n, m; 
     1.7 +    typename Graph::Edge e;
     1.8      std::vector<typename Graph::Node> nodes;
     1.9      while (is>>c) {
    1.10        switch (c) {
    1.11 @@ -49,7 +50,7 @@
    1.12        case 'a':
    1.13  	is >> i >> j >> cap;
    1.14  	getline(is, str);
    1.15 -	typename Graph::Edge e=G.addEdge(nodes[i], nodes[j]);
    1.16 +	e=G.addEdge(nodes[i], nodes[j]);
    1.17  	capacity.update();
    1.18  	capacity.set(e, cap);
    1.19  	break;
     2.1 --- a/src/work/marci/makefile	Fri Mar 12 16:37:08 2004 +0000
     2.2 +++ b/src/work/marci/makefile	Fri Mar 12 20:09:35 2004 +0000
     2.3 @@ -1,20 +1,33 @@
     2.4 -CXX3 = g++-3.0
     2.5 +#CXX3 = g++-3.0
     2.6  CXX2 = g++-2.95
     2.7 -CXX3.3 = g++
     2.8 -CXXFLAGS = -W -Wall -ansi -pedantic -I. -I.. -I../alpar
     2.9 +#CXX3.3 = g++
    2.10 +CXX3 := $(shell type -p g++-3.3 || type -p g++-3.2 || type -p g++-3.0 || type -p g++-3 || echo g++)
    2.11 +#CXXFLAGS = -W -Wall -ansi -pedantic -I. -I.. -I../alpar
    2.12  LEDAROOT ?= /ledasrc/LEDA-4.1
    2.13 +BOOSTROOT ?= /home/marci/boost
    2.14 +INCLUDEDIRS ?= -I../../include -I.. -I. -I../{marci,jacint,alpar,klao,akos,athos} -I$(LEDAROOT)/incl -I$(BOOSTROOT)
    2.15 +CXXFLAGS = -g -O -W -Wall $(INCLUDEDIRS) -ansi -pedantic
    2.16  
    2.17 -BINARIES = edmonds_karp_demo edmonds_karp_demo_alpar preflow_demo_leda preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos lg_vs_sg
    2.18 +
    2.19 +BINARIES = edmonds_karp_demo preflow_demo_leda lg_vs_sg leda_graph_demo
    2.20 +#preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar
    2.21  
    2.22  all: $(BINARIES)
    2.23  
    2.24  .depend dep depend:
    2.25 -	-g++-2.95 -I. -I.. -I$(LEDAROOT)/incl -I/home/marci/boost -M *.cc > .depend 2>/dev/null
    2.26 +	-g++ $(INCLUDEDIRS) -M $(BINARIES:=.cc) > .depend #2>/dev/null
    2.27 +
    2.28  
    2.29  
    2.30  makefile: .depend
    2.31  sinclude .depend
    2.32  
    2.33 +leda_graph_demo.o:
    2.34 +	$(CXX3) -Wall -O0 -I.. -I../alpar -I$(LEDAROOT)/incl -I. -c leda_graph_demo.cc
    2.35 +
    2.36 +leda_graph_demo: leda_graph_demo.o
    2.37 +	$(CXX3) -Wall -O0 -L$(LEDAROOT) -o leda_graph_demo leda_graph_demo.o -lG -lL -lm
    2.38 +
    2.39  edmonds_karp_demo: 
    2.40  	$(CXX3) $(CXXFLAGS) -g -I. -I.. -o edmonds_karp_demo edmonds_karp_demo.cc
    2.41  	$(CXX3) $(CXXFLAGS) -g -pg -O3 -I. -I.. -o edmonds_karp_demo_prof edmonds_karp_demo.cc
    2.42 @@ -29,7 +42,7 @@
    2.43  	$(CXX2) -W -Wall -O3 -DLEDA_PREFIX -I. -I$(LEDAROOT)/incl -L$(LEDAROOT) -o preflow_demo_leda preflow_demo_leda.cc -lP -lm -lL -lG
    2.44  
    2.45  preflow_demo_leda_uj:
    2.46 -	$(CXX3.3) -Wall -O3 -I$(LEDAROOT)/incl -I. -L$(LEDAROOT) -o preflow_demo_leda_uj preflow_demo_leda_uj.cc -lG -lL -lm
    2.47 +	$(CXX3) -Wall -O3 -I$(LEDAROOT)/incl -I. -L$(LEDAROOT) -o preflow_demo_leda_uj preflow_demo_leda_uj.cc -lG -lL -lm
    2.48  
    2.49  preflow_demo_boost:
    2.50  	$(CXX2) -ftemplate-depth-30 -O3 -I. -I/home/marci/boost -o preflow_demo_boost preflow_demo_boost.cc