Makefile revision bbaa8b60dd95d714741fc474adad3cf710ef4efd
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER START
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The contents of this file are subject to the terms of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Common Development and Distribution License (the "License").
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You may not use this file except in compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# or http://www.opensolaris.org/os/licensing.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# See the License for the specific language governing permissions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# When distributing Covered Code, include this CDDL HEADER in each
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# If applicable, add the following below this CDDL HEADER, with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# fields enclosed by brackets "[]" replaced with your own identifying
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# information: Portions Copyright [yyyy] [name of copyright owner]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER END
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Use is subject to license terms.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Copyright (c) 2012 by Delphix. All rights reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington# uts/common/rpcsvc/Makefile
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# This makefile installs system header files that go into
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# /usr/include/rpcsvc.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# include global definitions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinclude ../../../Makefile.master
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Protocol descriptions. Alas, the NFS protocol cannot be expressed
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# completely via rpcgen. The NLM description should go here some day.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Also, the v3 headers have been hacked so that they no longer
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# quite reflect what goes over the wire.
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterIDMAP_PROT_X= idmap_prot.x
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterRPCGEN_SRC= autofs_prot.x nlm_prot.x sm_inter.x nsm_addr.x \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(IDMAP_PROT_X)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterDERIVED_HDRS= $(RPCGEN_SRC:%.x=%.h)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterALLHDRS= $(RPCGEN_SRC) $(DERIVED_HDRS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterROOTDIRS= $(ROOT)/usr/include/rpcsvc
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterROOTHDRS= $(ALLHDRS:%=$(ROOTDIRS)/%)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterRPCGENFLAGS = -C
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosteridmap_prot.h := RPCGENFLAGS += -MN
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosternlm_prot.h := RPCGENFLAGS += -M
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostersm_inter.h := RPCGENFLAGS += -M
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosternsm_addr.h := RPCGENFLAGS += -M
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(ROOTDIRS)/%: %
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(INS.file)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster.KEEP_STATE:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# all_h permits derived headers to be built here in the uts source area
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# for the kernel to reference, without going so far as to install them.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterall_h: $(DERIVED_HDRS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinstall_h: all_h $(ROOTDIRS) $(ROOTHDRS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterclean:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(DERIVED_HDRS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterclobber: clean
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Don't check rpcgen-derived files.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostercheck:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(ROOTDIRS):
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(INS.dir)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster%.h: %.x
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RPCGEN) $(RPCGENFLAGS) -h $< -o $@
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster