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

INCLUDES =  -I/usr/src/linux/include -I../kernel
BINDIR = ../bin
UTILS = ncpmount ncpumount ncptest ipx_configure

CFLAGS = -Wall $(INCLUDES) -g
CC = gcc

all: $(UTILS)

ncpmount: ncpmount.o ncplib_user.o nwcrypt.o
	$(CC) -o ncpmount ncpmount.o ncplib_user.o nwcrypt.o
	cp ncpmount $(BINDIR)

ncpumount: ncpumount.o ncplib_user.o nwcrypt.o
	$(CC) -o ncpumount ncpumount.o ncplib_user.o nwcrypt.o
	cp ncpumount $(BINDIR)

ipx_configure: ipx_configure.c
	$(CC) $(CFLAGS) ipx_configure.c -o ipx_configure
	cp ipx_configure $(BINDIR)

ncptest: ncptest.o ncplib_user.o nwcrypt.o
	$(CC) -o ncptest ncptest.o ncplib_user.o nwcrypt.o

nwcrypt.o: nwcrypt.c
	$(CC) -c -O3 -Wall nwcrypt.c

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

clean:
	rm -f *.o *~

realclean: clean
	rm -f $(UTILS) .depend $(DISTFILE)

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