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 545916cd2Sjpk# Common Development and Distribution License (the "License"). 645916cd2Sjpk# 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 207c478bd9Sstevel@tonic-gate# 217b1b4281SRoger A. Faulkner 227c478bd9Sstevel@tonic-gate# 23b56bf881SAntonello Cruz# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 249b241b4eSYuri Pankov# Copyright 2011 Nexenta Systems, Inc. All rights reserved. 257c478bd9Sstevel@tonic-gate# 26f808c858Sraf 277c478bd9Sstevel@tonic-gateLIBRARY= libnsl.a 287c478bd9Sstevel@tonic-gateVERS= .1 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate# objects are listed by source directory 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate# common utility code used in more than one directory 33004388ebScasperCOMMON= common.o daemon_utils.o 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateDES= des_crypt.o des_soft.o 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gateDIAL= dial.o 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateIPSEC= algs.o 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateNETDIR= netdir.o 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gateNSS= \ 447c478bd9Sstevel@tonic-gategethostbyname_r.o gethostent.o gethostent_r.o gethostent6.o gethostby_door.o \ 459b241b4eSYuri Pankovgetipnodeby_door.o getipnodeby.o getrpcent.o getrpcent_r.o inet_matchaddr.o \ 469b241b4eSYuri Pankovinet_pton.o inet_ntop.o netdir_inet.o netdir_inet_sundry.o \ 477c478bd9Sstevel@tonic-gateparse.o getauthattr.o getprofattr.o getexecattr.o getuserattr.o getauuser.o 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateNETSELECT= netselect.o 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gateNSL= \ 527c478bd9Sstevel@tonic-gate_conn_util.o _data2.o _errlst.o \ 537c478bd9Sstevel@tonic-gate_utility.o t_accept.o t_alloc.o t_bind.o t_close.o \ 547c478bd9Sstevel@tonic-gatet_connect.o t_error.o t_free.o t_getinfo.o t_getname.o \ 557c478bd9Sstevel@tonic-gatet_getstate.o t_listen.o t_look.o t_open.o t_optmgmt.o \ 567c478bd9Sstevel@tonic-gatet_rcv.o t_rcvconnect.o t_rcvdis.o t_rcvrel.o t_rcvudata.o \ 577c478bd9Sstevel@tonic-gatet_rcvuderr.o t_snd.o t_snddis.o t_sndrel.o t_sndudata.o \ 587c478bd9Sstevel@tonic-gatet_sndv.o t_sndreldata.o t_rcvv.o t_rcvreldata.o t_sysconf.o \ 597c478bd9Sstevel@tonic-gatet_sndvudata.o t_rcvvudata.o t_sync.o t_unbind.o t_strerror.o \ 6061961e0fSrobinsonxti_wrappers.o 6161961e0fSrobinson 6261961e0fSrobinsonWRAPPERS= \ 6361961e0fSrobinsontli_wrappers.o 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gateRPC= \ 667c478bd9Sstevel@tonic-gateauth_des.o auth_none.o auth_sys.o auth_time.o authdes_prot.o \ 677c478bd9Sstevel@tonic-gateauthsys_prot.o can_use_af.o \ 687c478bd9Sstevel@tonic-gateclnt_bcast.o clnt_dg.o clnt_door.o clnt_generic.o clnt_perror.o \ 697c478bd9Sstevel@tonic-gateclnt_raw.o clnt_simple.o clnt_vc.o fdsync.o getdname.o \ 707c478bd9Sstevel@tonic-gateinet_ntoa.o key_call.o key_prot.o mt_misc.o \ 71004388ebScaspernetname.o netnamer.o pmap_clnt.o pmap_prot.o \ 727c478bd9Sstevel@tonic-gaterpc_callmsg.o rpc_comdata.o rpc_comdata1.o rpc_generic.o rpc_prot.o \ 737c478bd9Sstevel@tonic-gaterpc_sel2poll.o \ 7461961e0fSrobinsonrpc_soc.o rpc_td.o rpcb_clnt.o rpcb_prot.o \ 757c478bd9Sstevel@tonic-gaterpcb_st_xdr.o rpcdname.o rpcsec_gss_if.o rtime_tli.o svc.o \ 767c478bd9Sstevel@tonic-gatesvc_auth.o svc_auth_loopb.o svc_auth_sys.o svc_dg.o \ 777c478bd9Sstevel@tonic-gatesvc_door.o svc_generic.o svc_raw.o svc_run.o svc_simple.o \ 787c478bd9Sstevel@tonic-gatesvc_vc.o svcauth_des.o svid_funcs.o ti_opts.o xdr.o \ 797c478bd9Sstevel@tonic-gatexdr_array.o xdr_float.o xdr_mem.o xdr_rec.o xdr_refer.o \ 80004388ebScasperxdr_sizeof.o xdr_stdio.o 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gateSAF= checkver.o doconfig.o 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateYP= \ 857c478bd9Sstevel@tonic-gatedbm.o yp_all.o yp_b_clnt.o yp_b_xdr.o yp_bind.o \ 867c478bd9Sstevel@tonic-gateyp_enum.o yp_master.o yp_match.o yp_order.o yp_update.o \ 877c478bd9Sstevel@tonic-gateyperr_string.o yp_xdr.o ypprot_err.o ypupd.o \ 887c478bd9Sstevel@tonic-gateyp_rsvd.o \ 897c478bd9Sstevel@tonic-gateyppasswd_xdr.o 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateNIS_GEN= \ 9236e852a1SRaja Andranis_xdr.o nis_subr.o nis_misc.o \ 9336e852a1SRaja Andranis_misc_proc.o nis_sec_mechs.o 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate 9636e852a1SRaja AndraNIS= $(NIS_GEN) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateKEY= publickey.o xcrypt.o gen_dhkeys.o 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gateOBJECTS= $(COMMON) $(DES) $(DIAL) $(IPSEC) $(NETDIR) $(NSS) $(NETSELECT) \ 10161961e0fSrobinson $(NSL) $(WRAPPERS) $(RPC) $(SAF) $(YP) $(NIS) $(KEY) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate# libnsl build rules 1047c478bd9Sstevel@tonic-gatepics/%.o: ../common/%.c 1057c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1067c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gatepics/%.o: ../des/%.c 1097c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1107c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gatepics/%.o: ../dial/%.c 1137c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1147c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gatepics/%.o: ../ipsec/%.c 1177c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1187c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gatepics/%.o: ../netdir/%.c 1217c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1227c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gatepics/%.o: ../nss/%.c 1257c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1267c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gatepics/%.o: ../netselect/%.c 1297c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1307c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gatepics/%.o: ../nsl/%.c 1337c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1347c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gatepics/%.o: ../rpc/%.c 1377c478bd9Sstevel@tonic-gate $(COMPILE.c) -DPORTMAP -DNIS -o $@ $< 1387c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gatepics/%.o: ../saf/%.c 1417c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1427c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gatepics/%.o: ../yp/%.c 1457c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1467c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1477c478bd9Sstevel@tonic-gate 1487c478bd9Sstevel@tonic-gatepics/%.o: ../key/%.c 1497c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1507c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gatepics/%.o: ../nis/gen/%.c ../nis/gen/nis_clnt.h 1537c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1547c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate 15736e852a1SRaja Andrapics/%.o: ../nis/gen/nis_clnt.h 1587c478bd9Sstevel@tonic-gate $(COMPILE.cc) -o $@ $< 1597c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gate# include library definitions 1627c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate# install this library in the root filesystem 1657c478bd9Sstevel@tonic-gateinclude ../../Makefile.rootfs 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gateLIBS = $(DYNLIB) $(LINTLIB) 1687c478bd9Sstevel@tonic-gate 169f808c858SrafSRCDIR= ../common 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate# Override the position-independent code generation flags. 1727c478bd9Sstevel@tonic-gate# 1737c478bd9Sstevel@tonic-gate# These files are particularly rich with references to global things. 1747c478bd9Sstevel@tonic-gate# Ordering is by number of got references per file of files that have 1757c478bd9Sstevel@tonic-gate# non-performance sensitive code in them. 1767c478bd9Sstevel@tonic-gate# 1777c478bd9Sstevel@tonic-gate# If you need to add more files and the GOT overflows with "pic" items, 1787c478bd9Sstevel@tonic-gate# then use the environment variable LD_OPTIONS=-Dgot,detail to have the 1797c478bd9Sstevel@tonic-gate# linker print out the list of GOT hogs.. 1807c478bd9Sstevel@tonic-gate 18145916cd2SjpkGOTHOGS = dial.o print_obj.o clnt_perror.o nsl_stdio_prv.o netdir.o \ 18245916cd2Sjpk algs.o netselect.o 1837c478bd9Sstevel@tonic-gateBIGPICS = $(GOTHOGS:%=pics/%) 1847c478bd9Sstevel@tonic-gate$(BIGPICS) := sparc_C_PICFLAGS = $(C_BIGPICFLAGS) 1857c478bd9Sstevel@tonic-gate$(BIGPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS) 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate# Compile C++ code without exceptions to avoid a dependence on libC. 1887c478bd9Sstevel@tonic-gateNOEXCEPTIONS= -noex 1897c478bd9Sstevel@tonic-gateCCFLAGS += $(NOEXCEPTIONS) 1907c478bd9Sstevel@tonic-gateCCFLAGS64 += $(NOEXCEPTIONS) 1917c478bd9Sstevel@tonic-gate 192*3e0c8044SRichard LoweCPPFLAGS += -I$(SRC)/lib/libnsl/include -D_REENTRANT 19361961e0fSrobinsonCPPFLAGS += -I$(SRC)/lib/libnsl/dial 19461961e0fSrobinson 195f808c858SrafCFLAGS += $(CCVERBOSE) 1967b1b4281SRoger A. Faulkner 1977b1b4281SRoger A. Faulkner# Make string literals read-only to save memory. 1987b1b4281SRoger A. FaulknerCFLAGS += $(XSTRCONST) 1997b1b4281SRoger A. FaulknerCFLAGS64 += $(XSTRCONST) 2007b1b4281SRoger A. FaulknerCCFLAGS += -_CC=-features=conststrings 2017b1b4281SRoger A. FaulknerCCFLAGS64 += -_CC=-features=conststrings 2027b1b4281SRoger A. Faulkner 2037014882cSRichard LoweCERRWARN += -_gcc=-Wno-char-subscripts 2047014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 2057014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 2067014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch 2077014882cSRichard LoweCERRWARN += -_gcc=-Wno-char-subscripts 2087014882cSRichard LoweCERRWARN += -_gcc=-Wno-empty-body 2097014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 2107014882cSRichard LoweCERRWARN += -_gcc=-Wno-clobbered 2117014882cSRichard Lowe 212d89524d0SrieLIBMP = -lmp 213d89524d0Srielint := LIBMP = 214b56bf881SAntonello CruzLDLIBS += $(LIBMP) -lmd -lc 215acd06957SJulian PullenDYNFLAGS += $(ZNODELETE) 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate$(LINTLIB):= SRCS=$(SRCDIR)/$(LINTSRC) 2187c478bd9Sstevel@tonic-gateLINTFLAGS += -m -DPORTMAP 2197c478bd9Sstevel@tonic-gateLINTFLAGS64 += -m -DPORTMAP 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate.KEEP_STATE: 2227c478bd9Sstevel@tonic-gate 2237257d1b4Srafall: $(LIBS) 224e8031f0aSraf 22561961e0fSrobinson# Don't lint WRAPPERS as they are explicitly unclean 2267c478bd9Sstevel@tonic-gateSRCS= $(DES:%.o=../des/%.c) \ 2277c478bd9Sstevel@tonic-gate $(DIAL:%.o=../dial/%.c) \ 2287c478bd9Sstevel@tonic-gate $(IPSEC:%.o=../ipsec/%.c) \ 2297c478bd9Sstevel@tonic-gate $(NETDIR:%.o=../netdir/%.c) \ 2307c478bd9Sstevel@tonic-gate $(NSS:%.o=../nss/%.c) \ 2317c478bd9Sstevel@tonic-gate $(NETSELECT:%.o=../netselect/%.c) \ 2327c478bd9Sstevel@tonic-gate $(NSL:%.o=../nsl/%.c) \ 2337c478bd9Sstevel@tonic-gate $(RPC:%.o=../rpc/%.c) \ 2347c478bd9Sstevel@tonic-gate $(SAF:%.o=../saf/%.c) \ 2357c478bd9Sstevel@tonic-gate $(YP:%.o=../yp/%.c) \ 2367c478bd9Sstevel@tonic-gate $(NIS_GEN:%.o=../nis/gen/%.c) \ 2377c478bd9Sstevel@tonic-gate $(COMMON:%.o=../common/%.c) 2387c478bd9Sstevel@tonic-gate 2397c478bd9Sstevel@tonic-gatelint: 2407c478bd9Sstevel@tonic-gate @$(LINT.c) $(SRCS) $(LDLIBS) 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gate# include library targets 2437c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 244