Home | History | Annotate | Download | only in nfs
      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 (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 #
     22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 # 
     25 # uts/common/nfs/Makefile
     26 #
     27 # include global definitions
     28 #
     29 include ../../../Makefile.master
     30 
     31 
     32 HDRS=	export.h		\
     33 	lm.h			\
     34 	mount.h			\
     35 	nfs.h			\
     36 	nfssys.h		\
     37 	nfs_acl.h		\
     38 	nfs_clnt.h		\
     39 	nfs_cmd.h		\
     40 	nfs_log.h		\
     41 	nfs_sec.h		\
     42 	nfs4.h			\
     43 	nfs4_attr.h		\
     44 	nfs4_clnt.h		\
     45 	rnode.h			\
     46 	rnode4.h		\
     47 	nfs4_kprot.h		\
     48 	nfs4_db_impl.h		\
     49 	nfs4_idmap_impl.h	\
     50 	nfsid_map.h		\
     51 	auth.h			\
     52 	nfs4_ext_defs.h		\
     53 	nfs41_kprot.h		\
     54 	nfs_serv_inst.h		\
     55 	nfs4_pnfs.h		\
     56 	nfs41_sessions.h	\
     57 	nfs4_clnt_impl.h	\
     58 	nfs41_fhtype.h		\
     59 	nfs41_filehandle.h	\
     60 	ds_filehandle.h		\
     61 	nfs4_attrmap.h		\
     62 	nfs4_srv_readdir.h	\
     63 	nfs4_srv_attr.h		\
     64 	mds_state.h		\
     65 	ds.h			\
     66 	ctl_mds_clnt.h		\
     67 	range.h			\
     68 	range_impl.h		\
     69 	nnode.h			\
     70 	nnode_impl.h		\
     71 	nnode_vn.h		\
     72 	nnode_proxy.h		\
     73 	spe.h			\
     74 	spe_attr.h		\
     75 	spe_impl.h		\
     76 	dserv_impl.h
     77 
     78 
     79 PROTOCOL_DIR = $(SRC)/head/rpcsvc
     80 DERIVED_FILES = ds_prot.h ds_nfs_xdr.h mds_odl.h spe_prot.h
     81 
     82 CLEANFILES += $(DERIVED_FILES)
     83 
     84 $(CLOSED_BUILD)CLOSEDHDRS=	lm_impl.h	lm_nlm.h	lm_server.h
     85 
     86 ALLHDRS= $(HDRS) $(CLOSEDHDRS) $(DERIVED_FILES)
     87 
     88 ROOTDIRS= $(ROOT)/usr/include/nfs
     89 
     90 ROOTHDRS= $(ALLHDRS:%=$(ROOTDIRS)/%)
     91 
     92 CHECKHDRS= $(HDRS:%.h=%.check) \
     93 	$(CLOSEDHDRS:%.h=$(CLOSED)/uts/common/nfs/%.check)
     94 
     95 $(ROOTDIRS)/%: %
     96 	$(INS.file)
     97 
     98 $(ROOTDIRS)/%: $(CLOSED)/uts/common/nfs/%
     99 	$(INS.file)
    100 
    101 .KEEP_STATE:
    102 
    103 .PARALLEL: $(CHECKHDRS)
    104 
    105 install_h: $(ROOTDIRS) $(ROOTHDRS) $(DERIVED_FILES)
    106 
    107 $(ROOTDIRS):
    108 	$(INS.dir)
    109 
    110 check:	$(CHECKHDRS)
    111 
    112 clean clobber:
    113 	$(RM) $(DERIVED_FILES)
    114 	$(RM) $(ROOTHDRS)
    115 
    116 ds_prot.h: $(PROTOCOL_DIR)/ds_prot.x
    117 	$(RPCGEN) -C -h $(PROTOCOL_DIR)/ds_prot.x >$@ 
    118 
    119 mds_odl.h: $(PROTOCOL_DIR)/mds_odl.x
    120 	$(RPCGEN) -C -h $(PROTOCOL_DIR)/mds_odl.x >$@ 
    121 
    122 ds_nfs_xdr.h: $(PROTOCOL_DIR)/ds_nfs_com.x
    123 	$(RPCGEN) -C -h $(PROTOCOL_DIR)/ds_nfs_com.x | \
    124 	egrep 'bool_t xdr_.+\(XDR \*\, ' >$@ 
    125 
    126 spe_prot.h: $(PROTOCOL_DIR)/spe_prot.x
    127 	$(RPCGEN) -C -h $(PROTOCOL_DIR)/spe_prot.x >$@
    128