xref: /titanic_41/usr/src/uts/common/rpcsvc/Makefile (revision e802abbda8c322f24d47835734f4a793ef15ddc8)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# uts/common/rpcsvc/Makefile
26#	This makefile installs system header files that go into
27#	/usr/include/rpcsvc.
28#
29# include global definitions
30include ../../../Makefile.master
31
32# Protocol descriptions.  Alas, the NFS protocol cannot be expressed
33# completely via rpcgen.  The NLM description should go here some day.
34# Also, the v3 headers have been hacked so that they no longer
35# quite reflect what goes over the wire.
36IDMAP_PROT_X=	idmap_prot.x
37RPCGEN_SRC=	autofs_prot.x sm_inter.x nsm_addr.x $(IDMAP_PROT_X)
38
39DERIVED_HDRS=	$(RPCGEN_SRC:%.x=%.h)
40
41ALLHDRS=	$(RPCGEN_SRC) $(DERIVED_HDRS)
42
43ROOTDIRS=	$(ROOT)/usr/include/rpcsvc
44
45ROOTHDRS=	$(ALLHDRS:%=$(ROOTDIRS)/%)
46
47$(ROOTDIRS)/%: %
48	$(INS.file)
49
50.KEEP_STATE:
51
52# all_h permits derived headers to be built here in the uts source area
53# for the kernel to reference, without going so far as to install them.
54#
55all_h: $(DERIVED_HDRS)
56
57install_h: all_h $(ROOTDIRS) $(ROOTHDRS)
58
59clean:
60	$(RM) $(DERIVED_HDRS)
61
62clobber: clean
63
64# Don't check rpcgen-derived files.
65check:
66
67$(ROOTDIRS):
68	$(INS.dir)
69
70%.h: %.x
71	$(RPCGEN) -C -h $< -o $@
72
73idmap_prot.h:	$(IDMAP_PROT_X)
74	$(RPCGEN) -CMNh -o $@ $(IDMAP_PROT_X)
75