Add option to specify directory to search for credentials cache files
[nfs-utils.git] / utils / gssd / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 man8_MANS       = gssd.man svcgssd.man
4
5 RPCPREFIX       = rpc.
6 KPREFIX         = @kprefix@
7 sbin_PREFIXED   = gssd svcgssd
8 sbin_PROGRAMS   = $(sbin_PREFIXED) gss_clnt_send_err
9 sbin_SCRIPTS    = gss_destroy_creds
10
11 EXTRA_DIST = \
12         gss_destroy_creds \
13         $(man8_MANS)
14
15 COMMON_SRCS = \
16         context.c \
17         context_mit.c \
18         context_heimdal.c \
19         context_spkm3.c \
20         gss_util.c \
21         gss_oids.c \
22         err_util.c \
23         \
24         context.h \
25         err_util.h \
26         gss_oids.h \
27         gss_util.h
28
29 gssd_SOURCES = \
30         $(COMMON_SRCS) \
31         gssd.c \
32         gssd_main_loop.c \
33         gssd_proc.c \
34         krb5_util.c \
35         \
36         gssd.h \
37         krb5_util.h \
38         write_bytes.h
39
40 gssd_LDADD = -lrpcsecgss -lgssapi -ldl $(KRBLIBS)
41 gssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib
42
43 gssd_CPPFLAGS = -I$(top_srcdir)/support/rpc/include \
44               $(AM_CPPFLAGS) $(CPPFLAGS)
45                 
46 gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
47               $(KRBCFLAGS)
48
49 svcgssd_SOURCES = \
50         $(COMMON_SRCS) \
51         cacheio.c \
52         svcgssd.c \
53         svcgssd_main_loop.c \
54         svcgssd_mech2file.c \
55         svcgssd_proc.c \
56         \
57         cacheio.h \
58         svcgssd.h
59
60 svcgssd_LDADD = \
61         ../../support/nfs/libnfs.a \
62         $(RPCSECGSS_LIBS) -lnfsidmap \
63         $(KRBLIBS)
64
65 svcgssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib
66
67 svcgssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
68                  $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
69
70 gss_clnt_send_err_SOURCES = gss_clnt_send_err.c
71
72 MAINTAINERCLEANFILES = Makefile.in
73
74 #######################################################################
75 # The following allows the current practice of having
76 # daemons renamed during the install to include RPCPREFIX
77 # and the KPREFIX
78 # This could all be done much easier with program_transform_name
79 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
80 # but that also renames the man pages, which the current
81 # practice does not do.
82 install-exec-hook:
83         (cd $(DESTDIR)$(sbindir) && \
84           for p in $(sbin_PREFIXED); do \
85             mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
86           done)
87 uninstall-hook:
88         (cd $(DESTDIR)$(sbindir) && \
89           for p in $(sbin_PREFIXED); do \
90             rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
91           done)
92
93
94 # XXX This makes some assumptions about what automake does.
95 # XXX But there is no install-man-hook or install-man-local.
96 install-man: install-man8 install-man-links
97 uninstall-man: uninstall-man8 uninstall-man-links
98
99 install-man-links:
100         (cd $(DESTDIR)$(man8dir) && \
101           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
102             inst=`echo $$m | sed -e 's/man$$/8/'`; \
103             rm -f $(RPCPREFIX)$$inst ; \
104             $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
105           done)
106
107 uninstall-man-links:
108         (cd $(DESTDIR)$(man8dir) && \
109           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
110             inst=`echo $$m | sed -e 's/man$$/8/'`; \
111             rm -f $(RPCPREFIX)$$inst ; \
112           done)
113