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