OBJS=maketree.o treefunc.o generic.o traverse.o intree.o iotree.o outree.o list.o memory.o findnode.o

all: treelib.o

clean:
	rm -f *.o

treelib.o: ${OBJS}
	ld -r -o treelib.o ${OBJS}
	cp treelib.o ${OBJDIR}
	cp treestruct.h ${INCDIR}
	cp list.h ${INCDIR}
	cp memory.h ${INCDIR}


list.o: list.c list.h
	${CC} -c list.c ${DBG} ${INC}

memory.o: memory.c memory.h
	${CC} -c memory.c ${DBG} ${INC}

%.o: %.c treestruct.h list.h
	${CC} -c $*.c ${DBG} ${INC}

build:
	cp *.c ${BLD}
	cp *.h ${BLD}
	cp Makefile ${BLD}
