xref: /titanic_50/usr/src/lib/libnsl/Makefile.com (revision 884be64dd8e3b9a5e39540ec90da0a94008f4eb1)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28LIBRARY= libnsl.a
29VERS=	.1
30
31# objects are listed by source directory
32
33# common utility code used in more than one directory
34COMMON=		common.o daemon_utils.o nsl_stdio_prv.o
35
36DES=		des_crypt.o des_soft.o
37
38DIAL=		dial.o
39
40IPSEC=		algs.o
41
42NETDIR=		netdir.o
43
44NSS= \
45gethostbyname_r.o gethostent.o gethostent_r.o gethostent6.o gethostby_door.o \
46getipnodeby_door.o getipnodeby.o getrpcent.o  getrpcent_r.o inet_pton.o \
47inet_ntop.o netdir_inet.o netdir_inet_sundry.o \
48parse.o getauthattr.o getprofattr.o getexecattr.o getuserattr.o getauuser.o
49
50NETSELECT= netselect.o
51
52NSL=  \
53_conn_util.o    _data2.o        _errlst.o \
54_utility.o      t_accept.o	t_alloc.o       t_bind.o        t_close.o \
55t_connect.o     t_error.o	t_free.o        t_getinfo.o     t_getname.o \
56t_getstate.o    t_listen.o	t_look.o        t_open.o        t_optmgmt.o \
57t_rcv.o         t_rcvconnect.o	t_rcvdis.o      t_rcvrel.o      t_rcvudata.o \
58t_rcvuderr.o    t_snd.o		t_snddis.o      t_sndrel.o      t_sndudata.o \
59t_sndv.o	t_sndreldata.o  t_rcvv.o 	t_rcvreldata.o  t_sysconf.o \
60t_sndvudata.o	t_rcvvudata.o   t_sync.o        t_unbind.o	t_strerror.o \
61xti_wrappers.o
62
63WRAPPERS= \
64tli_wrappers.o
65
66RPC= \
67auth_des.o	auth_none.o	auth_sys.o	auth_time.o	authdes_prot.o \
68authsys_prot.o	can_use_af.o \
69clnt_bcast.o	clnt_dg.o	clnt_door.o	clnt_generic.o	clnt_perror.o \
70clnt_raw.o	clnt_simple.o	clnt_vc.o	fdsync.o	getdname.o \
71inet_ntoa.o	key_call.o	key_prot.o	mt_misc.o \
72netname.o	netnamer.o	openchild.o	pmap_clnt.o	pmap_prot.o \
73rpc_callmsg.o	rpc_comdata.o	rpc_comdata1.o	rpc_generic.o	rpc_prot.o \
74rpc_sel2poll.o \
75rpc_soc.o	rpc_td.o	rpcb_clnt.o	rpcb_prot.o \
76rpcb_st_xdr.o	rpcdname.o	rpcsec_gss_if.o	rtime_tli.o	svc.o \
77svc_auth.o	svc_auth_loopb.o	svc_auth_sys.o	svc_dg.o \
78svc_door.o	svc_generic.o	svc_raw.o	svc_run.o	svc_simple.o \
79svc_vc.o	svcauth_des.o	svid_funcs.o	ti_opts.o	xdr.o \
80xdr_array.o	xdr_float.o	xdr_mem.o	xdr_rec.o	xdr_refer.o \
81xdr_sizeof.o	xdr_stdio.o	xdr_stdio_prv.o
82
83SAF= checkver.o  doconfig.o
84
85YP=  \
86dbm.o           yp_all.o        yp_b_clnt.o     yp_b_xdr.o      yp_bind.o  \
87yp_enum.o       yp_master.o     yp_match.o      yp_order.o      yp_update.o \
88yperr_string.o  yp_xdr.o        ypprot_err.o    ypupd.o 	\
89yp_rsvd.o \
90yppasswd_xdr.o
91
92NIS_GEN=  \
93nislib.o          nis_callback.o   nis_xdr.o      nis_subr.o     nis_names.o  \
94nis_cback_xdr.o   print_obj.o      nis_perror.o   nis_groups.o   nis_tags.o   \
95nis_misc.o        nis_lookup.o     nis_rpc.o      nis_clnt.o	 nis_cast.o   \
96nis_hash.o	  nis_misc_proc.o  nis_sec_mechs.o npd_lib.o
97
98NIS_CACHE=  cache.o cache_api.o cold_start.o local_cache.o \
99	mapped_cache.o client_cache.o mgr_cache.o \
100	nis_cache_clnt.o nis_cache_xdr.o
101
102NIS= $(NIS_GEN) $(NIS_CACHE)
103
104KEY= publickey.o xcrypt.o gen_dhkeys.o
105
106OBJECTS= $(COMMON) $(DES) $(DIAL) $(IPSEC) $(NETDIR) $(NSS) $(NETSELECT) \
107	 $(NSL) $(WRAPPERS) $(RPC) $(SAF) $(YP) $(NIS) $(KEY)
108
109# libnsl build rules
110pics/%.o: ../common/%.c
111	$(COMPILE.c)  -o $@ $<
112	$(POST_PROCESS_O)
113
114pics/%.o: ../des/%.c
115	$(COMPILE.c)  -o $@ $<
116	$(POST_PROCESS_O)
117
118pics/%.o: ../dial/%.c
119	$(COMPILE.c)  -o $@ $<
120	$(POST_PROCESS_O)
121
122pics/%.o: ../ipsec/%.c
123	$(COMPILE.c)  -o $@ $<
124	$(POST_PROCESS_O)
125
126pics/%.o: ../netdir/%.c
127	$(COMPILE.c)  -o $@ $<
128	$(POST_PROCESS_O)
129
130pics/%.o: ../nss/%.c
131	$(COMPILE.c)  -o $@ $<
132	$(POST_PROCESS_O)
133
134pics/%.o: ../netselect/%.c
135	$(COMPILE.c)  -o $@ $<
136	$(POST_PROCESS_O)
137
138pics/%.o: ../nsl/%.c
139	$(COMPILE.c)  -o $@ $<
140	$(POST_PROCESS_O)
141
142pics/%.o: ../rpc/%.c
143	$(COMPILE.c) -DPORTMAP -DNIS  -o $@ $<
144	$(POST_PROCESS_O)
145
146pics/%.o: ../saf/%.c
147	$(COMPILE.c)  -o $@ $<
148	$(POST_PROCESS_O)
149
150pics/%.o: ../yp/%.c
151	$(COMPILE.c)   -o $@ $<
152	$(POST_PROCESS_O)
153
154pics/%.o: ../key/%.c
155	$(COMPILE.c)   -o $@ $<
156	$(POST_PROCESS_O)
157
158pics/%.o: ../nis/gen/%.c ../nis/gen/nis_clnt.h
159	$(COMPILE.c) -o $@ $<
160	$(POST_PROCESS_O)
161
162pics/%.o: ../nis/cache/%.c ../nis/cache/nis_clnt.h
163	$(COMPILE.c) -o $@ $<
164	$(POST_PROCESS_O)
165
166pics/%.o: ../nis/cache/%.cc ../nis/gen/nis_clnt.h \
167	../nis/cache/nis_clnt.h ../nis/cache/nis_cache.h
168	$(COMPILE.cc) -o $@ $<
169	$(POST_PROCESS_O)
170
171# include library definitions
172include ../../Makefile.lib
173
174# install this library in the root filesystem
175include ../../Makefile.rootfs
176
177LIBS =		$(DYNLIB) $(LINTLIB)
178
179MAPDIR=		../spec/$(TRANSMACH)
180SPECMAPFILE=	$(MAPDIR)/mapfile
181MAPOPTS=	$(MAPFILES:%=-M%)
182
183# Override the position-independent code generation flags.
184#
185# These files are particularly rich with references to global things.
186# Ordering is by number of got references per file of files that have
187# non-performance sensitive code in them.
188#
189# If you need to add more files and the GOT overflows with "pic" items,
190# then use the environment variable LD_OPTIONS=-Dgot,detail to have the
191# linker print out the list of GOT hogs..
192
193GOTHOGS =	dial.o print_obj.o clnt_perror.o
194BIGPICS =	$(GOTHOGS:%=pics/%)
195$(BIGPICS) :=	sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
196$(BIGPICS) :=	i386_C_PICFLAGS = $(C_BIGPICFLAGS)
197
198# Compile C++ code without exceptions to avoid a dependence on libC.
199NOEXCEPTIONS= -noex
200CCFLAGS += $(NOEXCEPTIONS)
201CCFLAGS64 += $(NOEXCEPTIONS)
202
203CPPFLAGS +=	-I$(SRC)/lib/common/inc -I$(SRC)/lib/libnsl/include -D_REENTRANT
204CPPFLAGS +=	-I$(SRC)/lib/libnsl/dial
205
206CFLAGS +=	-v
207
208LAZYLIBS = $(ZLAZYLOAD) -lmp -lmd5 -lscf $(ZNOLAZYLOAD)
209lint := LAZYLIBS = -lmd5
210LDLIBS +=	$(LAZYLIBS) -lc
211DYNFLAGS +=	$(MAPOPTS)
212
213SRCDIR=		../common
214$(LINTLIB):=	SRCS=$(SRCDIR)/$(LINTSRC)
215LINTFLAGS +=	-m -DPORTMAP
216LINTFLAGS64 +=	-m -DPORTMAP
217
218.KEEP_STATE:
219
220$(DYNLIB):	$(MAPFILES)
221
222all: $(LIBS) fnamecheck
223
224# Don't lint WRAPPERS as they are explicitly unclean
225SRCS=	$(DES:%.o=../des/%.c)			\
226	$(DIAL:%.o=../dial/%.c)			\
227	$(IPSEC:%.o=../ipsec/%.c)		\
228	$(NETDIR:%.o=../netdir/%.c)		\
229	$(NSS:%.o=../nss/%.c)			\
230	$(NETSELECT:%.o=../netselect/%.c)	\
231	$(NSL:%.o=../nsl/%.c)			\
232	$(RPC:%.o=../rpc/%.c)			\
233	$(SAF:%.o=../saf/%.c)			\
234	$(YP:%.o=../yp/%.c)			\
235	$(NIS_GEN:%.o=../nis/gen/%.c)		\
236	$(COMMON:%.o=../common/%.c)
237
238lint:
239	@echo $(LINT.c) ...
240	@$(LINT.c) $(SRCS) $(LDLIBS)
241
242# include library targets
243include ../../Makefile.targ
244