xref: /titanic_44/usr/src/lib/libnsl/Makefile.com (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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 2005 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 \
61tli_wrappers.o  xti_wrappers.o
62
63RPC= \
64auth_des.o	auth_none.o	auth_sys.o	auth_time.o	authdes_prot.o \
65authsys_prot.o	can_use_af.o \
66clnt_bcast.o	clnt_dg.o	clnt_door.o	clnt_generic.o	clnt_perror.o \
67clnt_raw.o	clnt_simple.o	clnt_vc.o	fdsync.o	getdname.o \
68inet_ntoa.o	key_call.o	key_prot.o	mt_misc.o \
69netname.o	netnamer.o	openchild.o	pmap_clnt.o	pmap_prot.o \
70rpc_callmsg.o	rpc_comdata.o	rpc_comdata1.o	rpc_generic.o	rpc_prot.o \
71rpc_sel2poll.o \
72rpc_soc.o	rpc_td.o	rpc_trace.o	rpcb_clnt.o	rpcb_prot.o \
73rpcb_st_xdr.o	rpcdname.o	rpcsec_gss_if.o	rtime_tli.o	svc.o \
74svc_auth.o	svc_auth_loopb.o	svc_auth_sys.o	svc_dg.o \
75svc_door.o	svc_generic.o	svc_raw.o	svc_run.o	svc_simple.o \
76svc_vc.o	svcauth_des.o	svid_funcs.o	ti_opts.o	xdr.o \
77xdr_array.o	xdr_float.o	xdr_mem.o	xdr_rec.o	xdr_refer.o \
78xdr_sizeof.o	xdr_stdio.o	xdr_stdio_prv.o
79
80SAF= checkver.o  doconfig.o
81
82YP=  \
83dbm.o           yp_all.o        yp_b_clnt.o     yp_b_xdr.o      yp_bind.o  \
84yp_enum.o       yp_master.o     yp_match.o      yp_order.o      yp_update.o \
85yperr_string.o  yp_xdr.o        ypprot_err.o    ypupd.o 	\
86yp_rsvd.o \
87yppasswd_xdr.o
88
89NIS_GEN=  \
90nislib.o          nis_callback.o   nis_xdr.o      nis_subr.o     nis_names.o  \
91nis_cback_xdr.o   print_obj.o      nis_perror.o   nis_groups.o   nis_tags.o   \
92nis_misc.o        nis_lookup.o     nis_rpc.o      nis_clnt.o	 nis_cast.o   \
93nis_hash.o	  nis_misc_proc.o  nis_sec_mechs.o npd_lib.o
94
95NIS_CACHE=  cache.o cache_api.o cold_start.o local_cache.o \
96	mapped_cache.o client_cache.o mgr_cache.o \
97	nis_cache_clnt.o nis_cache_xdr.o
98
99NIS= $(NIS_GEN) $(NIS_CACHE)
100
101KEY= publickey.o xcrypt.o gen_dhkeys.o
102
103OBJECTS= $(COMMON) $(DES) $(DIAL) $(IPSEC) $(NETDIR) $(NSS) $(NETSELECT) \
104	 $(NSL) $(RPC) $(SAF) $(YP) $(NIS) $(KEY)
105
106# libnsl build rules
107pics/%.o: ../common/%.c
108	$(COMPILE.c)  -o $@ $<
109	$(POST_PROCESS_O)
110
111pics/%.o: ../des/%.c
112	$(COMPILE.c)  -o $@ $<
113	$(POST_PROCESS_O)
114
115pics/%.o: ../dial/%.c
116	$(COMPILE.c)  -o $@ $<
117	$(POST_PROCESS_O)
118
119pics/%.o: ../ipsec/%.c
120	$(COMPILE.c)  -o $@ $<
121	$(POST_PROCESS_O)
122
123pics/%.o: ../netdir/%.c
124	$(COMPILE.c)  -o $@ $<
125	$(POST_PROCESS_O)
126
127pics/%.o: ../nss/%.c
128	$(COMPILE.c)  -o $@ $<
129	$(POST_PROCESS_O)
130
131pics/%.o: ../netselect/%.c
132	$(COMPILE.c)  -o $@ $<
133	$(POST_PROCESS_O)
134
135pics/%.o: ../nsl/%.c
136	$(COMPILE.c)  -o $@ $<
137	$(POST_PROCESS_O)
138
139pics/%.o: ../rpc/%.c
140	$(COMPILE.c) -DPORTMAP -DNIS  -o $@ $<
141	$(POST_PROCESS_O)
142
143pics/%.o: ../saf/%.c
144	$(COMPILE.c)  -o $@ $<
145	$(POST_PROCESS_O)
146
147pics/%.o: ../yp/%.c
148	$(COMPILE.c)   -o $@ $<
149	$(POST_PROCESS_O)
150
151pics/%.o: ../key/%.c
152	$(COMPILE.c)   -o $@ $<
153	$(POST_PROCESS_O)
154
155pics/%.o: ../nis/gen/%.c ../nis/gen/nis_clnt.h
156	$(COMPILE.c) -o $@ $<
157	$(POST_PROCESS_O)
158
159pics/%.o: ../nis/cache/%.c ../nis/cache/nis_clnt.h
160	$(COMPILE.c) -o $@ $<
161	$(POST_PROCESS_O)
162
163pics/%.o: ../nis/cache/%.cc ../nis/gen/nis_clnt.h \
164	../nis/cache/nis_clnt.h ../nis/cache/nis_cache.h
165	$(COMPILE.cc) -o $@ $<
166	$(POST_PROCESS_O)
167
168# include library definitions
169include ../../Makefile.lib
170
171# install this library in the root filesystem
172include ../../Makefile.rootfs
173
174LIBS =		$(DYNLIB) $(LINTLIB)
175
176MAPDIR=		../spec/$(TRANSMACH)
177SPECMAPFILE=	$(MAPDIR)/mapfile
178MAPOPTS=	$(MAPFILES:%=-M%)
179
180# Override the position-independent code generation flags.
181#
182# These files are particularly rich with references to global things.
183# Ordering is by number of got references per file of files that have
184# non-performance sensitive code in them.
185#
186# If you need to add more files and the GOT overflows with "pic" items,
187# then use the environment variable LD_OPTIONS=-Dgot,detail to have the
188# linker print out the list of GOT hogs..
189
190GOTHOGS =	dial.o print_obj.o clnt_perror.o
191BIGPICS =	$(GOTHOGS:%=pics/%)
192$(BIGPICS) :=	sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
193$(BIGPICS) :=	i386_C_PICFLAGS = $(C_BIGPICFLAGS)
194
195# Compile C++ code without exceptions to avoid a dependence on libC.
196NOEXCEPTIONS= -noex
197CCFLAGS += $(NOEXCEPTIONS)
198CCFLAGS64 += $(NOEXCEPTIONS)
199
200CPPFLAGS +=	-I$(SRC)/lib/common/inc -I$(SRC)/lib/libnsl/include -D_REENTRANT
201
202LAZYLIBS = $(ZLAZYLOAD) -lmp -lmd5 -lscf $(ZNOLAZYLOAD)
203lint := LAZYLIBS = -lmp -lmd5
204LDLIBS +=	$(LAZYLIBS) -lc
205DYNFLAGS +=	$(MAPOPTS)
206
207SRCDIR=		../common
208$(LINTLIB):=	SRCS=$(SRCDIR)/$(LINTSRC)
209LINTFLAGS +=	-m -DPORTMAP
210LINTFLAGS64 +=	-m -DPORTMAP
211
212.KEEP_STATE:
213
214$(DYNLIB):	$(MAPFILES)
215
216SRCS=	$(DES:%.o=../des/%.c)			\
217	$(DIAL:%.o=../dial/%.c)			\
218	$(IPSEC:%.o=../ipsec/%.c)		\
219	$(NETDIR:%.o=../netdir/%.c)		\
220	$(NSS:%.o=../nss/%.c)			\
221	$(NETSELECT:%.o=../netselect/%.c)	\
222	$(NSL:%.o=../nsl/%.c)			\
223	$(RPC:%.o=../rpc/%.c)			\
224	$(SAF:%.o=../saf/%.c)			\
225	$(YP:%.o=../yp/%.c)			\
226	$(NIS_GEN:%.o=../nis/gen/%.c)		\
227	$(COMMON:%.o=../common/%.c)
228
229lint:
230	@echo $(LINT.c) ...
231	@$(LINT.c) $(SRCS) $(LDLIBS)
232
233# include library targets
234include ../../Makefile.targ
235