10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 51676Sjpk# Common Development and Distribution License (the "License"). 61676Sjpk# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*11262SRajagopal.Andra@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate# 262522Sraf 271676SjpkPROTOCOL_DIR= $(ROOTHDRDIR)/rpcsvc 280Sstevel@tonic-gatePROTOCOL_SRCDIR= $(SRC)/head/rpcsvc 290Sstevel@tonic-gatePROTOCOL_UTS_SRCDIR= $(SRC)/uts/common/rpc 300Sstevel@tonic-gate 312522SrafSUBDIRS = $(MACH) 322522Sraf$(BUILD64)SUBDIRS += $(MACH64) 330Sstevel@tonic-gate 340Sstevel@tonic-gate# objects are listed by source directory 350Sstevel@tonic-gate 360Sstevel@tonic-gate# common utility code used in more than one directory 37132SrobinsonRPC_DERIVED_FILES= 380Sstevel@tonic-gate 390Sstevel@tonic-gateGEN_DERIVED_FILES= \ 40*11262SRajagopal.Andra@Sun.COM nis/gen/nis_clnt.h 410Sstevel@tonic-gate 420Sstevel@tonic-gate 430Sstevel@tonic-gatePROTOCOL_FILES= \ 440Sstevel@tonic-gate $(PROTOCOL_DIR)/daemon_utils.h \ 450Sstevel@tonic-gate $(PROTOCOL_DIR)/nis.x \ 460Sstevel@tonic-gate $(PROTOCOL_DIR)/nis.h \ 47*11262SRajagopal.Andra@Sun.COM $(PROTOCOL_DIR)/nis_object.x 480Sstevel@tonic-gate 490Sstevel@tonic-gatePROTOCOL_FILES_UTS= \ 500Sstevel@tonic-gate $(PROTOCOL_DIR)/key_prot.x 510Sstevel@tonic-gate 52*11262SRajagopal.Andra@Sun.COMDERIVED_FILES= $(GEN_DERIVED_FILES) $(RPC_DERIVED_FILES) 530Sstevel@tonic-gate 540Sstevel@tonic-gate# 550Sstevel@tonic-gate# Make sure they get cleaned when necessary 560Sstevel@tonic-gate# 570Sstevel@tonic-gateCLEANFILES += $(DERIVED_FILES) 580Sstevel@tonic-gate 590Sstevel@tonic-gate# include library definitions 600Sstevel@tonic-gateinclude ../Makefile.lib 610Sstevel@tonic-gate 621676Sjpk# header file delivered to /usr/include; internal to ON build process 631676SjpkHDRS = nss.h 641676SjpkHDRDIR = nss 650Sstevel@tonic-gate 660Sstevel@tonic-gateLIBRARY= libnsl.a 670Sstevel@tonic-gateTEXT_DOMAIN= SUNW_OST_NETRPC 680Sstevel@tonic-gatePOFILE= $(LIBRARY:.a=.po) 690Sstevel@tonic-gatePOFILES= generic.po _errlst.po 700Sstevel@tonic-gate 710Sstevel@tonic-gateall := TARGET= all 720Sstevel@tonic-gateclean := TARGET= clean 730Sstevel@tonic-gateclobber := TARGET= clobber 740Sstevel@tonic-gatedelete := TARGET= delete 750Sstevel@tonic-gateinstall := TARGET= install 760Sstevel@tonic-gatelint := TARGET= lint 770Sstevel@tonic-gate_msg := TARGET= _msg 780Sstevel@tonic-gatepackage := TARGET= package 790Sstevel@tonic-gate 800Sstevel@tonic-gate 810Sstevel@tonic-gate.KEEP_STATE: 820Sstevel@tonic-gate 83256Sth160488all: $(PROTOCOL_DIR) $(DERIVED_FILES) .WAIT $(SUBDIRS) 840Sstevel@tonic-gate 850Sstevel@tonic-gateheaders: $(PROTOCOL_DIR) .WAIT $(PROTOCOL_FILES) $(PROTOCOL_FILES_UTS) \ 860Sstevel@tonic-gate $(DERIVED_FILES) 870Sstevel@tonic-gate 882522Srafinstall: all .WAIT $(SUBDIRS) 890Sstevel@tonic-gate 901676Sjpkinstall_h: $(ROOTHDRS) 911676Sjpk 921676Sjpk# nss.h isn't delivered; no reason to check 931676Sjpkcheck: 941676Sjpk 950Sstevel@tonic-gateclean clobber delete lint package: $(SUBDIRS) 960Sstevel@tonic-gate 970Sstevel@tonic-gate$(PROTOCOL_DIR): 980Sstevel@tonic-gate $(INS.dir) 990Sstevel@tonic-gate 1000Sstevel@tonic-gate$(PROTOCOL_DIR)/%.h: $(PROTOCOL_SRCDIR)/%.h 1010Sstevel@tonic-gate $(INS.file) 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate$(PROTOCOL_DIR)/nis.h: $(PROTOCOL_SRCDIR)/nis.x $(PROTOCOL_SRCDIR)/nis_object.x 1040Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis.x > nis-tmp.h 1050Sstevel@tonic-gate $(SED) -e '/EDIT_START/,$$ d' < nis-tmp.h > nis.h 1060Sstevel@tonic-gate $(RM) $@ 1070Sstevel@tonic-gate $(INS) -s -m $(FILEMODE) -f $(@D) nis.h 1080Sstevel@tonic-gate $(RM) nis.h nis-tmp.h 1090Sstevel@tonic-gate 1100Sstevel@tonic-gate$(PROTOCOL_DIR)/%.x: $(PROTOCOL_SRCDIR)/%.x 1110Sstevel@tonic-gate $(INS.file) 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate$(PROTOCOL_DIR)/%.x: $(PROTOCOL_UTS_SRCDIR)/%.x 1140Sstevel@tonic-gate $(INS.file) 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate# 1170Sstevel@tonic-gate# Rules for building the derived files 1180Sstevel@tonic-gate# 1190Sstevel@tonic-gate# Derived header files 1200Sstevel@tonic-gate# 1210Sstevel@tonic-gatenis/gen/nis_clnt.h: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x 1220Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis.x > nis_clnt-gen.h 1230Sstevel@tonic-gate $(SED) -n -e '/EDIT_START/,$$ p' < nis_clnt-gen.h |\ 1240Sstevel@tonic-gate $(SED) -e 's/_3_svc/_svc/' |\ 1250Sstevel@tonic-gate $(SED) -e 's/_3/_clnt/' > $@ 1260Sstevel@tonic-gate $(RM) nis_clnt-gen.h 1270Sstevel@tonic-gate 1280Sstevel@tonic-gate# 1290Sstevel@tonic-gate# Derived source files 1300Sstevel@tonic-gate# 1310Sstevel@tonic-gate 1320Sstevel@tonic-gate# include library targets 1330Sstevel@tonic-gateinclude ../Makefile.targ 1340Sstevel@tonic-gate 1350Sstevel@tonic-gate# EXPORT DELETE START 1360Sstevel@tonic-gate# CRYPT DELETE START 1370Sstevel@tonic-gate# Special target to clean up the source tree for export distribution 1380Sstevel@tonic-gate# Warning: This target changes the source tree 1390Sstevel@tonic-gateEXPORT_SRC: 1400Sstevel@tonic-gate $(RM) Makefile+ des/des_crypt.c+ des/des_soft.c+ key/xcrypt.c+ 1410Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1420Sstevel@tonic-gate < des/des_crypt.c > des/des_crypt.c+ 1430Sstevel@tonic-gate $(MV) des/des_crypt.c+ des/des_crypt.c 1440Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1450Sstevel@tonic-gate < des/des_soft.c > des/des_soft.c+ 1460Sstevel@tonic-gate $(MV) des/des_soft.c+ des/des_soft.c 1470Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1480Sstevel@tonic-gate < key/xcrypt.c > key/xcrypt.c+ 1490Sstevel@tonic-gate $(MV) key/xcrypt.c+ key/xcrypt.c 1500Sstevel@tonic-gate $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 1510Sstevel@tonic-gate < Makefile > Makefile+ 1520Sstevel@tonic-gate $(MV) Makefile+ Makefile 1530Sstevel@tonic-gate $(CHMOD) 444 Makefile des/des_crypt.c des/des_soft.c key/xcrypt.c 1540Sstevel@tonic-gate 1550Sstevel@tonic-gateCRYPT_SRC: 1560Sstevel@tonic-gate $(RM) Makefile+ 1570Sstevel@tonic-gate $(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \ 1580Sstevel@tonic-gate < Makefile \ 1590Sstevel@tonic-gate | $(SED) -e "/EXPORT DELETE/d" \ 1600Sstevel@tonic-gate > Makefile+ 1610Sstevel@tonic-gate $(MV) Makefile+ Makefile 1620Sstevel@tonic-gate $(CHMOD) 444 Makefile 1630Sstevel@tonic-gate 1640Sstevel@tonic-gate# CRYPT DELETE END 1650Sstevel@tonic-gate# EXPORT DELETE END 1660Sstevel@tonic-gate 1670Sstevel@tonic-gate_msg: $(MSGDOMAIN) $(POFILE) 1680Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 1690Sstevel@tonic-gate $(CP) $(POFILE) $(MSGDOMAIN) 1700Sstevel@tonic-gate 1710Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 1720Sstevel@tonic-gate $(RM) $@ 1730Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1740Sstevel@tonic-gate 1750Sstevel@tonic-gate_errlst.po: 1760Sstevel@tonic-gate $(RM) messages.po 1770Sstevel@tonic-gate $(XGETTEXT) -a nsl/_errlst.c 1780Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 1790Sstevel@tonic-gate $(RM) messages.po 1800Sstevel@tonic-gate 1810Sstevel@tonic-gategeneric.po: 1820Sstevel@tonic-gate $(RM) messages.po 1830Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext */*.[ch] nis/*/*.[ch]*` 1840Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 1850Sstevel@tonic-gate $(RM) messages.po 1860Sstevel@tonic-gate 1870Sstevel@tonic-gate$(MSGDOMAIN): 1880Sstevel@tonic-gate $(INS.dir) 1890Sstevel@tonic-gate 1902522Sraf$(SUBDIRS): FRC 1910Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1920Sstevel@tonic-gate 1930Sstevel@tonic-gateFRC: 194