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