1.1 --- a/src/work/jacint_makefile Fri Jan 23 22:26:13 2004 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,9 +0,0 @@
1.4 -CCFLAGS = -Wall -ansi
1.5 -CXXFLAGS = -Wall -ansi -I. -g
1.6 -CC = g++-3.0
1.7 -
1.8 -flow_test: flow_test.cc marci_list_graph.hh reverse_bfs.hh preflow_push_hl.hh marci_graph_traits.hh marci_property_vector.hh preflow_push_max_flow.hh dijkstra.hh
1.9 - $(CXX) $(CXXFLAGS) -o flow_test flow_test.cc
1.10 -
1.11 -marci_graph_demo: marci_graph_demo.cc marci_graph_traits.hh marci_list_graph.hh marci_property_vector.hh marci_bfs.hh marci_max_flow.hh
1.12 - $(CC) $(CCFLAGS) -I. marci_graph_demo.cc -o marci_graph_demo
2.1 --- a/src/work/makefile Fri Jan 23 22:26:13 2004 +0000
2.2 +++ b/src/work/makefile Sun Jan 25 18:33:17 2004 +0000
2.3 @@ -1,26 +1,34 @@
2.4 -CXXFLAGS=-g -Wall -I../include
2.5 +CXXFLAGS=-g -O -Wall -I../include -I.
2.6
2.7 -none:
2.8 - @echo 'Please use one of these forms:'
2.9 - @echo ' make all'
2.10 - @echo ' make clean'
2.11 - @echo ' make graphdemo'
2.12 - @echo ' make bfsdemo'
2.13 - @echo ' make bfsdemo2'
2.14 +BINARIES = graphdemo bfsdemo bfsdemo2 proba
2.15
2.16 -all: graphdemo bfsdemo bfsdemo2
2.17 +# Hat, ez elismerem, hogy nagyon ronda, de mukodik minden altalam
2.18 +# ismert rendszeren :-) (Misi)
2.19 +CXX := $(shell type -p g++-3.3 || type -p g++-3.2 || type -p g++-3.0 || type -p g++-3 || echo g++)
2.20 +CC := $(CXX)
2.21 +
2.22 +
2.23 +all: $(BINARIES)
2.24 +
2.25 +################
2.26 +# Minden binarishoz egy sor, felsorolva, hogy mely object file-okbol
2.27 +# all elo.
2.28 +# Kiveve ha siman file.cc -> file esetrol van szo, amikor is nem kell
2.29 +# irni semmit.
2.30 +
2.31 +#proba: proba.o seged.o
2.32 +
2.33 +################
2.34 +
2.35 +dep depend:
2.36 + $(CXX) $(CXXFLAGS) -MM *.cc > .depend
2.37 +.depend:
2.38 + $(CXX) $(CXXFLAGS) -MM *.cc > .depend
2.39 +
2.40 +makefile: .depend
2.41 +sinclude .depend
2.42
2.43 clean:
2.44 - rm graphdemo bfsdemo bfsdemo2
2.45 + $(RM) *.o $(BINARIES) .depend
2.46
2.47 -graphdemo: graphdemo.cc ../include/graph.h \
2.48 - ../include/oldgraph.h makefile
2.49 - g++ $(CXXFLAGS) -o graphdemo graphdemo.cc
2.50 -
2.51 -bfsdemo: bfsdemo.cc ../include/graph.h ../include/bfs.h \
2.52 - ../include/oldgraph.h makefile
2.53 - g++ $(CXXFLAGS) -o bfsdemo bfsdemo.cc
2.54 -
2.55 -bfsdemo2: bfsdemo2.cc ../include/graph.h ../include/bfs.h \
2.56 - ../include/oldgraph.h makefile
2.57 - g++ $(CXXFLAGS) -o bfsdemo2 bfsdemo2.cc
2.58 +.PHONY: all clean dep depend