1 CXXFLAGS=-g -Wall -I../include |
1 CXXFLAGS=-g -O -Wall -I../include -I. |
2 |
2 |
3 none: |
3 BINARIES = graphdemo bfsdemo bfsdemo2 proba |
4 @echo 'Please use one of these forms:' |
|
5 @echo ' make all' |
|
6 @echo ' make clean' |
|
7 @echo ' make graphdemo' |
|
8 @echo ' make bfsdemo' |
|
9 @echo ' make bfsdemo2' |
|
10 |
4 |
11 all: graphdemo bfsdemo bfsdemo2 |
5 # Hat, ez elismerem, hogy nagyon ronda, de mukodik minden altalam |
|
6 # ismert rendszeren :-) (Misi) |
|
7 CXX := $(shell type -p g++-3.3 || type -p g++-3.2 || type -p g++-3.0 || type -p g++-3 || echo g++) |
|
8 CC := $(CXX) |
|
9 |
|
10 |
|
11 all: $(BINARIES) |
|
12 |
|
13 ################ |
|
14 # Minden binarishoz egy sor, felsorolva, hogy mely object file-okbol |
|
15 # all elo. |
|
16 # Kiveve ha siman file.cc -> file esetrol van szo, amikor is nem kell |
|
17 # irni semmit. |
|
18 |
|
19 #proba: proba.o seged.o |
|
20 |
|
21 ################ |
|
22 |
|
23 dep depend: |
|
24 $(CXX) $(CXXFLAGS) -MM *.cc > .depend |
|
25 .depend: |
|
26 $(CXX) $(CXXFLAGS) -MM *.cc > .depend |
|
27 |
|
28 makefile: .depend |
|
29 sinclude .depend |
12 |
30 |
13 clean: |
31 clean: |
14 rm graphdemo bfsdemo bfsdemo2 |
32 $(RM) *.o $(BINARIES) .depend |
15 |
33 |
16 graphdemo: graphdemo.cc ../include/graph.h \ |
34 .PHONY: all clean dep depend |
17 ../include/oldgraph.h makefile |
|
18 g++ $(CXXFLAGS) -o graphdemo graphdemo.cc |
|
19 |
|
20 bfsdemo: bfsdemo.cc ../include/graph.h ../include/bfs.h \ |
|
21 ../include/oldgraph.h makefile |
|
22 g++ $(CXXFLAGS) -o bfsdemo bfsdemo.cc |
|
23 |
|
24 bfsdemo2: bfsdemo2.cc ../include/graph.h ../include/bfs.h \ |
|
25 ../include/oldgraph.h makefile |
|
26 g++ $(CXXFLAGS) -o bfsdemo2 bfsdemo2.cc |
|