1 # 2 # This file and its contents are supplied under the terms of the 3 # Common Development and Distribution License ("CDDL"), version 1.0. 4 # You may only use this file in accordance with the terms of version 5 # 1.0 of the CDDL. 6 # 7 # A full copy of the text of the CDDL should have accompanied this 8 # source. A copy is of the CDDL is also available via the Internet 9 # at http://www.illumos.org/license/CDDL. 10 # 11 12 # 13 # Copyright 2010 Nexenta Systems, Inc. All rights reserved. 14 # Copyright (c) 2012 by Delphix. All rights reserved. 15 # 16 17 include ../../../Makefile.master 18 19 NLM_PROT_X= ../rpcsvc/nlm_prot.x 20 SM_INTER_X= ../rpcsvc/sm_inter.x 21 NSM_ADDR_X= ../rpcsvc/nsm_addr.x 22 23 RPCGENFLAGS = -C -M -i 0 24 SED_INCL='/^.include/s:\.\..*/rpcsvc:rpcsvc:' 25 26 DERIVED_FILES= nlm_prot_clnt.c nlm_prot_xdr.c \ 27 sm_inter_clnt.c sm_inter_xdr.c \ 28 nsm_addr_clnt.c nsm_addr_xdr.c 29 30 install_h: all_h 31 32 all_h: $(DERIVED_FILES) 33 34 nlm_prot_clnt.c : $(NLM_PROT_X) nlm_prot_clnt.sed 35 $(RPCGEN) $(RPCGENFLAGS) -l -o $@.tmp $(NLM_PROT_X) 36 sed -f nlm_prot_clnt.sed < $@.tmp > $@ 37 $(RM) -f $@.tmp 38 39 nlm_prot_xdr.c : $(NLM_PROT_X) 40 $(RPCGEN) $(RPCGENFLAGS) -c -o $@.tmp $(NLM_PROT_X) 41 sed -e $(SED_INCL) < $@.tmp > $@ 42 $(RM) -f $@.tmp 43 44 sm_inter_clnt.c : $(SM_INTER_X) sm_inter_clnt.sed 45 $(RPCGEN) $(RPCGENFLAGS) -l -o $@.tmp $(SM_INTER_X) 46 sed -f sm_inter_clnt.sed < $@.tmp > $@ 47 $(RM) -f $@.tmp 48 49 sm_inter_xdr.c : $(SM_INTER_X) 50 $(RPCGEN) $(RPCGENFLAGS) -c -o $@.tmp $(SM_INTER_X) 51 sed -e $(SED_INCL) < $@.tmp > $@ 52 $(RM) -f $@.tmp 53 54 nsm_addr_clnt.c : $(NSM_ADDR_X) nsm_addr_clnt.sed 55 $(RPCGEN) $(RPCGENFLAGS) -l -o $@.tmp $(NSM_ADDR_X) 56 sed -f nsm_addr_clnt.sed < $@.tmp > $@ 57 $(RM) -f $@.tmp 58 59 nsm_addr_xdr.c : $(NSM_ADDR_X) 60 $(RPCGEN) $(RPCGENFLAGS) -c -o $@.tmp $(NSM_ADDR_X) 61 sed -e $(SED_INCL) < $@.tmp > $@ 62 $(RM) -f $@.tmp 63 64 check: 65 66 clean: 67 $(RM) $(DERIVED_FILES) 68 69 clobber: clean 70 71 lint: 72 73 .KEEP_STATE: