17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*45916cd2Sjpk# Common Development and Distribution License (the "License"). 6*45916cd2Sjpk# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 20*45916cd2Sjpk 21*45916cd2Sjpk 227c478bd9Sstevel@tonic-gate# 237c478bd9Sstevel@tonic-gate# 24e8031f0aSraf# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 257c478bd9Sstevel@tonic-gate# Use is subject to license terms. 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 287c478bd9Sstevel@tonic-gate# 297c478bd9Sstevel@tonic-gate# lib/libnsl/Makefile 307c478bd9Sstevel@tonic-gate# 31*45916cd2SjpkPROTOCOL_DIR= $(ROOTHDRDIR)/rpcsvc 327c478bd9Sstevel@tonic-gatePROTOCOL_SRCDIR= $(SRC)/head/rpcsvc 337c478bd9Sstevel@tonic-gatePROTOCOL_UTS_SRCDIR= $(SRC)/uts/common/rpc 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateSUBDIRS = spec .WAIT $(MACH) $(BUILD64) .WAIT $(MACH64) 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate# objects are listed by source directory 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate# common utility code used in more than one directory 4061961e0fSrobinsonRPC_DERIVED_FILES= 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gateGEN_DERIVED_FILES= \ 437c478bd9Sstevel@tonic-gate nis/gen/nis_clnt.h \ 4461961e0fSrobinson nis/gen/nis_clnt.c 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gateCACHE_DERIVED_FILES= \ 477c478bd9Sstevel@tonic-gate nis/cache/nis_clnt.h \ 487c478bd9Sstevel@tonic-gate nis/cache/nis_cache.h \ 497c478bd9Sstevel@tonic-gate nis/cache/nis_cache_clnt.cc \ 507c478bd9Sstevel@tonic-gate nis/cache/nis_cache_xdr.cc 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gatePROTOCOL_FILES= \ 537c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/daemon_utils.h \ 547c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis.x \ 557c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis.h \ 567c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_object.x \ 577c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_callback.x \ 587c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_callback.h \ 597c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_cache.x \ 607c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_cache.h 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gatePROTOCOL_FILES_UTS= \ 637c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/key_prot.x 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gateDERIVED_FILES= $(GEN_DERIVED_FILES) $(CACHE_DERIVED_FILES) $(RPC_DERIVED_FILES) 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate# 687c478bd9Sstevel@tonic-gate# Make sure they get cleaned when necessary 697c478bd9Sstevel@tonic-gate# 707c478bd9Sstevel@tonic-gateCLEANFILES += $(DERIVED_FILES) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate# include library definitions 737c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 747c478bd9Sstevel@tonic-gate 75*45916cd2Sjpk# header file delivered to /usr/include; internal to ON build process 76*45916cd2SjpkHDRS = nss.h 77*45916cd2SjpkHDRDIR = nss 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gateLIBRARY= libnsl.a 807c478bd9Sstevel@tonic-gateTEXT_DOMAIN= SUNW_OST_NETRPC 817c478bd9Sstevel@tonic-gatePOFILE= $(LIBRARY:.a=.po) 827c478bd9Sstevel@tonic-gatePOFILES= generic.po _errlst.po 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateall := TARGET= all 857c478bd9Sstevel@tonic-gateclean := TARGET= clean 867c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 877c478bd9Sstevel@tonic-gatedelete := TARGET= delete 887c478bd9Sstevel@tonic-gateinstall := TARGET= install 897c478bd9Sstevel@tonic-gatelint := TARGET= lint 907c478bd9Sstevel@tonic-gate_msg := TARGET= _msg 917c478bd9Sstevel@tonic-gatepackage := TARGET= package 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate.KEEP_STATE: 957c478bd9Sstevel@tonic-gate 9633ec2264Sth160488all: $(PROTOCOL_DIR) $(DERIVED_FILES) .WAIT $(SUBDIRS) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateheaders: $(PROTOCOL_DIR) .WAIT $(PROTOCOL_FILES) $(PROTOCOL_FILES_UTS) \ 997c478bd9Sstevel@tonic-gate $(DERIVED_FILES) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateinstall: all $(SUBDIRS) 1027c478bd9Sstevel@tonic-gate 103*45916cd2Sjpkinstall_h: $(ROOTHDRS) 104*45916cd2Sjpk 105*45916cd2Sjpk# nss.h isn't delivered; no reason to check 106*45916cd2Sjpkcheck: 107*45916cd2Sjpk 1087c478bd9Sstevel@tonic-gateclean clobber delete lint package: $(SUBDIRS) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR): 1117c478bd9Sstevel@tonic-gate $(INS.dir) 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/%.h: $(PROTOCOL_SRCDIR)/%.h 1147c478bd9Sstevel@tonic-gate $(INS.file) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/nis.h: $(PROTOCOL_SRCDIR)/nis.x $(PROTOCOL_SRCDIR)/nis_object.x 1177c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis.x > nis-tmp.h 1187c478bd9Sstevel@tonic-gate $(SED) -e '/EDIT_START/,$$ d' < nis-tmp.h > nis.h 1197c478bd9Sstevel@tonic-gate $(RM) $@ 1207c478bd9Sstevel@tonic-gate $(INS) -s -m $(FILEMODE) -f $(@D) nis.h 1217c478bd9Sstevel@tonic-gate $(RM) nis.h nis-tmp.h 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/nis_callback.h: $(PROTOCOL_SRCDIR)/nis_callback.x 1247c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis_callback.x -o nis_callback.h 1257c478bd9Sstevel@tonic-gate $(RM) $@ 1267c478bd9Sstevel@tonic-gate $(INS) -s -m $(FILEMODE) -f $(@D) nis_callback.h 1277c478bd9Sstevel@tonic-gate $(RM) nis_callback.h 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/nis_cache.h: $(PROTOCOL_SRCDIR)/nis_cache.x 1307c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis_cache.x -o nis_cache.h 1317c478bd9Sstevel@tonic-gate $(RM) $@ 1327c478bd9Sstevel@tonic-gate $(INS) -s -m $(FILEMODE) -f $(@D) nis_cache.h 1337c478bd9Sstevel@tonic-gate $(RM) nis_cache.h 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/%.x: $(PROTOCOL_SRCDIR)/%.x 1367c478bd9Sstevel@tonic-gate $(INS.file) 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/%.x: $(PROTOCOL_UTS_SRCDIR)/%.x 1397c478bd9Sstevel@tonic-gate $(INS.file) 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate# 1427c478bd9Sstevel@tonic-gate# Rules for building the derived files 1437c478bd9Sstevel@tonic-gate# 1447c478bd9Sstevel@tonic-gate# Derived header files 1457c478bd9Sstevel@tonic-gate# 1467c478bd9Sstevel@tonic-gatenis/gen/nis_clnt.h: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x 1477c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis.x > nis_clnt-gen.h 1487c478bd9Sstevel@tonic-gate $(SED) -n -e '/EDIT_START/,$$ p' < nis_clnt-gen.h |\ 1497c478bd9Sstevel@tonic-gate $(SED) -e 's/_3_svc/_svc/' |\ 1507c478bd9Sstevel@tonic-gate $(SED) -e 's/_3/_clnt/' > $@ 1517c478bd9Sstevel@tonic-gate $(RM) nis_clnt-gen.h 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gatenis/cache/nis_clnt.h: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x 1547c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis.x > nis_clnt-cache.h 1557c478bd9Sstevel@tonic-gate $(SED) -n -e '/EDIT_START/,$$ p' < nis_clnt-cache.h |\ 1567c478bd9Sstevel@tonic-gate $(SED) -e 's/_3_svc/_svc/' |\ 1577c478bd9Sstevel@tonic-gate $(SED) -e 's/_3/_clnt/' > $@ 1587c478bd9Sstevel@tonic-gate $(RM) nis_clnt-cache.h 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate# 1617c478bd9Sstevel@tonic-gate# Derived source files 1627c478bd9Sstevel@tonic-gate# 1637c478bd9Sstevel@tonic-gatenis/gen/nis_clnt.c: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x 1647c478bd9Sstevel@tonic-gate $(RPCGEN) -C -l $(PROTOCOL_DIR)/nis.x > nis_clnt-tmp.c 1657c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis.h\"!\<rpcsvc/nis.h\>!' \ 1667c478bd9Sstevel@tonic-gate < nis_clnt-tmp.c |\ 167e8031f0aSraf $(SED) -e '/#include <memory.h>/i\ 168e8031f0aSraf#include "mt.h"' |\ 1697c478bd9Sstevel@tonic-gate $(SED) -e 's/_3/_clnt/' > $@ 1707c478bd9Sstevel@tonic-gate $(RM) nis_clnt-tmp.c 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gatenis/cache/nis_cache_xdr.cc: $(PROTOCOL_DIR)/nis_cache.x 1737c478bd9Sstevel@tonic-gate $(RPCGEN) -C -c $(PROTOCOL_DIR)/nis_cache.x |\ 1747c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis_cache.h\"!"nis_cache.h"!' > $@ 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gatenis/cache/nis_cache_clnt.cc: $(PROTOCOL_DIR)/nis_cache.x 1777c478bd9Sstevel@tonic-gate $(RPCGEN) -C -l $(PROTOCOL_DIR)/nis_cache.x |\ 178e8031f0aSraf $(SED) -e '/#include <memory.h>/i\ 179e8031f0aSraf#include "mt.h"' |\ 1807c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis_cache.h\"!"nis_cache.h"!' > $@ 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gatenis/cache/nis_cache.h: $(PROTOCOL_DIR)/nis_cache.x 1837c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis_cache.x |\ 1847c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis_cache.h\"!"nis_cache.h"!' > $@ 1857c478bd9Sstevel@tonic-gate 1867c478bd9Sstevel@tonic-gate# include library targets 1877c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate# EXPORT DELETE START 1907c478bd9Sstevel@tonic-gate# CRYPT DELETE START 1917c478bd9Sstevel@tonic-gate# Special target to clean up the source tree for export distribution 1927c478bd9Sstevel@tonic-gate# Warning: This target changes the source tree 1937c478bd9Sstevel@tonic-gateEXPORT_SRC: 1947c478bd9Sstevel@tonic-gate $(RM) Makefile+ des/des_crypt.c+ des/des_soft.c+ key/xcrypt.c+ 1957c478bd9Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1967c478bd9Sstevel@tonic-gate < des/des_crypt.c > des/des_crypt.c+ 1977c478bd9Sstevel@tonic-gate $(MV) des/des_crypt.c+ des/des_crypt.c 1987c478bd9Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1997c478bd9Sstevel@tonic-gate < des/des_soft.c > des/des_soft.c+ 2007c478bd9Sstevel@tonic-gate $(MV) des/des_soft.c+ des/des_soft.c 2017c478bd9Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 2027c478bd9Sstevel@tonic-gate < key/xcrypt.c > key/xcrypt.c+ 2037c478bd9Sstevel@tonic-gate $(MV) key/xcrypt.c+ key/xcrypt.c 2047c478bd9Sstevel@tonic-gate $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 2057c478bd9Sstevel@tonic-gate < Makefile > Makefile+ 2067c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 2077c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile des/des_crypt.c des/des_soft.c key/xcrypt.c 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gateCRYPT_SRC: 2107c478bd9Sstevel@tonic-gate $(RM) Makefile+ 2117c478bd9Sstevel@tonic-gate $(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \ 2127c478bd9Sstevel@tonic-gate < Makefile \ 2137c478bd9Sstevel@tonic-gate | $(SED) -e "/EXPORT DELETE/d" \ 2147c478bd9Sstevel@tonic-gate > Makefile+ 2157c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 2167c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate# CRYPT DELETE END 2197c478bd9Sstevel@tonic-gate# EXPORT DELETE END 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate_msg: $(MSGDOMAIN) $(POFILE) 2227c478bd9Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 2237c478bd9Sstevel@tonic-gate $(CP) $(POFILE) $(MSGDOMAIN) 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 2267c478bd9Sstevel@tonic-gate $(RM) $@ 2277c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gate_errlst.po: 2307c478bd9Sstevel@tonic-gate $(RM) messages.po 2317c478bd9Sstevel@tonic-gate $(XGETTEXT) -a nsl/_errlst.c 2327c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 2337c478bd9Sstevel@tonic-gate $(RM) messages.po 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gategeneric.po: 2367c478bd9Sstevel@tonic-gate $(RM) messages.po 2377c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext */*.[ch] nis/*/*.[ch]*` 2387c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 2397c478bd9Sstevel@tonic-gate $(RM) messages.po 2407c478bd9Sstevel@tonic-gate 2417c478bd9Sstevel@tonic-gate$(MSGDOMAIN): 2427c478bd9Sstevel@tonic-gate $(INS.dir) 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gatespec $(MACH) $(MACH64) $(SPEC) $(SPEC64): FRC 2457c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 2467c478bd9Sstevel@tonic-gate 2477c478bd9Sstevel@tonic-gateFRC: 248