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