Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / uts / common / rpcsvc / Makefile
bloba56604fd1c55045f31fa591e9bb93295f849b236
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright (c) 2012 by Delphix. All rights reserved.
27 # uts/common/rpcsvc/Makefile
28 # This makefile installs system header files that go into
29 # /usr/include/rpcsvc.
31 # include global definitions
32 include ../../../Makefile.master
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.
38 IDMAP_PROT_X= idmap_prot.x
39 RPCGEN_SRC= nlm_prot.x sm_inter.x nsm_addr.x $(IDMAP_PROT_X)
41 DERIVED_HDRS= $(RPCGEN_SRC:%.x=%.h)
43 ALLHDRS= $(RPCGEN_SRC) $(DERIVED_HDRS)
45 ROOTDIRS= $(ROOT)/usr/include/rpcsvc
47 ROOTHDRS= $(ALLHDRS:%=$(ROOTDIRS)/%)
49 RPCGENFLAGS = -C
50 idmap_prot.h := RPCGENFLAGS += -MN
51 nlm_prot.h := RPCGENFLAGS += -M
52 sm_inter.h := RPCGENFLAGS += -M
53 nsm_addr.h := RPCGENFLAGS += -M
55 $(ROOTDIRS)/%: %
56 $(INS.file)
58 .KEEP_STATE:
60 # all_h permits derived headers to be built here in the uts source area
61 # for the kernel to reference, without going so far as to install them.
63 all_h: $(DERIVED_HDRS)
65 install_h: all_h $(ROOTDIRS) $(ROOTHDRS)
67 clean:
68 $(RM) $(DERIVED_HDRS)
70 clobber: clean
72 # Don't check rpcgen-derived files.
73 check:
75 $(ROOTDIRS):
76 $(INS.dir)
78 %.h: %.x
79 $(RPCGEN) $(RPCGENFLAGS) -h $< -o $@