# A makefile for the stuff now in libg++/etc/ADT-examples

srcdir = .

TEST_PROGS = generic-q search keyhash tsort tsortinp genkey patricia kmp

#### package, host, target, and site dependent Makefile fragments come in here.
##

check: $(TEST_PROGS)
	-./generic-q < $(srcdir)/generic-q.cc
	-./tsortinp 20 | ./tsort
	-./keyhash < $(srcdir)/keyhash.cc
	-./search 1000
	-./genkey 1000 200 > input
	-./patricia ./input ./input | grep -v "is found"

#	-./dhrystone

run_tests: check

generic-q: generic-q.o
	$(CXX)  generic-q.o -o $@ $(LIBS)

tsort: tsortinp tsort.o
	$(CXX)  tsort.o -o $@ $(LIBS)

tsortinp: tsortinp.o
	$(CXX)  tsortinp.o -o $@ $(LIBS)

keyhash: keyhash.o
	$(CXX)  keyhash.o -o $@ $(LIBS)

search: search.o
	$(CXX)  search.o -o $@ $(LIBS)

genkey: genPatkey.o
	$(CXX)  genPatkey.o -o $@ $(LIBS)
   
Patricia.o: $(srcdir)/Patricia.h
Patmain.o: $(srcdir)/Patricia.h 

patricia: Patmain.o Patricia.o
	$(CXX)  Patmain.o Patricia.o -o $@ $(LIBS)

kmp: kmp.o
	$(CXX)  kmp.o -o $@ $(LIBS)
