DEBUG = -g -ansi

BTOBJS = btops.o btmisc.o btio.o btupdate.o

EXECS = bdump bcreate binsert blist bfill

all: $(EXECS)

clean:
	rm -f *.o $(EXECS)

bcreate:	create.o $(BTOBJS)
	g++ $(DEBUG) -o bcreate create.o $(BTOBJS)

create.o:	create.cpp btree.hxx btree.h
	g++ $(DEBUG) -c create.cpp

binsert:	insert.o $(BTOBJS)
	g++ $(DEBUG) -o binsert insert.o $(BTOBJS)

insert.o:	insert.cpp btree.hxx btree.h
	g++ $(DEBUG) -c insert.cpp

bfill:		bfill.o $(BTOBJS)
	g++ $(DEBUG) -o bfill bfill.o $(BTOBJS)

bfill.o:	bfill.cpp btree.hxx btree.h
	g++ $(DEBUG) -c bfill.cpp

btops.o:	btops.cpp btree.hxx btree.h
	g++ $(DEBUG) -c btops.cpp

btupdate.o:	btupdate.cpp btree.hxx btree.h
	g++ $(DEBUG) -c btupdate.cpp

btmisc.o:	btmisc.cpp btree.hxx btree.h
	g++ $(DEBUG) -c btmisc.cpp

btio.o:		btio.cpp btree.hxx btree.h
	g++ $(DEBUG) -c btio.cpp

bdump:		bdump.c btree.h
	gcc $(DEBUG) -o bdump bdump.c

blist:		blist.cpp btree.h
	g++ $(DEBUG) -o blist blist.cpp
