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