# HG changeset patch # User klao # Date 1075055597 0 # Node ID 2b607665c9e26e2d7a33de04f42c15bb8179d0d9 # Parent f505c414feb9c509847a170716296673e01e29cc Okos makefile depend szabalyok egyszeru valami.cc -> valami esetek implicit szabalyokkal diff -r f505c414feb9 -r 2b607665c9e2 src/work/jacint_makefile --- a/src/work/jacint_makefile Fri Jan 23 22:26:13 2004 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -CCFLAGS = -Wall -ansi -CXXFLAGS = -Wall -ansi -I. -g -CC = g++-3.0 - -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 - $(CXX) $(CXXFLAGS) -o flow_test flow_test.cc - -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 - $(CC) $(CCFLAGS) -I. marci_graph_demo.cc -o marci_graph_demo diff -r f505c414feb9 -r 2b607665c9e2 src/work/makefile --- a/src/work/makefile Fri Jan 23 22:26:13 2004 +0000 +++ b/src/work/makefile Sun Jan 25 18:33:17 2004 +0000 @@ -1,26 +1,34 @@ -CXXFLAGS=-g -Wall -I../include +CXXFLAGS=-g -O -Wall -I../include -I. -none: - @echo 'Please use one of these forms:' - @echo ' make all' - @echo ' make clean' - @echo ' make graphdemo' - @echo ' make bfsdemo' - @echo ' make bfsdemo2' +BINARIES = graphdemo bfsdemo bfsdemo2 proba -all: graphdemo bfsdemo bfsdemo2 +# Hat, ez elismerem, hogy nagyon ronda, de mukodik minden altalam +# ismert rendszeren :-) (Misi) +CXX := $(shell type -p g++-3.3 || type -p g++-3.2 || type -p g++-3.0 || type -p g++-3 || echo g++) +CC := $(CXX) + + +all: $(BINARIES) + +################ +# Minden binarishoz egy sor, felsorolva, hogy mely object file-okbol +# all elo. +# Kiveve ha siman file.cc -> file esetrol van szo, amikor is nem kell +# irni semmit. + +#proba: proba.o seged.o + +################ + +dep depend: + $(CXX) $(CXXFLAGS) -MM *.cc > .depend +.depend: + $(CXX) $(CXXFLAGS) -MM *.cc > .depend + +makefile: .depend +sinclude .depend clean: - rm graphdemo bfsdemo bfsdemo2 + $(RM) *.o $(BINARIES) .depend -graphdemo: graphdemo.cc ../include/graph.h \ - ../include/oldgraph.h makefile - g++ $(CXXFLAGS) -o graphdemo graphdemo.cc - -bfsdemo: bfsdemo.cc ../include/graph.h ../include/bfs.h \ - ../include/oldgraph.h makefile - g++ $(CXXFLAGS) -o bfsdemo bfsdemo.cc - -bfsdemo2: bfsdemo2.cc ../include/graph.h ../include/bfs.h \ - ../include/oldgraph.h makefile - g++ $(CXXFLAGS) -o bfsdemo2 bfsdemo2.cc +.PHONY: all clean dep depend