
include config.mk

TOP	= .
SUBDIRS	= xdr fs tests
OBJS	= nfsbench.o biod.o request.o script.o util.o xgetopt.o stats.o

nfsbench:: subdirs $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) -L. -ltests -lfs -lxdr $(LIBS)

subdirs:
	for d in $(SUBDIRS); do (cd $$d && $(MAKE) TOP=..); done

init:
	if test ! -f tests/filelist; then cd tests; $(SHELL) ./genlist.sh; fi

clean distclean::
	for d in $(SUBDIRS); do (cd $$d && $(MAKE) TOP=.. $@); done
	rm -f $(OBJS) core gmon.out LOG
	rm -f config.log config.status config.cache

distclean::
	rm -f nfsbench LOG
	rm -f config.cache config.status config.mk config.h
