xref: /titanic_44/usr/src/uts/common/rpcsvc/Makefile (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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#
229b214d32SJordan Brown# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
239b214d32SJordan Brown# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
25*bbaa8b60SDan Kruchinin# Copyright (c) 2012 by Delphix. All rights reserved.
26*bbaa8b60SDan Kruchinin#
277c478bd9Sstevel@tonic-gate# uts/common/rpcsvc/Makefile
287c478bd9Sstevel@tonic-gate#	This makefile installs system header files that go into
297c478bd9Sstevel@tonic-gate#	/usr/include/rpcsvc.
307c478bd9Sstevel@tonic-gate#
317c478bd9Sstevel@tonic-gate# include global definitions
327c478bd9Sstevel@tonic-gateinclude ../../../Makefile.master
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gate# Protocol descriptions.  Alas, the NFS protocol cannot be expressed
357c478bd9Sstevel@tonic-gate# completely via rpcgen.  The NLM description should go here some day.
367c478bd9Sstevel@tonic-gate# Also, the v3 headers have been hacked so that they no longer
377c478bd9Sstevel@tonic-gate# quite reflect what goes over the wire.
389b214d32SJordan BrownIDMAP_PROT_X=	idmap_prot.x
39*bbaa8b60SDan KruchininRPCGEN_SRC=	autofs_prot.x nlm_prot.x sm_inter.x nsm_addr.x \
40*bbaa8b60SDan Kruchinin		$(IDMAP_PROT_X)
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gateDERIVED_HDRS=	$(RPCGEN_SRC:%.x=%.h)
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateALLHDRS=	$(RPCGEN_SRC) $(DERIVED_HDRS)
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gateROOTDIRS=	$(ROOT)/usr/include/rpcsvc
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gateROOTHDRS=	$(ALLHDRS:%=$(ROOTDIRS)/%)
497c478bd9Sstevel@tonic-gate
50*bbaa8b60SDan KruchininRPCGENFLAGS = -C
51*bbaa8b60SDan Kruchininidmap_prot.h :=	RPCGENFLAGS += -MN
52*bbaa8b60SDan Kruchininnlm_prot.h :=	RPCGENFLAGS += -M
53*bbaa8b60SDan Kruchininsm_inter.h :=	RPCGENFLAGS += -M
54*bbaa8b60SDan Kruchininnsm_addr.h :=	RPCGENFLAGS += -M
55*bbaa8b60SDan Kruchinin
567c478bd9Sstevel@tonic-gate$(ROOTDIRS)/%: %
577c478bd9Sstevel@tonic-gate	$(INS.file)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gate.KEEP_STATE:
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gate# all_h permits derived headers to be built here in the uts source area
627c478bd9Sstevel@tonic-gate# for the kernel to reference, without going so far as to install them.
637c478bd9Sstevel@tonic-gate#
647c478bd9Sstevel@tonic-gateall_h: $(DERIVED_HDRS)
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateinstall_h: all_h $(ROOTDIRS) $(ROOTHDRS)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateclean:
697c478bd9Sstevel@tonic-gate	$(RM) $(DERIVED_HDRS)
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateclobber: clean
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate# Don't check rpcgen-derived files.
747c478bd9Sstevel@tonic-gatecheck:
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate$(ROOTDIRS):
777c478bd9Sstevel@tonic-gate	$(INS.dir)
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate%.h: %.x
80*bbaa8b60SDan Kruchinin	$(RPCGEN) $(RPCGENFLAGS) -h $< -o $@
81