xref: /illumos-gate/usr/src/lib/libnsl/Makefile.com (revision d17be682)
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.
248a7aa2a5SYuri Pankov# Copyright 2018 Nexenta Systems, Inc. All rights reserved.
2505ede3dbSJohn Levon# Copyright (c) 2018, Joyent, Inc.
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 \
469b241b4eSYuri Pankovgetipnodeby_door.o getipnodeby.o getrpcent.o  getrpcent_r.o inet_matchaddr.o \
478a7aa2a5SYuri Pankovnetdir_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 \
598a7aa2a5SYuri Pankovt_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 \
718a7aa2a5SYuri Pankovkey_call.o	key_prot.o	mt_misc.o \
72004388ebScaspernetname.o	netnamer.o	pmap_clnt.o	pmap_prot.o \
732209d3c8SRichard Lowerpc_callmsg.o	rpc_comdata.o	rpc_generic.o	rpc_prot.o rpc_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 \
878a7aa2a5SYuri Pankovyperr_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
167*241c90a0SRichard LoweLIBS =		$(DYNLIB)
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
1873e76f9d6SRichard LoweCPPFLAGS +=	-I$(SRC)/lib/libnsl/include -D_REENTRANT
18861961e0fSrobinsonCPPFLAGS +=	-I$(SRC)/lib/libnsl/dial
18961961e0fSrobinson
190f808c858SrafCFLAGS +=	$(CCVERBOSE)
1917b1b4281SRoger A. Faulkner
1927014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-char-subscripts
1937014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
194d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
1957014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
1967014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-char-subscripts
1977014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-empty-body
1987014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
1997014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-clobbered
2007014882cSRichard Lowe
20105ede3dbSJohn Levon# not linted
20205ede3dbSJohn LevonSMATCH=off
20305ede3dbSJohn Levon
204d89524d0SrieLIBMP =		-lmp
205b56bf881SAntonello CruzLDLIBS +=	$(LIBMP) -lmd -lc
206acd06957SJulian PullenDYNFLAGS +=	$(ZNODELETE)
2077c478bd9Sstevel@tonic-gate
2087c478bd9Sstevel@tonic-gate
2097c478bd9Sstevel@tonic-gate.KEEP_STATE:
2107c478bd9Sstevel@tonic-gate
2117257d1b4Srafall: $(LIBS)
212e8031f0aSraf
2137c478bd9Sstevel@tonic-gateSRCS=	$(DES:%.o=../des/%.c)			\
2147c478bd9Sstevel@tonic-gate	$(DIAL:%.o=../dial/%.c)			\
2157c478bd9Sstevel@tonic-gate	$(IPSEC:%.o=../ipsec/%.c)		\
2167c478bd9Sstevel@tonic-gate	$(NETDIR:%.o=../netdir/%.c)		\
2177c478bd9Sstevel@tonic-gate	$(NSS:%.o=../nss/%.c)			\
2187c478bd9Sstevel@tonic-gate	$(NETSELECT:%.o=../netselect/%.c)	\
2197c478bd9Sstevel@tonic-gate	$(NSL:%.o=../nsl/%.c)			\
2207c478bd9Sstevel@tonic-gate	$(RPC:%.o=../rpc/%.c)			\
2217c478bd9Sstevel@tonic-gate	$(SAF:%.o=../saf/%.c)			\
2227c478bd9Sstevel@tonic-gate	$(YP:%.o=../yp/%.c)			\
2237c478bd9Sstevel@tonic-gate	$(NIS_GEN:%.o=../nis/gen/%.c)		\
2247c478bd9Sstevel@tonic-gate	$(COMMON:%.o=../common/%.c)
2257c478bd9Sstevel@tonic-gate
2267c478bd9Sstevel@tonic-gate
2277c478bd9Sstevel@tonic-gate# include library targets
2287c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
229