xref: /titanic_51/usr/src/uts/common/gssapi/Makefile (revision 260e9a87725c090ba5835b1f9f0b62fa2f96036f)
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# Copyright 2012 Milan Jurik. All rights reserved.
27# Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
28#
29# uts/common/gssd/Makefile
30#
31# include global definitions
32include ../../../Makefile.master
33
34
35INSTALLED_HDRS=	gssapi.h gssapi_ext.h gssapi_krb5.h
36PRIVATE_HDRS=	gssd.x gssd_prot.h
37HDRS=	$(INSTALLED_HDRS) $(PRIVATE_HDRS)
38
39DERIVED_FILES=	gssd_prot.h gssd_prot.c gssd_xdr.c
40
41GSSDDIRS= $(ROOT)/usr/include/gssapi
42
43GSSDHDRS= $(INSTALLED_HDRS:%=$(GSSDDIRS)/%)
44
45CHECKHDRS= $(INSTALLED_HDRS:%.h=%.check)
46
47# gssd_prot.h is rpcgen'ed and can never be made to pass
48# cstyle so it is unchecked
49UNCHECKED_HDRS=	gss_prot.h
50
51# install rules
52$(GSSDDIRS)/%: %
53	$(INS.file)
54
55$(GSSDDIRS)/%: mechs/krb5/include/%
56	$(INS.file)
57
58# This is 3rd party code, so just skip hdrchk.
59gssapi_krb5.check:
60
61.KEEP_STATE:
62
63.PARALLEL: $(CHECKHDRS)
64
65install_h: all_h $(GSSDDIRS) $(GSSDHDRS)
66
67all_h: $(DERIVED_FILES)
68
69$(GSSDDIRS):
70	$(INS.dir)
71
72gssd_prot.h:	gssd.x
73	$(RM) $@
74	$(RPCGEN) -CM -h gssd.x > $@
75
76gssd_prot.c:   gssd.x
77	$(RM) $@
78
79#	Over ticotsord we do zero retries. Over ticlts we do 5
80#	retries. Hence, a default of 25 seconds for ticotsord is
81#	too little. 125 = 25 + 6 * MAXTIMO (from clnt_clts.c).
82#
83	$(RPCGEN) -M -l gssd.x | sed -e \
84		's;#include..gssd.h.;#include "gssd_prot.h";' \
85		| sed 's/TIMEOUT/gssd_timeout/' \
86		| sed 's/{ 25, 0 }/{ 125, 0 }/' \
87		| grep -v stdlib.h | grep -v stdio.h > $@
88
89gssd_xdr.c:    gssd.x
90	$(RM) $@
91	$(RPCGEN) -M -c gssd.x | sed -e \
92		's;#include..gssd.h.;#include "gssd_prot.h";' > $@
93
94check:	$(CHECKHDRS)
95
96clean:
97	$(RM) $(DERIVED_FILES)
98
99clobber: clean
100