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