1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate# with the License. 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate# and limitations under the License. 13*7c478bd9Sstevel@tonic-gate# 14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate# 20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate# 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate# 26*7c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 27*7c478bd9Sstevel@tonic-gate# 28*7c478bd9Sstevel@tonic-gateLIBRARY= libnsl.a 29*7c478bd9Sstevel@tonic-gateVERS= .1 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate# objects are listed by source directory 32*7c478bd9Sstevel@tonic-gate 33*7c478bd9Sstevel@tonic-gate# common utility code used in more than one directory 34*7c478bd9Sstevel@tonic-gateCOMMON= common.o daemon_utils.o nsl_stdio_prv.o 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gateDES= des_crypt.o des_soft.o 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gateDIAL= dial.o 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gateIPSEC= algs.o 41*7c478bd9Sstevel@tonic-gate 42*7c478bd9Sstevel@tonic-gateNETDIR= netdir.o 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gateNSS= \ 45*7c478bd9Sstevel@tonic-gategethostbyname_r.o gethostent.o gethostent_r.o gethostent6.o gethostby_door.o \ 46*7c478bd9Sstevel@tonic-gategetipnodeby_door.o getipnodeby.o getrpcent.o getrpcent_r.o inet_pton.o \ 47*7c478bd9Sstevel@tonic-gateinet_ntop.o netdir_inet.o netdir_inet_sundry.o \ 48*7c478bd9Sstevel@tonic-gateparse.o getauthattr.o getprofattr.o getexecattr.o getuserattr.o getauuser.o 49*7c478bd9Sstevel@tonic-gate 50*7c478bd9Sstevel@tonic-gateNETSELECT= netselect.o 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gateNSL= \ 53*7c478bd9Sstevel@tonic-gate_conn_util.o _data2.o _errlst.o \ 54*7c478bd9Sstevel@tonic-gate_utility.o t_accept.o t_alloc.o t_bind.o t_close.o \ 55*7c478bd9Sstevel@tonic-gatet_connect.o t_error.o t_free.o t_getinfo.o t_getname.o \ 56*7c478bd9Sstevel@tonic-gatet_getstate.o t_listen.o t_look.o t_open.o t_optmgmt.o \ 57*7c478bd9Sstevel@tonic-gatet_rcv.o t_rcvconnect.o t_rcvdis.o t_rcvrel.o t_rcvudata.o \ 58*7c478bd9Sstevel@tonic-gatet_rcvuderr.o t_snd.o t_snddis.o t_sndrel.o t_sndudata.o \ 59*7c478bd9Sstevel@tonic-gatet_sndv.o t_sndreldata.o t_rcvv.o t_rcvreldata.o t_sysconf.o \ 60*7c478bd9Sstevel@tonic-gatet_sndvudata.o t_rcvvudata.o t_sync.o t_unbind.o t_strerror.o \ 61*7c478bd9Sstevel@tonic-gatetli_wrappers.o xti_wrappers.o 62*7c478bd9Sstevel@tonic-gate 63*7c478bd9Sstevel@tonic-gateRPC= \ 64*7c478bd9Sstevel@tonic-gateauth_des.o auth_none.o auth_sys.o auth_time.o authdes_prot.o \ 65*7c478bd9Sstevel@tonic-gateauthsys_prot.o can_use_af.o \ 66*7c478bd9Sstevel@tonic-gateclnt_bcast.o clnt_dg.o clnt_door.o clnt_generic.o clnt_perror.o \ 67*7c478bd9Sstevel@tonic-gateclnt_raw.o clnt_simple.o clnt_vc.o fdsync.o getdname.o \ 68*7c478bd9Sstevel@tonic-gateinet_ntoa.o key_call.o key_prot.o mt_misc.o \ 69*7c478bd9Sstevel@tonic-gatenetname.o netnamer.o openchild.o pmap_clnt.o pmap_prot.o \ 70*7c478bd9Sstevel@tonic-gaterpc_callmsg.o rpc_comdata.o rpc_comdata1.o rpc_generic.o rpc_prot.o \ 71*7c478bd9Sstevel@tonic-gaterpc_sel2poll.o \ 72*7c478bd9Sstevel@tonic-gaterpc_soc.o rpc_td.o rpc_trace.o rpcb_clnt.o rpcb_prot.o \ 73*7c478bd9Sstevel@tonic-gaterpcb_st_xdr.o rpcdname.o rpcsec_gss_if.o rtime_tli.o svc.o \ 74*7c478bd9Sstevel@tonic-gatesvc_auth.o svc_auth_loopb.o svc_auth_sys.o svc_dg.o \ 75*7c478bd9Sstevel@tonic-gatesvc_door.o svc_generic.o svc_raw.o svc_run.o svc_simple.o \ 76*7c478bd9Sstevel@tonic-gatesvc_vc.o svcauth_des.o svid_funcs.o ti_opts.o xdr.o \ 77*7c478bd9Sstevel@tonic-gatexdr_array.o xdr_float.o xdr_mem.o xdr_rec.o xdr_refer.o \ 78*7c478bd9Sstevel@tonic-gatexdr_sizeof.o xdr_stdio.o xdr_stdio_prv.o 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gateSAF= checkver.o doconfig.o 81*7c478bd9Sstevel@tonic-gate 82*7c478bd9Sstevel@tonic-gateYP= \ 83*7c478bd9Sstevel@tonic-gatedbm.o yp_all.o yp_b_clnt.o yp_b_xdr.o yp_bind.o \ 84*7c478bd9Sstevel@tonic-gateyp_enum.o yp_master.o yp_match.o yp_order.o yp_update.o \ 85*7c478bd9Sstevel@tonic-gateyperr_string.o yp_xdr.o ypprot_err.o ypupd.o \ 86*7c478bd9Sstevel@tonic-gateyp_rsvd.o \ 87*7c478bd9Sstevel@tonic-gateyppasswd_xdr.o 88*7c478bd9Sstevel@tonic-gate 89*7c478bd9Sstevel@tonic-gateNIS_GEN= \ 90*7c478bd9Sstevel@tonic-gatenislib.o nis_callback.o nis_xdr.o nis_subr.o nis_names.o \ 91*7c478bd9Sstevel@tonic-gatenis_cback_xdr.o print_obj.o nis_perror.o nis_groups.o nis_tags.o \ 92*7c478bd9Sstevel@tonic-gatenis_misc.o nis_lookup.o nis_rpc.o nis_clnt.o nis_cast.o \ 93*7c478bd9Sstevel@tonic-gatenis_hash.o nis_misc_proc.o nis_sec_mechs.o npd_lib.o 94*7c478bd9Sstevel@tonic-gate 95*7c478bd9Sstevel@tonic-gateNIS_CACHE= cache.o cache_api.o cold_start.o local_cache.o \ 96*7c478bd9Sstevel@tonic-gate mapped_cache.o client_cache.o mgr_cache.o \ 97*7c478bd9Sstevel@tonic-gate nis_cache_clnt.o nis_cache_xdr.o 98*7c478bd9Sstevel@tonic-gate 99*7c478bd9Sstevel@tonic-gateNIS= $(NIS_GEN) $(NIS_CACHE) 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gateKEY= publickey.o xcrypt.o gen_dhkeys.o 102*7c478bd9Sstevel@tonic-gate 103*7c478bd9Sstevel@tonic-gateOBJECTS= $(COMMON) $(DES) $(DIAL) $(IPSEC) $(NETDIR) $(NSS) $(NETSELECT) \ 104*7c478bd9Sstevel@tonic-gate $(NSL) $(RPC) $(SAF) $(YP) $(NIS) $(KEY) 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate# libnsl build rules 107*7c478bd9Sstevel@tonic-gatepics/%.o: ../common/%.c 108*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 109*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 110*7c478bd9Sstevel@tonic-gate 111*7c478bd9Sstevel@tonic-gatepics/%.o: ../des/%.c 112*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 113*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 114*7c478bd9Sstevel@tonic-gate 115*7c478bd9Sstevel@tonic-gatepics/%.o: ../dial/%.c 116*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 117*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 118*7c478bd9Sstevel@tonic-gate 119*7c478bd9Sstevel@tonic-gatepics/%.o: ../ipsec/%.c 120*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 121*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 122*7c478bd9Sstevel@tonic-gate 123*7c478bd9Sstevel@tonic-gatepics/%.o: ../netdir/%.c 124*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 125*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gatepics/%.o: ../nss/%.c 128*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 129*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 130*7c478bd9Sstevel@tonic-gate 131*7c478bd9Sstevel@tonic-gatepics/%.o: ../netselect/%.c 132*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 133*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 134*7c478bd9Sstevel@tonic-gate 135*7c478bd9Sstevel@tonic-gatepics/%.o: ../nsl/%.c 136*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 137*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 138*7c478bd9Sstevel@tonic-gate 139*7c478bd9Sstevel@tonic-gatepics/%.o: ../rpc/%.c 140*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -DPORTMAP -DNIS -o $@ $< 141*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 142*7c478bd9Sstevel@tonic-gate 143*7c478bd9Sstevel@tonic-gatepics/%.o: ../saf/%.c 144*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 145*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 146*7c478bd9Sstevel@tonic-gate 147*7c478bd9Sstevel@tonic-gatepics/%.o: ../yp/%.c 148*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 149*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 150*7c478bd9Sstevel@tonic-gate 151*7c478bd9Sstevel@tonic-gatepics/%.o: ../key/%.c 152*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 153*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 154*7c478bd9Sstevel@tonic-gate 155*7c478bd9Sstevel@tonic-gatepics/%.o: ../nis/gen/%.c ../nis/gen/nis_clnt.h 156*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 157*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 158*7c478bd9Sstevel@tonic-gate 159*7c478bd9Sstevel@tonic-gatepics/%.o: ../nis/cache/%.c ../nis/cache/nis_clnt.h 160*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 161*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 162*7c478bd9Sstevel@tonic-gate 163*7c478bd9Sstevel@tonic-gatepics/%.o: ../nis/cache/%.cc ../nis/gen/nis_clnt.h \ 164*7c478bd9Sstevel@tonic-gate ../nis/cache/nis_clnt.h ../nis/cache/nis_cache.h 165*7c478bd9Sstevel@tonic-gate $(COMPILE.cc) -o $@ $< 166*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 167*7c478bd9Sstevel@tonic-gate 168*7c478bd9Sstevel@tonic-gate# include library definitions 169*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib 170*7c478bd9Sstevel@tonic-gate 171*7c478bd9Sstevel@tonic-gate# install this library in the root filesystem 172*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.rootfs 173*7c478bd9Sstevel@tonic-gate 174*7c478bd9Sstevel@tonic-gateLIBS = $(DYNLIB) $(LINTLIB) 175*7c478bd9Sstevel@tonic-gate 176*7c478bd9Sstevel@tonic-gateMAPDIR= ../spec/$(TRANSMACH) 177*7c478bd9Sstevel@tonic-gateSPECMAPFILE= $(MAPDIR)/mapfile 178*7c478bd9Sstevel@tonic-gateMAPOPTS= $(MAPFILES:%=-M%) 179*7c478bd9Sstevel@tonic-gate 180*7c478bd9Sstevel@tonic-gate# Override the position-independent code generation flags. 181*7c478bd9Sstevel@tonic-gate# 182*7c478bd9Sstevel@tonic-gate# These files are particularly rich with references to global things. 183*7c478bd9Sstevel@tonic-gate# Ordering is by number of got references per file of files that have 184*7c478bd9Sstevel@tonic-gate# non-performance sensitive code in them. 185*7c478bd9Sstevel@tonic-gate# 186*7c478bd9Sstevel@tonic-gate# If you need to add more files and the GOT overflows with "pic" items, 187*7c478bd9Sstevel@tonic-gate# then use the environment variable LD_OPTIONS=-Dgot,detail to have the 188*7c478bd9Sstevel@tonic-gate# linker print out the list of GOT hogs.. 189*7c478bd9Sstevel@tonic-gate 190*7c478bd9Sstevel@tonic-gateGOTHOGS = dial.o print_obj.o clnt_perror.o 191*7c478bd9Sstevel@tonic-gateBIGPICS = $(GOTHOGS:%=pics/%) 192*7c478bd9Sstevel@tonic-gate$(BIGPICS) := sparc_C_PICFLAGS = $(C_BIGPICFLAGS) 193*7c478bd9Sstevel@tonic-gate$(BIGPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS) 194*7c478bd9Sstevel@tonic-gate 195*7c478bd9Sstevel@tonic-gate# Compile C++ code without exceptions to avoid a dependence on libC. 196*7c478bd9Sstevel@tonic-gateNOEXCEPTIONS= -noex 197*7c478bd9Sstevel@tonic-gateCCFLAGS += $(NOEXCEPTIONS) 198*7c478bd9Sstevel@tonic-gateCCFLAGS64 += $(NOEXCEPTIONS) 199*7c478bd9Sstevel@tonic-gate 200*7c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/lib/common/inc -I$(SRC)/lib/libnsl/include -D_REENTRANT 201*7c478bd9Sstevel@tonic-gate 202*7c478bd9Sstevel@tonic-gateLAZYLIBS = $(ZLAZYLOAD) -lmp -lmd5 -lscf $(ZNOLAZYLOAD) 203*7c478bd9Sstevel@tonic-gatelint := LAZYLIBS = -lmp -lmd5 204*7c478bd9Sstevel@tonic-gateLDLIBS += $(LAZYLIBS) -lc 205*7c478bd9Sstevel@tonic-gateDYNFLAGS += $(MAPOPTS) 206*7c478bd9Sstevel@tonic-gate 207*7c478bd9Sstevel@tonic-gateSRCDIR= ../common 208*7c478bd9Sstevel@tonic-gate$(LINTLIB):= SRCS=$(SRCDIR)/$(LINTSRC) 209*7c478bd9Sstevel@tonic-gateLINTFLAGS += -m -DPORTMAP 210*7c478bd9Sstevel@tonic-gateLINTFLAGS64 += -m -DPORTMAP 211*7c478bd9Sstevel@tonic-gate 212*7c478bd9Sstevel@tonic-gate.KEEP_STATE: 213*7c478bd9Sstevel@tonic-gate 214*7c478bd9Sstevel@tonic-gate$(DYNLIB): $(MAPFILES) 215*7c478bd9Sstevel@tonic-gate 216*7c478bd9Sstevel@tonic-gateSRCS= $(DES:%.o=../des/%.c) \ 217*7c478bd9Sstevel@tonic-gate $(DIAL:%.o=../dial/%.c) \ 218*7c478bd9Sstevel@tonic-gate $(IPSEC:%.o=../ipsec/%.c) \ 219*7c478bd9Sstevel@tonic-gate $(NETDIR:%.o=../netdir/%.c) \ 220*7c478bd9Sstevel@tonic-gate $(NSS:%.o=../nss/%.c) \ 221*7c478bd9Sstevel@tonic-gate $(NETSELECT:%.o=../netselect/%.c) \ 222*7c478bd9Sstevel@tonic-gate $(NSL:%.o=../nsl/%.c) \ 223*7c478bd9Sstevel@tonic-gate $(RPC:%.o=../rpc/%.c) \ 224*7c478bd9Sstevel@tonic-gate $(SAF:%.o=../saf/%.c) \ 225*7c478bd9Sstevel@tonic-gate $(YP:%.o=../yp/%.c) \ 226*7c478bd9Sstevel@tonic-gate $(NIS_GEN:%.o=../nis/gen/%.c) \ 227*7c478bd9Sstevel@tonic-gate $(COMMON:%.o=../common/%.c) 228*7c478bd9Sstevel@tonic-gate 229*7c478bd9Sstevel@tonic-gatelint: 230*7c478bd9Sstevel@tonic-gate @echo $(LINT.c) ... 231*7c478bd9Sstevel@tonic-gate @$(LINT.c) $(SRCS) $(LDLIBS) 232*7c478bd9Sstevel@tonic-gate 233*7c478bd9Sstevel@tonic-gate# include library targets 234*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 235