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