]> git.decadent.org.uk Git - nfs-utils.git/blob - support/export/Makefile.am
Imported Debian patch 1.0.8-6
[nfs-utils.git] / support / export / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 RPCGEN          = $(top_builddir)/tools/rpcgen/rpcgen
4
5 GENFILES_CLNT   = mount_clnt.c
6 GENFILES_XDR    = mount_xdr.c
7 GENFILES_H      = mount.h
8
9 GENFILES        = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H)
10
11 EXTRA_DIST      = \
12         mount.x \
13         \
14         keys.c
15
16 noinst_LIBRARIES = libexport.a
17 libexport_a_SOURCES = client.c export.c hostname.c nfsctl.c rmtab.c \
18                       xtab.c mount_clnt.c mount_xdr.c
19 BUILT_SOURCES   = $(GENFILES)
20
21 noinst_HEADERS = mount.h
22
23 dist-hook:
24         for f in $(GENFILES); do \
25           rm ${distdir}/$$f; \
26         done
27
28 $(RPCGEN):
29         make -C $(top_srcdir)/tools/rpcgen all
30
31 $(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN)
32         test -f $@ && rm -rf $@ || true
33         $(RPCGEN) -l -o $@ $<
34
35 $(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
36         test -f $@ && rm -rf $@ || true
37         $(RPCGEN) -c -o $@ $<
38
39 $(GENFILES_H): %.h: %.x $(RPCGEN)
40         test -f $@ && rm -rf $@ || true
41         $(RPCGEN) -h -o $@ $<
42         $(LN_S) ../export/mount.h $(top_builddir)/support/include/mount.h
43
44 MAINTAINERCLEANFILES = Makefile.in
45
46 CLEANFILES = $(GENFILES) $(top_builddir)/support/include/mount.h