## Process this file with automake to produce Makefile.in
## Do not edit this file directly.  It is generated from Makefile.am.m4

ARPCGEN = $(top_builddir)/uvfs/arpcgen/arpcgen
SVCDIR = $(top_srcdir)/svc

lib_LIBRARIES = libsfs.a
exec_PROGRAMS = pathinfo suidconnect
noinst_PROGRAMS = tst




nfs3_prot.h: $(SVCDIR)/nfs3_prot.x
	@rm -f nfs3_prot
	-$(ARPCGEN) -r sfs-internal.h -h $(SVCDIR)/nfs3_prot.x -o $@ || rm -f $@
nfs3_prot.c: $(SVCDIR)/nfs3_prot.x
	@rm -f nfs3_prot
	-$(ARPCGEN) -c $(SVCDIR)/nfs3_prot.x -o $@ || rm -f $@
nfs3_prot.o: nfs3_prot.c nfs3_prot.h
	$(COMPILE) -c @NW@ nfs3_prot.c

nfs3exp_prot.h: $(SVCDIR)/nfs3exp_prot.x
	@rm -f nfs3exp_prot
	-$(ARPCGEN) -r sfs-internal.h -h $(SVCDIR)/nfs3exp_prot.x -o $@ || rm -f $@
nfs3exp_prot.c: $(SVCDIR)/nfs3exp_prot.x
	@rm -f nfs3exp_prot
	-$(ARPCGEN) -c $(SVCDIR)/nfs3exp_prot.x -o $@ || rm -f $@
nfs3exp_prot.o: nfs3exp_prot.c nfs3exp_prot.h
	$(COMPILE) -c @NW@ nfs3exp_prot.c

sfs_prot.h: $(SVCDIR)/sfs_prot.x
	@rm -f sfs_prot
	-$(ARPCGEN) -r sfs-internal.h -h $(SVCDIR)/sfs_prot.x -o $@ || rm -f $@
sfs_prot.c: $(SVCDIR)/sfs_prot.x
	@rm -f sfs_prot
	-$(ARPCGEN) -c $(SVCDIR)/sfs_prot.x -o $@ || rm -f $@
sfs_prot.o: sfs_prot.c sfs_prot.h
	$(COMPILE) -c @NW@ sfs_prot.c

sfsagent.h: $(SVCDIR)/sfsagent.x
	@rm -f sfsagent
	-$(ARPCGEN) -r sfs-internal.h -h $(SVCDIR)/sfsagent.x -o $@ || rm -f $@
sfsagent.c: $(SVCDIR)/sfsagent.x
	@rm -f sfsagent
	-$(ARPCGEN) -c $(SVCDIR)/sfsagent.x -o $@ || rm -f $@
sfsagent.o: sfsagent.c sfsagent.h
	$(COMPILE) -c @NW@ sfsagent.c


nfs3_prot.o: nfs3exp_prot.h

$(DEP_FILES):  nfs3_prot.h nfs3exp_prot.h sfs_prot.h sfsagent.h

rwfd.c:
	$(LN_S) $(top_srcdir)/async/rwfd.c rwfd.c
suidprotect.c:
	$(LN_S) $(top_srcdir)/async/suidprotect.c suidprotect.c
authunixint.c:
	$(LN_S) $(top_srcdir)/arpc/authunixint.c authunixint.c

EXTRA_DIST = Makefile.am.m4 .cvsignore
libsfs_a_SOURCES =  nfs3_prot.c nfs3exp_prot.c sfs_prot.c sfsagent.c \
rwfd.c suidprotect.c authunixint.c \
devcon.c hashtab.c sfsops.c sfspaths.c srpc.c xdr_misc.c

DEPEND_ON_MAKEFILE = devgetcon.o sfspaths.o
$(DEPEND_ON_MAKEFILE): Makefile

include_HEADERS = sfs.h
sfsinclude_HEADERS = sfs-internal.h
noinst_HEADERS = hashtab.h queue.h suio.h xdr_suio.h

suidconnect_SOURCES = suidconnect.c
suidconnect_LDADD = libsfs.a

pathinfo_SOURCES = pathinfo.c
pathinfo_LDADD = libsfs.a

tst_SOURCES = tst.c
tst_LDADD = libsfs.a

dist-hook:
	cd $(distdir) && rm -f rwfd.c authunixint.c  nfs3_prot.h nfs3exp_prot.h sfs_prot.h sfsagent.h  nfs3_prot.c nfs3exp_prot.c sfs_prot.c sfsagent.c

.PHONY: rpcclean
rpcclean:
	rm -f  nfs3_prot.h nfs3exp_prot.h sfs_prot.h sfsagent.h  nfs3_prot.c nfs3exp_prot.c sfs_prot.c sfsagent.c

install-exec-hook:
	-chgrp @sfsgroup@ $(DESTDIR)$(execdir)/suidconnect \
	   && chmod 2555 $(DESTDIR)$(execdir)/suidconnect

CLEANFILES = core *.core *~ *.rpo  nfs3_prot.h nfs3exp_prot.h sfs_prot.h sfsagent.h  nfs3_prot.c nfs3exp_prot.c sfs_prot.c sfsagent.c authunixint.c rwfd.c
MAINTAINERCLEANFILES = Makefile.in Makefile.am

$(srcdir)/Makefile.am: $(srcdir)/Makefile.am.m4
	@rm -f $(srcdir)/Makefile.am~
	$(M4) $(srcdir)/Makefile.am.m4 > $(srcdir)/Makefile.am~
	mv -f $(srcdir)/Makefile.am~ $(srcdir)/Makefile.am
