SHELL=	 /bin/sh
CC=	 @CC@
INSTALL= @INSTALL@

DEFS=	@DEFS@
LIBS=	@LIBS@

INCLUDES= -I../include
KINCLUDES= @KINCLUDES@
CFLAGS=	-O

SRCS=	announce.c auth_dum.c auth_krb.c auth_weak.c conv_mgr.c dsc_enter.c \
	dsname.c edit.c host.c interface.c res_module.c rpcall.c stubs.c \
	tfile.c tmem.c tnet.c tunix.c

OBJS=	announce.o conv_mgr.o dsc_enter.o dsname.o edit.o host.o interface.o \
	res_module.o rpcall.o stubs.o tfile.o tmem.o tnet.o tunix.o \
	rpc_et.o dsc_et.o

KDOBJS=	@KDOBJS@

all:	libds.a

libds.a: ${OBJS} ${KDOBJS}
	ar cruv libds.a ${OBJS} ${KDOBJS}
	@RANLIB@ libds.a

dsc_et.c: ../ets/dsc_et.et
	../et/compile_et ../ets/dsc_et.et; rm dsc_et.h

rpc_et.c: ../ets/rpc_et.et
	../et/compile_et ../ets/rpc_et.et; rm rpc_et.h

install:

dist:	${SRCS} Makefile.in
	-mkdir ../../dist/source/libds
	cp -p ${SRCS} ../../dist/source/libds/
	cp -p Makefile.in ../../dist/source/libds/

.c.o:
	-rm -f $*.o
	${CC} ${CFLAGS} ${INCLUDES} ${KINCLUDES} ${DEFS} -c $*.c

clean:
	rm -rf *~ \#* *.o libds.a libdsk.a

tfile.o : tfile.c
tunix.o : tunix.c
tnet.o : tnet.c
stubs.o : stubs.c ../include/discuss/interface.h ../include/discuss/types.h \
  ../include/rpc.h ../include/usp.h \
  ../include/usp_et.h ../include/rpc_et.h ../include/discuss/tfile.h \
  ../include/discuss/acl.h 
dsname.o : dsname.c ../include/discuss/dsname.h ../include/discuss/dsc_et.h \
  ../include/ansi.h 
interface.o : interface.c ../include/discuss/tfile.h ../include/discuss/interface.h \
  ../include/discuss/types.h ../include/discuss/acl.h \
  ../include/discuss/dsname.h ../include/rpc.h ../include/usp.h \
  ../include/usp_et.h ../include/rpc_et.h ../include/discuss/dsc_et.h 
rpcall.o : rpcall.c ../include/discuss/tfile.h \
  ../include/rpc.h ../include/usp.h ../include/usp_et.h ../include/rpc_et.h \
  ../include/config.h 
conv_mgr.o : conv_mgr.c ../include/usp.h ../include/usp_et.h ../include/rpc_et.h 
host.o : host.c
announce.o : announce.c ../include/discuss/tfile.h \
  ../include/discuss/interface.h ../include/discuss/types.h \
  ../include/discuss/dsname.h ../include/discuss/dsc_et.h 
res_module.o : res_module.c ../include/rpc_et.h ../include/config.h \
  ../include/ansi.h 
auth_krb.o : auth_krb.c
dsc_enter.o : dsc_enter.c ../include/discuss/tfile.h \
  ../include/discuss/types.h 
auth_dum.o : auth_dum.c 
tmem.o : tmem.c ../include/discuss/tfile.h 
