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