1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate# with the License. 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate# and limitations under the License. 13*7c478bd9Sstevel@tonic-gate# 14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate# 20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate# 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 24*7c478bd9Sstevel@tonic-gate# 25*7c478bd9Sstevel@tonic-gate# Copyright 2003 Sun Microsystems, Inc. All rights reserved. 26*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 27*7c478bd9Sstevel@tonic-gate# 28*7c478bd9Sstevel@tonic-gate# uts/common/rpc/Makefile 29*7c478bd9Sstevel@tonic-gate# 30*7c478bd9Sstevel@tonic-gate# include global definitions 31*7c478bd9Sstevel@tonic-gateinclude ../../../Makefile.master 32*7c478bd9Sstevel@tonic-gate 33*7c478bd9Sstevel@tonic-gatei386_HDRS= 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gatesparc_HDRS= ib.h 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gateCOMMHDRS= \ 38*7c478bd9Sstevel@tonic-gateauth.h auth_des.h auth_sys.h auth_unix.h \ 39*7c478bd9Sstevel@tonic-gatebootparam.h clnt.h clnt_soc.h clnt_stat.h des_crypt.h \ 40*7c478bd9Sstevel@tonic-gatenettype.h pmap_clnt.h pmap_rmt.h \ 41*7c478bd9Sstevel@tonic-gaterac.h raw.h rpc.h rpc_com.h rpc_msg.h \ 42*7c478bd9Sstevel@tonic-gaterpcb_clnt.h rpcent.h svc.h svc_auth.h svc_soc.h \ 43*7c478bd9Sstevel@tonic-gatetrace.h types.h xdr.h rpcsec_gss.h svc_mt.h \ 44*7c478bd9Sstevel@tonic-gaterpcsys.h rpc_rdma.h 45*7c478bd9Sstevel@tonic-gate 46*7c478bd9Sstevel@tonic-gateHDRS= \ 47*7c478bd9Sstevel@tonic-gate $(COMMHDRS) \ 48*7c478bd9Sstevel@tonic-gate $($(MACH)_HDRS) 49*7c478bd9Sstevel@tonic-gate 50*7c478bd9Sstevel@tonic-gateRPC_SRC= pmap_prot.x rpcb_prot.x 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gateRPCSVC_SRC= key_prot.x rpc_sztypes.x 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gateDERIVED_FILES= key_prot.h pmap_prot.h rpcb_prot.h rpc_sztypes.h 55*7c478bd9Sstevel@tonic-gate 56*7c478bd9Sstevel@tonic-gateRPCHDRS= $(HDRS) $(RPC_SRC) $(DERIVED_FILES) 57*7c478bd9Sstevel@tonic-gate 58*7c478bd9Sstevel@tonic-gateRPCSVCHDRS= $(RPCSVC_SRC) 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gateRPCDIRS= $(ROOT)/usr/include/rpc 61*7c478bd9Sstevel@tonic-gateRPCSVCDIRS= $(ROOT)/usr/include/rpcsvc 62*7c478bd9Sstevel@tonic-gate 63*7c478bd9Sstevel@tonic-gateROOTHDRS= $(RPCHDRS:%=$(RPCDIRS)/%) $(RPCSVCHDRS:%=$(RPCSVCDIRS)/%) 64*7c478bd9Sstevel@tonic-gate 65*7c478bd9Sstevel@tonic-gate$(RPCDIRS)/%: % 66*7c478bd9Sstevel@tonic-gate $(INS.file) 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate$(RPCSVCDIRS)/%: % 69*7c478bd9Sstevel@tonic-gate $(INS.file) 70*7c478bd9Sstevel@tonic-gate 71*7c478bd9Sstevel@tonic-gate# XXX: should really check the style of the derived files as well... 72*7c478bd9Sstevel@tonic-gate# $(RPC_SRC:%.x=%.check) \ 73*7c478bd9Sstevel@tonic-gate# $(RPCSVC_SRC:%.x=%.check) 74*7c478bd9Sstevel@tonic-gate# 75*7c478bd9Sstevel@tonic-gateCHECKHDRS= $(HDRS:%.h=%.check) 76*7c478bd9Sstevel@tonic-gate 77*7c478bd9Sstevel@tonic-gate.KEEP_STATE: 78*7c478bd9Sstevel@tonic-gate 79*7c478bd9Sstevel@tonic-gate.PARALLEL: $(CHECKHDRS) 80*7c478bd9Sstevel@tonic-gate 81*7c478bd9Sstevel@tonic-gateall: all_h 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gateinstall_h: all_h $(RPCDIRS) $(RPCSVCDIRS) $(ROOTHDRS) 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate# all_h permits derived headers to be built here in the uts source area 86*7c478bd9Sstevel@tonic-gate# for the kernel to reference, without going so far as to install them. 87*7c478bd9Sstevel@tonic-gate# 88*7c478bd9Sstevel@tonic-gateall_h: $(DERIVED_FILES) 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gateclean: 91*7c478bd9Sstevel@tonic-gate $(RM) $(DERIVED_FILES) 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate$(RPCDIRS): 94*7c478bd9Sstevel@tonic-gate $(INS.dir) 95*7c478bd9Sstevel@tonic-gate 96*7c478bd9Sstevel@tonic-gate$(RPCSVCDIRS): 97*7c478bd9Sstevel@tonic-gate $(INS.dir) 98*7c478bd9Sstevel@tonic-gate 99*7c478bd9Sstevel@tonic-gatekey_prot.h: key_prot.x 100*7c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h key_prot.x > $@ 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gatepmap_prot.h: pmap_prot.x 103*7c478bd9Sstevel@tonic-gate $(RPCGEN) -h pmap_prot.x > $@ 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate# EXPORT DELETE START 106*7c478bd9Sstevel@tonic-gate# Special target to clean up the source tree for export distribution 107*7c478bd9Sstevel@tonic-gate# Warning: This target changes the source tree 108*7c478bd9Sstevel@tonic-gateEXPORT_SRC: 109*7c478bd9Sstevel@tonic-gate $(RM) Makefile+ sec_gss/rpcsec_gss_misc.c+ 110*7c478bd9Sstevel@tonic-gate $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 111*7c478bd9Sstevel@tonic-gate < Makefile > Makefile+ 112*7c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 113*7c478bd9Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 114*7c478bd9Sstevel@tonic-gate < sec_gss/rpcsec_gss_misc.c > sec_gss/rpcsec_gss_misc.c+ 115*7c478bd9Sstevel@tonic-gate $(MV) sec_gss/rpcsec_gss_misc.c+ sec_gss/rpcsec_gss_misc.c 116*7c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile sec_gss/rpcsec_gss_misc.c 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate# EXPORT DELETE END 119*7c478bd9Sstevel@tonic-gate 120*7c478bd9Sstevel@tonic-gate# The sed stuff is a workaround for an rpcgen bug (bugid 1128007). 121*7c478bd9Sstevel@tonic-gaterpc_sztypes.h: rpc_sztypes.x 122*7c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h rpc_sztypes.x > rpc_sztypes.tmp 123*7c478bd9Sstevel@tonic-gate sed -e s/ulonglong/u_longlong/ rpc_sztypes.tmp > $@ 124*7c478bd9Sstevel@tonic-gate rm rpc_sztypes.tmp 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gaterpcb_prot.h: rpcb_prot.x 127*7c478bd9Sstevel@tonic-gate $(RPCGEN) -h rpcb_prot.x > $@ 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gatecheck: $(CHECKHDRS) 130