xref: /titanic_41/usr/src/uts/common/rpcsvc/Makefile (revision 63360950109af2ce85a962ca61f40b8782f11100)
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#ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2006 Sun Microsystems, Inc.
25# All rights reserved.  Use is subject to license terms.
26#
27# uts/common/rpcsvc/Makefile
28#	This makefile installs system header files that go into
29#	/usr/include/rpcsvc.
30#
31# include global definitions
32include ../../../Makefile.master
33
34# Protocol descriptions.  Alas, the NFS protocol cannot be expressed
35# completely via rpcgen.  The NLM description should go here some day.
36# Also, the v3 headers have been hacked so that they no longer
37# quite reflect what goes over the wire.
38RPCGEN_SRC=	autofs_prot.x sm_inter.x nsm_addr.x
39
40DERIVED_HDRS=	$(RPCGEN_SRC:%.x=%.h)
41
42ALLHDRS=	$(RPCGEN_SRC) $(DERIVED_HDRS)
43
44ROOTDIRS=	$(ROOT)/usr/include/rpcsvc
45
46ROOTHDRS=	$(ALLHDRS:%=$(ROOTDIRS)/%)
47
48$(ROOTDIRS)/%: %
49	$(INS.file)
50
51.KEEP_STATE:
52
53# all_h permits derived headers to be built here in the uts source area
54# for the kernel to reference, without going so far as to install them.
55#
56all_h: $(DERIVED_HDRS)
57
58install_h: all_h $(ROOTDIRS) $(ROOTHDRS)
59
60clean:
61	$(RM) $(DERIVED_HDRS)
62
63clobber: clean
64
65# Don't check rpcgen-derived files.
66check:
67
68$(ROOTDIRS):
69	$(INS.dir)
70
71%.h: %.x
72	$(RPCGEN) -C -h $< -o $@
73
74