Use nfslib versions of cacheio functions
[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_lucid.c \
20         context_spkm3.c \
21         gss_util.c \
22         gss_oids.c \
23         err_util.c \
24         \
25         context.h \
26         err_util.h \
27         gss_oids.h \
28         gss_util.h
29
30 gssd_SOURCES = \
31         $(COMMON_SRCS) \
32         gssd.c \
33         gssd_main_loop.c \
34         gssd_proc.c \
35         krb5_util.c \
36         \
37         gssd.h \
38         krb5_util.h \
39         write_bytes.h
40
41 gssd_LDADD = $(RPCSECGSS_LIBS) $(KRBLIBS)
42 gssd_LDFLAGS = $(KRBLDFLAGS)
43
44 gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
45               $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
46
47 svcgssd_SOURCES = \
48         $(COMMON_SRCS) \
49         svcgssd.c \
50         svcgssd_main_loop.c \
51         svcgssd_mech2file.c \
52         svcgssd_proc.c \
53         \
54         svcgssd.h
55
56 svcgssd_LDADD = \
57         ../../support/nfs/libnfs.a \
58         $(RPCSECGSS_LIBS) -lnfsidmap \
59         $(KRBLIBS)
60
61 svcgssd_LDFLAGS = $(KRBLDFLAGS)
62
63 svcgssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
64                  $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
65
66 gss_clnt_send_err_SOURCES = gss_clnt_send_err.c
67
68 gss_clnt_send_err_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
69                  $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
70
71 MAINTAINERCLEANFILES = Makefile.in
72
73 #######################################################################
74 # The following allows the current practice of having
75 # daemons renamed during the install to include RPCPREFIX
76 # and the KPREFIX
77 # This could all be done much easier with program_transform_name
78 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
79 # but that also renames the man pages, which the current
80 # practice does not do.
81 install-exec-hook:
82         (cd $(DESTDIR)$(sbindir) && \
83           for p in $(sbin_PREFIXED); do \
84             mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
85           done)
86 uninstall-hook:
87         (cd $(DESTDIR)$(sbindir) && \
88           for p in $(sbin_PREFIXED); do \
89             rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
90           done)
91
92
93 # XXX This makes some assumptions about what automake does.
94 # XXX But there is no install-man-hook or install-man-local.
95 install-man: install-man8 install-man-links
96 uninstall-man: uninstall-man8 uninstall-man-links
97
98 install-man-links:
99         (cd $(DESTDIR)$(man8dir) && \
100           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
101             inst=`echo $$m | sed -e 's/man$$/8/'`; \
102             rm -f $(RPCPREFIX)$$inst ; \
103             $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
104           done)
105
106 uninstall-man-links:
107         (cd $(DESTDIR)$(man8dir) && \
108           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
109             inst=`echo $$m | sed -e 's/man$$/8/'`; \
110             rm -f $(RPCPREFIX)$$inst ; \
111           done)
112