]> git.decadent.org.uk Git - nfs-utils.git/blob - support/export/Makefile.am
7a6a441c6c2f508135609a1b60e583c557dcf182
[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      = mount.x
12
13 noinst_LIBRARIES = libexport.a
14 libexport_a_SOURCES = client.c export.c hostname.c nfsctl.c rmtab.c \
15                       xtab.c mount_clnt.c mount_xdr.c
16 BUILT_SOURCES   = $(GENFILES)
17
18 noinst_HEADERS = mount.h
19
20 dist-hook:
21         for f in $(GENFILES); do \
22           rm ${distdir}/$$f; \
23         done
24
25 $(RPCGEN):
26         make -C $(top_srcdir)/tools/rpcgen all
27
28 $(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN)
29         test -f $@ && rm -rf $@ || true
30         $(RPCGEN) -l -o $@ $<
31
32 $(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
33         test -f $@ && rm -rf $@ || true
34         $(RPCGEN) -c -o $@ $<
35
36 $(GENFILES_H): %.h: %.x $(RPCGEN)
37         test -f $@ && rm -rf $@ || true
38         $(RPCGEN) -h -o $@ $<
39         rm -f $(top_builddir)/support/include/mount.h
40         $(LN_S) ../export/mount.h $(top_builddir)/support/include/mount.h
41
42 MAINTAINERCLEANFILES = Makefile.in
43
44 CLEANFILES = $(GENFILES) $(top_builddir)/support/include/mount.h