all : pph.out check_tree.out

pph.out : pph.o string.o
	g++ -Wall -o pph.out pph.o string.o

check_tree.out : check_tree.o tree.o stree.o stackar.o queue.o build_tree.o string.o
	g++ -Wall -o check_tree.out check_tree.o tree.o stree.o stackar.o queue.o build_tree.o string.o

check_tree.o : check_tree.cpp tree.h queue.h build_tree.h
	g++ -Wall -c check_tree.cpp

tree.o : tree.c fatal.h tree.h
	g++ -Wall -c tree.c

stree.o : stree.c fatal.h tree.h
	g++ -Wall -c stree.c

stackar.o : stackar.c fatal.h stackar.h
	g++ -Wall -c stackar.c

queue.o : queue.c fatal.h queue.h
	g++ -Wall -c queue.c

pph.o : pph.cpp tree.h queue.h build_tree.h
	g++ -Wall -c pph.cpp

build_tree.o : build_tree.cpp String.h
	g++ -Wall -c build_tree.cpp

string.o : string.cpp hyper.h
	g++ -c string.cpp
