xref: /illumos-gate/usr/src/lib/libnsl/Makefile.com (revision 3e76f9d6851ef6c63217178eb67278ec2809b944)
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 \
722209d3c8SRichard Lowerpc_callmsg.o	rpc_comdata.o	rpc_generic.o	rpc_prot.o rpc_sel2poll.o \
7361961e0fSrobinsonrpc_soc.o	rpc_td.o	rpcb_clnt.o	rpcb_prot.o \
747c478bd9Sstevel@tonic-gaterpcb_st_xdr.o	rpcdname.o	rpcsec_gss_if.o	rtime_tli.o	svc.o \
757c478bd9Sstevel@tonic-gatesvc_auth.o	svc_auth_loopb.o	svc_auth_sys.o	svc_dg.o \
767c478bd9Sstevel@tonic-gatesvc_door.o	svc_generic.o	svc_raw.o	svc_run.o	svc_simple.o \
777c478bd9Sstevel@tonic-gatesvc_vc.o	svcauth_des.o	svid_funcs.o	ti_opts.o	xdr.o \
787c478bd9Sstevel@tonic-gatexdr_array.o	xdr_float.o	xdr_mem.o	xdr_rec.o	xdr_refer.o \
79004388ebScasperxdr_sizeof.o	xdr_stdio.o
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gateSAF= checkver.o  doconfig.o
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateYP=  \
847c478bd9Sstevel@tonic-gatedbm.o           yp_all.o        yp_b_clnt.o     yp_b_xdr.o      yp_bind.o  \
857c478bd9Sstevel@tonic-gateyp_enum.o       yp_master.o     yp_match.o      yp_order.o      yp_update.o \
867c478bd9Sstevel@tonic-gateyperr_string.o  yp_xdr.o        ypprot_err.o    ypupd.o 	\
877c478bd9Sstevel@tonic-gateyp_rsvd.o \
887c478bd9Sstevel@tonic-gateyppasswd_xdr.o
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gateNIS_GEN=  \
9136e852a1SRaja Andranis_xdr.o      nis_subr.o       nis_misc.o         \
9236e852a1SRaja Andranis_misc_proc.o  nis_sec_mechs.o
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate
9536e852a1SRaja AndraNIS= $(NIS_GEN)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateKEY= publickey.o xcrypt.o gen_dhkeys.o
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gateOBJECTS= $(COMMON) $(DES) $(DIAL) $(IPSEC) $(NETDIR) $(NSS) $(NETSELECT) \
10061961e0fSrobinson	 $(NSL) $(WRAPPERS) $(RPC) $(SAF) $(YP) $(NIS) $(KEY)
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gate# libnsl build rules
1037c478bd9Sstevel@tonic-gatepics/%.o: ../common/%.c
1047c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1057c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gatepics/%.o: ../des/%.c
1087c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1097c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gatepics/%.o: ../dial/%.c
1127c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1137c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gatepics/%.o: ../ipsec/%.c
1167c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1177c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gatepics/%.o: ../netdir/%.c
1207c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1217c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1227c478bd9Sstevel@tonic-gate
1237c478bd9Sstevel@tonic-gatepics/%.o: ../nss/%.c
1247c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1257c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gatepics/%.o: ../netselect/%.c
1287c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1297c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1307c478bd9Sstevel@tonic-gate
1317c478bd9Sstevel@tonic-gatepics/%.o: ../nsl/%.c
1327c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1337c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gatepics/%.o: ../rpc/%.c
1367c478bd9Sstevel@tonic-gate	$(COMPILE.c) -DPORTMAP -DNIS  -o $@ $<
1377c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gatepics/%.o: ../saf/%.c
1407c478bd9Sstevel@tonic-gate	$(COMPILE.c)  -o $@ $<
1417c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1427c478bd9Sstevel@tonic-gate
1437c478bd9Sstevel@tonic-gatepics/%.o: ../yp/%.c
1447c478bd9Sstevel@tonic-gate	$(COMPILE.c)   -o $@ $<
1457c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1467c478bd9Sstevel@tonic-gate
1477c478bd9Sstevel@tonic-gatepics/%.o: ../key/%.c
1487c478bd9Sstevel@tonic-gate	$(COMPILE.c)   -o $@ $<
1497c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1507c478bd9Sstevel@tonic-gate
1517c478bd9Sstevel@tonic-gatepics/%.o: ../nis/gen/%.c ../nis/gen/nis_clnt.h
1527c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1537c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1547c478bd9Sstevel@tonic-gate
1557c478bd9Sstevel@tonic-gate
15636e852a1SRaja Andrapics/%.o: ../nis/gen/nis_clnt.h
1577c478bd9Sstevel@tonic-gate	$(COMPILE.cc) -o $@ $<
1587c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1597c478bd9Sstevel@tonic-gate
1607c478bd9Sstevel@tonic-gate# include library definitions
1617c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
1627c478bd9Sstevel@tonic-gate
1637c478bd9Sstevel@tonic-gate# install this library in the root filesystem
1647c478bd9Sstevel@tonic-gateinclude ../../Makefile.rootfs
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gateLIBS =		$(DYNLIB) $(LINTLIB)
1677c478bd9Sstevel@tonic-gate
168f808c858SrafSRCDIR=		../common
1697c478bd9Sstevel@tonic-gate
1707c478bd9Sstevel@tonic-gate# Override the position-independent code generation flags.
1717c478bd9Sstevel@tonic-gate#
1727c478bd9Sstevel@tonic-gate# These files are particularly rich with references to global things.
1737c478bd9Sstevel@tonic-gate# Ordering is by number of got references per file of files that have
1747c478bd9Sstevel@tonic-gate# non-performance sensitive code in them.
1757c478bd9Sstevel@tonic-gate#
1767c478bd9Sstevel@tonic-gate# If you need to add more files and the GOT overflows with "pic" items,
1777c478bd9Sstevel@tonic-gate# then use the environment variable LD_OPTIONS=-Dgot,detail to have the
1787c478bd9Sstevel@tonic-gate# linker print out the list of GOT hogs..
1797c478bd9Sstevel@tonic-gate
18045916cd2SjpkGOTHOGS =	dial.o print_obj.o clnt_perror.o nsl_stdio_prv.o netdir.o \
18145916cd2Sjpk		algs.o netselect.o
1827c478bd9Sstevel@tonic-gateBIGPICS =	$(GOTHOGS:%=pics/%)
1837c478bd9Sstevel@tonic-gate$(BIGPICS) :=	sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
1847c478bd9Sstevel@tonic-gate$(BIGPICS) :=	i386_C_PICFLAGS = $(C_BIGPICFLAGS)
1857c478bd9Sstevel@tonic-gate
1867c478bd9Sstevel@tonic-gate# Compile C++ code without exceptions to avoid a dependence on libC.
1877c478bd9Sstevel@tonic-gateNOEXCEPTIONS= -noex
1887c478bd9Sstevel@tonic-gateCCFLAGS += $(NOEXCEPTIONS)
1897c478bd9Sstevel@tonic-gateCCFLAGS64 += $(NOEXCEPTIONS)
1907c478bd9Sstevel@tonic-gate
191*3e76f9d6SRichard LoweCPPFLAGS +=	-I$(SRC)/lib/libnsl/include -D_REENTRANT
19261961e0fSrobinsonCPPFLAGS +=	-I$(SRC)/lib/libnsl/dial
19361961e0fSrobinson
194f808c858SrafCFLAGS +=	$(CCVERBOSE)
1957b1b4281SRoger A. Faulkner
1967b1b4281SRoger A. Faulkner# Make string literals read-only to save memory.
1977b1b4281SRoger A. FaulknerCFLAGS +=	$(XSTRCONST)
1987b1b4281SRoger A. FaulknerCFLAGS64 +=	$(XSTRCONST)
1997b1b4281SRoger A. FaulknerCCFLAGS +=	-_CC=-features=conststrings
2007b1b4281SRoger A. FaulknerCCFLAGS64 +=	-_CC=-features=conststrings
2017b1b4281SRoger A. Faulkner
2027014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-char-subscripts
2037014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
2047014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
2057014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
2067014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-char-subscripts
2077014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-empty-body
2087014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
2097014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-clobbered
2107014882cSRichard Lowe
211d89524d0SrieLIBMP =		-lmp
212d89524d0Srielint :=		LIBMP =
213b56bf881SAntonello CruzLDLIBS +=	$(LIBMP) -lmd -lc
214acd06957SJulian PullenDYNFLAGS +=	$(ZNODELETE)
2157c478bd9Sstevel@tonic-gate
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
2227257d1b4Srafall: $(LIBS)
223e8031f0aSraf
22461961e0fSrobinson# Don't lint WRAPPERS as they are explicitly unclean
2257c478bd9Sstevel@tonic-gateSRCS=	$(DES:%.o=../des/%.c)			\
2267c478bd9Sstevel@tonic-gate	$(DIAL:%.o=../dial/%.c)			\
2277c478bd9Sstevel@tonic-gate	$(IPSEC:%.o=../ipsec/%.c)		\
2287c478bd9Sstevel@tonic-gate	$(NETDIR:%.o=../netdir/%.c)		\
2297c478bd9Sstevel@tonic-gate	$(NSS:%.o=../nss/%.c)			\
2307c478bd9Sstevel@tonic-gate	$(NETSELECT:%.o=../netselect/%.c)	\
2317c478bd9Sstevel@tonic-gate	$(NSL:%.o=../nsl/%.c)			\
2327c478bd9Sstevel@tonic-gate	$(RPC:%.o=../rpc/%.c)			\
2337c478bd9Sstevel@tonic-gate	$(SAF:%.o=../saf/%.c)			\
2347c478bd9Sstevel@tonic-gate	$(YP:%.o=../yp/%.c)			\
2357c478bd9Sstevel@tonic-gate	$(NIS_GEN:%.o=../nis/gen/%.c)		\
2367c478bd9Sstevel@tonic-gate	$(COMMON:%.o=../common/%.c)
2377c478bd9Sstevel@tonic-gate
2387c478bd9Sstevel@tonic-gatelint:
2397c478bd9Sstevel@tonic-gate	@$(LINT.c) $(SRCS) $(LDLIBS)
2407c478bd9Sstevel@tonic-gate
2417c478bd9Sstevel@tonic-gate# include library targets
2427c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
243