xref: /illumos-gate/usr/src/uts/common/rpcsvc/Makefile (revision 9b214d32697277d03ed2e5d98c4a7bfef16dcf4d)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
51cc55349Srmesta# Common Development and Distribution License (the "License").
61cc55349Srmesta# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*9b214d32SJordan Brown# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*9b214d32SJordan Brown# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# uts/common/rpcsvc/Makefile
267c478bd9Sstevel@tonic-gate#	This makefile installs system header files that go into
277c478bd9Sstevel@tonic-gate#	/usr/include/rpcsvc.
287c478bd9Sstevel@tonic-gate#
297c478bd9Sstevel@tonic-gate# include global definitions
307c478bd9Sstevel@tonic-gateinclude ../../../Makefile.master
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gate# Protocol descriptions.  Alas, the NFS protocol cannot be expressed
337c478bd9Sstevel@tonic-gate# completely via rpcgen.  The NLM description should go here some day.
347c478bd9Sstevel@tonic-gate# Also, the v3 headers have been hacked so that they no longer
357c478bd9Sstevel@tonic-gate# quite reflect what goes over the wire.
36*9b214d32SJordan BrownIDMAP_PROT_X=	idmap_prot.x
37*9b214d32SJordan BrownRPCGEN_SRC=	autofs_prot.x sm_inter.x nsm_addr.x $(IDMAP_PROT_X)
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateDERIVED_HDRS=	$(RPCGEN_SRC:%.x=%.h)
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gateALLHDRS=	$(RPCGEN_SRC) $(DERIVED_HDRS)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateROOTDIRS=	$(ROOT)/usr/include/rpcsvc
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateROOTHDRS=	$(ALLHDRS:%=$(ROOTDIRS)/%)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gate$(ROOTDIRS)/%: %
487c478bd9Sstevel@tonic-gate	$(INS.file)
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gate.KEEP_STATE:
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gate# all_h permits derived headers to be built here in the uts source area
537c478bd9Sstevel@tonic-gate# for the kernel to reference, without going so far as to install them.
547c478bd9Sstevel@tonic-gate#
557c478bd9Sstevel@tonic-gateall_h: $(DERIVED_HDRS)
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateinstall_h: all_h $(ROOTDIRS) $(ROOTHDRS)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gateclean:
607c478bd9Sstevel@tonic-gate	$(RM) $(DERIVED_HDRS)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateclobber: clean
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate# Don't check rpcgen-derived files.
657c478bd9Sstevel@tonic-gatecheck:
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gate$(ROOTDIRS):
687c478bd9Sstevel@tonic-gate	$(INS.dir)
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate%.h: %.x
717c478bd9Sstevel@tonic-gate	$(RPCGEN) -C -h $< -o $@
727c478bd9Sstevel@tonic-gate
73*9b214d32SJordan Brownidmap_prot.h:	$(IDMAP_PROT_X)
74*9b214d32SJordan Brown	$(RPCGEN) -CMNh -o $@ $(IDMAP_PROT_X)
75