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/CDDL.txt 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/CDDL.txt. 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 # 23 # 24 # Copyright 2007 Sun Microsystems, Inc. All rights reserved. 25 # Use is subject to license terms. 26 # 27 #pragma ident "@(#)Makefile 1.6 07/11/18 SMI" 28 # 29 # include global definitions 30 include $(SRC)/Makefile.master 31 32 CLUSTHDRS= 33 34 # rpc headers which are just headers (not derived from a .x file) 35 EXAMPLE_RPC_SRC_HDRS= 36 37 # rpc headers which are generated from .x files 38 CLUSTGCH_RPC_GEN_HDRS= hsq.h tcp_udp.h 39 40 RPCGENFLAGS = -A -C -h 41 42 # rpc rpcgen source (.x files) 43 EXAMPLERPCPROTS = $(EXAMPLE_RPC_GEN_HDRS:%.h=%.x) 44 CLUSTGCHRPCPROTS = $(CLUSTGCH_RPC_GEN_HDRS:%.h=%.x) 45 46 EXAMPLERPCHDRS= $(EXAMPLE_RPC_SRC_HDRS) $(EXAMPLE_RPC_GEN_HDRS) 47 CLUSTGCHRPCHDRS= $(CLUSTGCH_RPC_SRC_HDRS) $(CLUSTGCH_RPC_GEN_HDRS) 48 49 CLUSTGCHBHDRS= gchsq.h tcp_udp_lib.h 50 51 ROOTCLUSTHDRS= $(CLUSTGCHBHDRS:%=$(VROOT)/usr/cluster/include/gchbs/%) \ 52 $(CLUSTGCHRPCPROTS:%=$(VROOT)/usr/cluster/include/gchbs/rpc/%) \ 53 $(CLUSTGCHRPCHDRS:%=$(VROOT)/usr/cluster/include/gchbs/rpc/%) 54 55 56 # check files really don't exist 57 # 58 59 60 gchbs/%.h_check: gchbs/%.h 61 $(DOT_H_CHECK) 62 63 64 gchbs/rpc/%.h_check: gchbs/rpc/%.h 65 $(DOT_H_CHECK) 66 67 CHECKHDRS= $(CLUSTHDRS:%.h=%.h_check) \ 68 $(CLUSTGCHBHDRS:%.h=gchbs/%.h_check) \ 69 $(CLUSTGCH_RPC_SRC_HDRS:%.h=gchbs/rpc/%.h_check) 70 71 72 # install rules 73 74 ROOTCLUSTINC = $(VROOT)/usr/cluster/include 75 76 $(ROOTCLUSTINC)/gchbs/rpc/%: $(ROOTCLUSTINC)/gchbs/rpc gchbs/rpc/% 77 $(INS.file) 78 79 $(ROOTCLUSTINC)/gchbs/rpc: 80 $(INS.dir) 81 82 $(ROOTCLUSTINC)/gchbs/%: $(ROOTCLUSTINC)/gchbs gchbs/% 83 $(INS.file) 84 85 $(ROOTCLUSTINC)/gchbs: 86 $(INS.dir) 87 88 $(ROOTCLUSTINC)/%: $(ROOTCLUSTINC) % 89 $(INS.file) 90 91 $(ROOTCLUSTINC): 92 $(INS.dir) 93 94 .KEEP_STATE: 95 96 .PARALLEL: $(ROOTCLUSTHDRS) $(CHECKHDRS) 97 98 install_h: $(ROOTCLUSTHDRS) 99 100 check: $(CHECKHDRS) 101 102 clean clobber: 103 $(RM) $(CHECKHDRS) 104 cd gchbs/rpc ; $(RM) $(CLUSTGCH_RPC_GEN_HDRS) 105 106 gchbs/rpc/%.h: gchbs/rpc/%.x 107 $(RPCGEN) $(RPCGENFLAGS) $< -o $@ 108 109