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-gateLIBRARY= libnsl.a 307c478bd9Sstevel@tonic-gateVERS= .1 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate# objects are listed by source directory 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate# common utility code used in more than one directory 357c478bd9Sstevel@tonic-gateCOMMON= common.o daemon_utils.o nsl_stdio_prv.o 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gateDES= des_crypt.o des_soft.o 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateDIAL= dial.o 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateIPSEC= algs.o 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gateNETDIR= netdir.o 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateNSS= \ 467c478bd9Sstevel@tonic-gategethostbyname_r.o gethostent.o gethostent_r.o gethostent6.o gethostby_door.o \ 477c478bd9Sstevel@tonic-gategetipnodeby_door.o getipnodeby.o getrpcent.o getrpcent_r.o inet_pton.o \ 487c478bd9Sstevel@tonic-gateinet_ntop.o netdir_inet.o netdir_inet_sundry.o \ 497c478bd9Sstevel@tonic-gateparse.o getauthattr.o getprofattr.o getexecattr.o getuserattr.o getauuser.o 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gateNETSELECT= netselect.o 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateNSL= \ 547c478bd9Sstevel@tonic-gate_conn_util.o _data2.o _errlst.o \ 557c478bd9Sstevel@tonic-gate_utility.o t_accept.o t_alloc.o t_bind.o t_close.o \ 567c478bd9Sstevel@tonic-gatet_connect.o t_error.o t_free.o t_getinfo.o t_getname.o \ 577c478bd9Sstevel@tonic-gatet_getstate.o t_listen.o t_look.o t_open.o t_optmgmt.o \ 587c478bd9Sstevel@tonic-gatet_rcv.o t_rcvconnect.o t_rcvdis.o t_rcvrel.o t_rcvudata.o \ 597c478bd9Sstevel@tonic-gatet_rcvuderr.o t_snd.o t_snddis.o t_sndrel.o t_sndudata.o \ 607c478bd9Sstevel@tonic-gatet_sndv.o t_sndreldata.o t_rcvv.o t_rcvreldata.o t_sysconf.o \ 617c478bd9Sstevel@tonic-gatet_sndvudata.o t_rcvvudata.o t_sync.o t_unbind.o t_strerror.o \ 6261961e0fSrobinsonxti_wrappers.o 6361961e0fSrobinson 6461961e0fSrobinsonWRAPPERS= \ 6561961e0fSrobinsontli_wrappers.o 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gateRPC= \ 687c478bd9Sstevel@tonic-gateauth_des.o auth_none.o auth_sys.o auth_time.o authdes_prot.o \ 697c478bd9Sstevel@tonic-gateauthsys_prot.o can_use_af.o \ 707c478bd9Sstevel@tonic-gateclnt_bcast.o clnt_dg.o clnt_door.o clnt_generic.o clnt_perror.o \ 717c478bd9Sstevel@tonic-gateclnt_raw.o clnt_simple.o clnt_vc.o fdsync.o getdname.o \ 727c478bd9Sstevel@tonic-gateinet_ntoa.o key_call.o key_prot.o mt_misc.o \ 737c478bd9Sstevel@tonic-gatenetname.o netnamer.o openchild.o pmap_clnt.o pmap_prot.o \ 747c478bd9Sstevel@tonic-gaterpc_callmsg.o rpc_comdata.o rpc_comdata1.o rpc_generic.o rpc_prot.o \ 757c478bd9Sstevel@tonic-gaterpc_sel2poll.o \ 7661961e0fSrobinsonrpc_soc.o rpc_td.o rpcb_clnt.o rpcb_prot.o \ 777c478bd9Sstevel@tonic-gaterpcb_st_xdr.o rpcdname.o rpcsec_gss_if.o rtime_tli.o svc.o \ 787c478bd9Sstevel@tonic-gatesvc_auth.o svc_auth_loopb.o svc_auth_sys.o svc_dg.o \ 797c478bd9Sstevel@tonic-gatesvc_door.o svc_generic.o svc_raw.o svc_run.o svc_simple.o \ 807c478bd9Sstevel@tonic-gatesvc_vc.o svcauth_des.o svid_funcs.o ti_opts.o xdr.o \ 817c478bd9Sstevel@tonic-gatexdr_array.o xdr_float.o xdr_mem.o xdr_rec.o xdr_refer.o \ 827c478bd9Sstevel@tonic-gatexdr_sizeof.o xdr_stdio.o xdr_stdio_prv.o 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateSAF= checkver.o doconfig.o 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gateYP= \ 877c478bd9Sstevel@tonic-gatedbm.o yp_all.o yp_b_clnt.o yp_b_xdr.o yp_bind.o \ 887c478bd9Sstevel@tonic-gateyp_enum.o yp_master.o yp_match.o yp_order.o yp_update.o \ 897c478bd9Sstevel@tonic-gateyperr_string.o yp_xdr.o ypprot_err.o ypupd.o \ 907c478bd9Sstevel@tonic-gateyp_rsvd.o \ 917c478bd9Sstevel@tonic-gateyppasswd_xdr.o 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gateNIS_GEN= \ 947c478bd9Sstevel@tonic-gatenislib.o nis_callback.o nis_xdr.o nis_subr.o nis_names.o \ 957c478bd9Sstevel@tonic-gatenis_cback_xdr.o print_obj.o nis_perror.o nis_groups.o nis_tags.o \ 967c478bd9Sstevel@tonic-gatenis_misc.o nis_lookup.o nis_rpc.o nis_clnt.o nis_cast.o \ 977c478bd9Sstevel@tonic-gatenis_hash.o nis_misc_proc.o nis_sec_mechs.o npd_lib.o 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gateNIS_CACHE= cache.o cache_api.o cold_start.o local_cache.o \ 1007c478bd9Sstevel@tonic-gate mapped_cache.o client_cache.o mgr_cache.o \ 1017c478bd9Sstevel@tonic-gate nis_cache_clnt.o nis_cache_xdr.o 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gateNIS= $(NIS_GEN) $(NIS_CACHE) 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gateKEY= publickey.o xcrypt.o gen_dhkeys.o 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gateOBJECTS= $(COMMON) $(DES) $(DIAL) $(IPSEC) $(NETDIR) $(NSS) $(NETSELECT) \ 10861961e0fSrobinson $(NSL) $(WRAPPERS) $(RPC) $(SAF) $(YP) $(NIS) $(KEY) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate# libnsl build rules 1117c478bd9Sstevel@tonic-gatepics/%.o: ../common/%.c 1127c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1137c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gatepics/%.o: ../des/%.c 1167c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1177c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gatepics/%.o: ../dial/%.c 1207c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1217c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gatepics/%.o: ../ipsec/%.c 1247c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1257c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gatepics/%.o: ../netdir/%.c 1287c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1297c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gatepics/%.o: ../nss/%.c 1327c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1337c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gatepics/%.o: ../netselect/%.c 1367c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1377c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gatepics/%.o: ../nsl/%.c 1407c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1417c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gatepics/%.o: ../rpc/%.c 1447c478bd9Sstevel@tonic-gate $(COMPILE.c) -DPORTMAP -DNIS -o $@ $< 1457c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gatepics/%.o: ../saf/%.c 1487c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1497c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gatepics/%.o: ../yp/%.c 1527c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1537c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gatepics/%.o: ../key/%.c 1567c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1577c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gatepics/%.o: ../nis/gen/%.c ../nis/gen/nis_clnt.h 1607c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1617c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gatepics/%.o: ../nis/cache/%.c ../nis/cache/nis_clnt.h 1647c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1657c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gatepics/%.o: ../nis/cache/%.cc ../nis/gen/nis_clnt.h \ 1687c478bd9Sstevel@tonic-gate ../nis/cache/nis_clnt.h ../nis/cache/nis_cache.h 1697c478bd9Sstevel@tonic-gate $(COMPILE.cc) -o $@ $< 1707c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate# include library definitions 1737c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate# install this library in the root filesystem 1767c478bd9Sstevel@tonic-gateinclude ../../Makefile.rootfs 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gateLIBS = $(DYNLIB) $(LINTLIB) 1797c478bd9Sstevel@tonic-gate 1807c478bd9Sstevel@tonic-gateMAPDIR= ../spec/$(TRANSMACH) 1817c478bd9Sstevel@tonic-gateSPECMAPFILE= $(MAPDIR)/mapfile 1827c478bd9Sstevel@tonic-gateMAPOPTS= $(MAPFILES:%=-M%) 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate# Override the position-independent code generation flags. 1857c478bd9Sstevel@tonic-gate# 1867c478bd9Sstevel@tonic-gate# These files are particularly rich with references to global things. 1877c478bd9Sstevel@tonic-gate# Ordering is by number of got references per file of files that have 1887c478bd9Sstevel@tonic-gate# non-performance sensitive code in them. 1897c478bd9Sstevel@tonic-gate# 1907c478bd9Sstevel@tonic-gate# If you need to add more files and the GOT overflows with "pic" items, 1917c478bd9Sstevel@tonic-gate# then use the environment variable LD_OPTIONS=-Dgot,detail to have the 1927c478bd9Sstevel@tonic-gate# linker print out the list of GOT hogs.. 1937c478bd9Sstevel@tonic-gate 194*45916cd2SjpkGOTHOGS = dial.o print_obj.o clnt_perror.o nsl_stdio_prv.o netdir.o \ 195*45916cd2Sjpk algs.o netselect.o 1967c478bd9Sstevel@tonic-gateBIGPICS = $(GOTHOGS:%=pics/%) 1977c478bd9Sstevel@tonic-gate$(BIGPICS) := sparc_C_PICFLAGS = $(C_BIGPICFLAGS) 1987c478bd9Sstevel@tonic-gate$(BIGPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS) 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate# Compile C++ code without exceptions to avoid a dependence on libC. 2017c478bd9Sstevel@tonic-gateNOEXCEPTIONS= -noex 2027c478bd9Sstevel@tonic-gateCCFLAGS += $(NOEXCEPTIONS) 2037c478bd9Sstevel@tonic-gateCCFLAGS64 += $(NOEXCEPTIONS) 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/lib/common/inc -I$(SRC)/lib/libnsl/include -D_REENTRANT 20661961e0fSrobinsonCPPFLAGS += -I$(SRC)/lib/libnsl/dial 20761961e0fSrobinson 20861961e0fSrobinsonCFLAGS += -v 2097c478bd9Sstevel@tonic-gate 2107c478bd9Sstevel@tonic-gateLAZYLIBS = $(ZLAZYLOAD) -lmp -lmd5 -lscf $(ZNOLAZYLOAD) 21161961e0fSrobinsonlint := LAZYLIBS = -lmd5 2127c478bd9Sstevel@tonic-gateLDLIBS += $(LAZYLIBS) -lc 2137c478bd9Sstevel@tonic-gateDYNFLAGS += $(MAPOPTS) 2147c478bd9Sstevel@tonic-gate 2157c478bd9Sstevel@tonic-gateSRCDIR= ../common 2167c478bd9Sstevel@tonic-gate$(LINTLIB):= SRCS=$(SRCDIR)/$(LINTSRC) 2177c478bd9Sstevel@tonic-gateLINTFLAGS += -m -DPORTMAP 2187c478bd9Sstevel@tonic-gateLINTFLAGS64 += -m -DPORTMAP 2197c478bd9Sstevel@tonic-gate 2207c478bd9Sstevel@tonic-gate.KEEP_STATE: 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate$(DYNLIB): $(MAPFILES) 2237c478bd9Sstevel@tonic-gate 224e8031f0aSrafall: $(LIBS) fnamecheck 225e8031f0aSraf 22661961e0fSrobinson# Don't lint WRAPPERS as they are explicitly unclean 2277c478bd9Sstevel@tonic-gateSRCS= $(DES:%.o=../des/%.c) \ 2287c478bd9Sstevel@tonic-gate $(DIAL:%.o=../dial/%.c) \ 2297c478bd9Sstevel@tonic-gate $(IPSEC:%.o=../ipsec/%.c) \ 2307c478bd9Sstevel@tonic-gate $(NETDIR:%.o=../netdir/%.c) \ 2317c478bd9Sstevel@tonic-gate $(NSS:%.o=../nss/%.c) \ 2327c478bd9Sstevel@tonic-gate $(NETSELECT:%.o=../netselect/%.c) \ 2337c478bd9Sstevel@tonic-gate $(NSL:%.o=../nsl/%.c) \ 2347c478bd9Sstevel@tonic-gate $(RPC:%.o=../rpc/%.c) \ 2357c478bd9Sstevel@tonic-gate $(SAF:%.o=../saf/%.c) \ 2367c478bd9Sstevel@tonic-gate $(YP:%.o=../yp/%.c) \ 2377c478bd9Sstevel@tonic-gate $(NIS_GEN:%.o=../nis/gen/%.c) \ 2387c478bd9Sstevel@tonic-gate $(COMMON:%.o=../common/%.c) 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gatelint: 2417c478bd9Sstevel@tonic-gate @echo $(LINT.c) ... 2427c478bd9Sstevel@tonic-gate @$(LINT.c) $(SRCS) $(LDLIBS) 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gate# include library targets 2457c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 246