xref: /illumos-gate/usr/src/uts/common/gssapi/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright (c) 1989,1997,1999 by Sun Microsystems, Inc.
24# All rights reserved.
25#
26#pragma ident	"%Z%%M%	%I%	%E% SMI"
27#
28# uts/common/gssd/Makefile
29#
30# include global definitions
31include ../../../Makefile.master
32
33
34INSTALLED_HDRS=	gssapi.h gssapi_ext.h
35PRIVATE_HDRS=	gssd.x gssd_prot.h
36HDRS=	$(INSTALLED_HDRS) $(PRIVATE_HDRS)
37
38DERIVED_FILES=	gssd_prot.h gssd_prot.c gssd_xdr.c
39
40GSSDDIRS= $(ROOT)/usr/include/gssapi
41
42GSSDHDRS= $(INSTALLED_HDRS:%=$(GSSDDIRS)/%)
43
44CHECKHDRS= $(INSTALLED_HDRS:%.h=%.check)
45
46# gssd_prot.h is rpcgen'ed and can never be made to pass
47# cstyle so it is unchecked
48UNCHECKED_HDRS=	gss_prot.h
49
50# install rule
51$(GSSDDIRS)/%: %
52	$(INS.file)
53
54.KEEP_STATE:
55
56.PARALLEL: $(CHECKHDRS)
57
58install_h: all_h $(GSSDDIRS) $(GSSDHDRS)
59
60all_h: $(DERIVED_FILES)
61
62$(GSSDDIRS):
63	$(INS.dir)
64
65gssd_prot.h:	gssd.x
66	$(RM) $@
67	$(RPCGEN) -M -h gssd.x > $@
68
69gssd_prot.c:   gssd.x
70	$(RM) $@
71
72#	Over ticotsord we do zero retries. Over ticlts we do 5
73#	retries. Hence, a default of 25 seconds for ticotsord is
74#	too little. 125 = 25 + 6 * MAXTIMO (from clnt_clts.c).
75#
76	$(RPCGEN) -M -l gssd.x | sed -e \
77		's;#include..gssd.h.;#include "gssd_prot.h";' \
78		| sed 's/TIMEOUT/gssd_timeout/' \
79		| sed 's/{ 25, 0 }/{ 125, 0 }/' \
80		| grep -v stdlib.h | grep -v stdio.h > $@
81
82gssd_xdr.c:    gssd.x
83	$(RM) $@
84	$(RPCGEN) -M -c gssd.x | sed -e \
85		's;#include..gssd.h.;#include "gssd_prot.h";' > $@
86
87check:	$(CHECKHDRS)
88
89clean:
90	$(RM) $(DERIVED_FILES)
91
92# EXPORT DELETE START
93# Special target to clean up the source tree for export distribution
94# Warning: This target changes the source tree
95EXPORT_SRC:
96	$(RM) Makefile+ gssd.x+ gssd_clnt_stubs.c+
97	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
98		< gssd.x > gssd.x+
99	$(MV) gssd.x+ gssd.x
100	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
101		< gssd_clnt_stubs.c > gssd_clnt_stubs.c+
102	$(MV) gssd_clnt_stubs.c+ gssd_clnt_stubs.c
103	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
104		< Makefile > Makefile+
105	$(MV) Makefile+ Makefile
106	$(CHMOD) 444 Makefile gssd.x gssd_clnt_stubs.c
107
108# CRYPT DELETE START
109# Special target to clean up the source tree for domestic distribution
110# Warning: This target changes the source tree
111
112CRYPT_SRC:
113	$(RM) Makefile+ gssd_clnt_stubs.c+
114	sed  -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
115		< Makefile > Makefile+
116	$(MV) Makefile+ Makefile
117	sed -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
118		< gssd_clnt_stubs.c > gssd_clnt_stubs.c+
119	$(MV) gssd_clnt_stubs.c+ gssd_clnt_stubs.c
120	$(CHMOD) 444 Makefile gssd_clnt_stubs.c
121
122# CRYPT DELETE END
123# EXPORT DELETE END
124