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