#
# Makefile for the linux ncp-filesystem routines.
#

UTILS = ncpmount ncpumount nwsfind

CC = gcc

default:
	make -C ..

all: $(UTILS)

install: all
	for i in $(UTILS); \
	do install $$i -m 4755 $(BINDIR); done

$(UTILS): %: %.o libncp.a
	$(CC) -o $@ $(addsuffix .o,$@) -L. -lncp -L../lib -lcom_err

ncplib.o: ncplib.c ncplib.h
	$(CC) $(CFLAGS) -finline-functions -c ncplib.c

libncp.a: ncplib.o ../lib/ncplib_err.o
	ar r libncp.a ncplib.o ../lib/ncplib_err.o

dep:
	$(CPP) -M $(INCLUDES) *.c > .depend

clean:
	rm -f *.o *~ libncp.a $(UTILS)

mrproper: clean
	rm -f .depend

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif

