xref: /titanic_51/usr/src/uts/common/rpc/Makefile (revision 3c7284bd3243d42a710edac3a15f6019b4c849be)
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#
24# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# uts/common/rpc/Makefile
28#
29# include global definitions
30include ../../../Makefile.master
31
32i386_HDRS=
33
34sparc_HDRS= ib.h
35
36COMMHDRS= \
37auth.h		auth_des.h	auth_sys.h	auth_unix.h \
38bootparam.h	clnt.h		clnt_soc.h	clnt_stat.h	des_crypt.h \
39nettype.h	pmap_clnt.h	pmap_rmt.h \
40raw.h		rpc.h		rpc_com.h	rpc_msg.h \
41rpcb_clnt.h	rpcent.h	svc.h		svc_auth.h	svc_soc.h \
42types.h		xdr.h		rpcsec_gss.h	svc_mt.h \
43rpcsys.h	rpc_rdma.h
44
45HDRS=			\
46	$(COMMHDRS)	\
47	$($(MACH)_HDRS)
48
49RPC_SRC=	pmap_prot.x	rpcb_prot.x
50
51RPCSVC_SRC=	key_prot.x	rpc_sztypes.x
52
53DERIVED_FILES=	key_prot.h	pmap_prot.h	rpcb_prot.h	rpc_sztypes.h
54
55RPCHDRS=	$(HDRS)	$(RPC_SRC) $(DERIVED_FILES)
56
57RPCSVCHDRS=	$(RPCSVC_SRC)
58
59RPCDIRS=	$(ROOT)/usr/include/rpc
60RPCSVCDIRS=	$(ROOT)/usr/include/rpcsvc
61
62ROOTHDRS= $(RPCHDRS:%=$(RPCDIRS)/%) $(RPCSVCHDRS:%=$(RPCSVCDIRS)/%)
63
64$(RPCDIRS)/%: %
65	$(INS.file)
66
67$(RPCSVCDIRS)/%: %
68	$(INS.file)
69
70# XXX: should really check the style of the derived files as well...
71#	$(RPC_SRC:%.x=%.check) \
72#	$(RPCSVC_SRC:%.x=%.check)
73#
74CHECKHDRS= $(HDRS:%.h=%.check)
75
76.KEEP_STATE:
77
78.PARALLEL: $(CHECKHDRS)
79
80all: all_h
81
82install_h: all_h $(RPCDIRS) $(RPCSVCDIRS) $(ROOTHDRS)
83
84# all_h permits derived headers to be built here in the uts source area
85# for the kernel to reference, without going so far as to install them.
86#
87all_h: $(DERIVED_FILES)
88
89clean:
90	$(RM) $(DERIVED_FILES)
91
92clobber: clean
93
94$(RPCDIRS):
95	$(INS.dir)
96
97$(RPCSVCDIRS):
98	$(INS.dir)
99
100key_prot.h: key_prot.x
101	$(RPCGEN) -C -h key_prot.x > $@
102
103pmap_prot.h: pmap_prot.x
104	$(RPCGEN) -h pmap_prot.x > $@
105
106rpc_sztypes.h: rpc_sztypes.x
107	$(RPCGEN) -C -h rpc_sztypes.x > $@
108
109rpcb_prot.h: rpcb_prot.x
110	$(RPCGEN) -h rpcb_prot.x > $@
111
112check:	$(CHECKHDRS)
113