
include config.mk

TOP	= .
SUBDIRS	= shell xdr rpc
OBJS	= nfshell.o
BINDIR	= /usr/local/bin
LIBS	= -lshell -lrpc -lxdr -L/usr/local/lib -ltcl7.6 -lm -ldl

nfshell:: subdirs $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) -Llib $(LIBS)

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

install::
	@echo "Please install nfshell manually by copying the binary to"
	@echo "some suitable place, but preferably out of the users' way."

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
	rm -f lib/lib*.a

distclean::
	rm -f nfshell LOG
	rm -f config.cache config.status config.mk include/config.h
