]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/gssd/Makefile.am
6b01a7266a5387672be5d1a2cebd9837a6098e11
[nfs-utils.git] / utils / gssd / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 man8_MANS       = gssd.man
4
5 RPCPREFIX       = rpc.
6 KPREFIX         = @kprefix@
7 sbin_PROGRAMS   = gssd
8
9 EXTRA_DIST = \
10         $(man8_MANS) \
11         gss_clnt_send_err.c \
12         gss_destroy_creds
13
14 gssd_SOURCES = \
15         context.c \
16         context_heimdal.c \
17         err_util.c \
18         gss_oids.c \
19         gss_util.c \
20         gssd.c \
21         gssd_main_loop.c \
22         gssd_proc.c \
23         krb5_util.c \
24         \
25         context.h \
26         err_util.h \
27         gss_oids.h \
28         gss_util.h \
29         gssd.h \
30         krb5_util.h \
31         write_bytes.h
32
33 gssd_LDADD = -lrpcsecgss -lgssapi -ldl $(KRBLIBS)
34 gssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib
35
36 gssd_CPPFLAGS = -I$(top_srcdir)/support/rpc/include \
37               $(AM_CPPFLAGS) $(CPPFLAGS)
38                 
39 gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
40               $(KRBCFLAGS)
41
42 MAINTAINERCLEANFILES = Makefile.in
43
44 #######################################################################
45 # The following allows the current practice of having
46 # daemons renamed during the install to include RPCPREFIX
47 # and the KPREFIX
48 # This could all be done much easier with program_transform_name
49 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
50 # but that also renames the man pages, which the current
51 # practice does not do.
52 install-exec-hook:
53         (cd $(DESTDIR)$(sbindir) && \
54           for p in $(sbin_PROGRAMS); do \
55             mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
56           done)
57 uninstall-hook:
58         (cd $(DESTDIR)$(sbindir) && \
59           for p in $(sbin_PROGRAMS); do \
60             rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
61           done)
62
63
64 # XXX This makes some assumptions about what automake does.
65 # XXX But there is no install-man-hook or install-man-local.
66 install-man: install-man8 install-man-links
67 uninstall-man: uninstall-man8 uninstall-man-links
68
69 install-man-links:
70         (cd $(DESTDIR)$(man8dir) && \
71           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
72             inst=`echo $$m | sed -e 's/man$$/8/'`; \
73             rm -f $(RPCPREFIX)$$inst ; \
74             $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
75           done)
76
77 uninstall-man-links:
78         (cd $(DESTDIR)$(man8dir) && \
79           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
80             inst=`echo $$m | sed -e 's/man$$/8/'`; \
81             rm -f $(RPCPREFIX)$$inst ; \
82           done)
83