4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
30 # objects are listed by source directory
32 # common utility code used in more than one directory
33 COMMON= common.o daemon_utils.o
35 DES= des_crypt.o des_soft.o
44 gethostbyname_r.o gethostent.o gethostent_r.o gethostent6.o gethostby_door.o \
45 getipnodeby_door.o getipnodeby.o getrpcent.o getrpcent_r.o inet_matchaddr.o \
46 inet_pton.o inet_ntop.o netdir_inet.o netdir_inet_sundry.o \
47 parse.o getauthattr.o getprofattr.o getexecattr.o getuserattr.o getauuser.o
49 NETSELECT= netselect.o
52 _conn_util.o _data2.o _errlst.o \
53 _utility.o t_accept.o t_alloc.o t_bind.o t_close.o \
54 t_connect.o t_error.o t_free.o t_getinfo.o t_getname.o \
55 t_getstate.o t_listen.o t_look.o t_open.o t_optmgmt.o \
56 t_rcv.o t_rcvconnect.o t_rcvdis.o t_rcvrel.o t_rcvudata.o \
57 t_rcvuderr.o t_snd.o t_snddis.o t_sndrel.o t_sndudata.o \
58 t_sndv.o t_sndreldata.o t_rcvv.o t_rcvreldata.o t_sysconf.o \
59 t_sndvudata.o t_rcvvudata.o t_sync.o t_unbind.o t_strerror.o \
66 auth_des.o auth_none.o auth_sys.o auth_time.o authdes_prot.o \
67 authsys_prot.o can_use_af.o \
68 clnt_bcast.o clnt_dg.o clnt_door.o clnt_generic.o clnt_perror.o \
69 clnt_raw.o clnt_simple.o clnt_vc.o fdsync.o getdname.o \
70 inet_ntoa.o key_call.o key_prot.o mt_misc.o \
71 netname.o netnamer.o pmap_clnt.o pmap_prot.o \
72 rpc_callmsg.o rpc_comdata.o rpc_generic.o rpc_prot.o rpc_sel2poll.o \
73 rpc_soc.o rpc_td.o rpcb_clnt.o rpcb_prot.o \
74 rpcb_st_xdr.o rpcdname.o rpcsec_gss_if.o rtime_tli.o svc.o \
75 svc_auth.o svc_auth_loopb.o svc_auth_sys.o svc_dg.o \
76 svc_door.o svc_generic.o svc_raw.o svc_run.o svc_simple.o \
77 svc_vc.o svcauth_des.o svid_funcs.o ti_opts.o xdr.o \
78 xdr_array.o xdr_float.o xdr_mem.o xdr_rec.o xdr_refer.o \
79 xdr_sizeof.o xdr_stdio.o
81 SAF= checkver.o doconfig.o
84 dbm.o yp_all.o yp_b_clnt.o yp_b_xdr.o yp_bind.o \
85 yp_enum.o yp_master.o yp_match.o yp_order.o yp_update.o \
86 yperr_string.o yp_xdr.o ypprot_err.o ypupd.o \
91 nis_xdr.o nis_subr.o nis_misc.o \
92 nis_misc_proc.o nis_sec_mechs.o
97 KEY= publickey.o xcrypt.o gen_dhkeys.o
99 OBJECTS= $(COMMON) $(DES) $(DIAL) $(IPSEC) $(NETDIR) $(NSS) $(NETSELECT) \
100 $(NSL) $(WRAPPERS) $(RPC) $(SAF) $(YP) $(NIS) $(KEY)
103 pics/%.o: ../common/%.c
104 $(COMPILE.c) -o $@ $<
108 $(COMPILE.c) -o $@ $<
111 pics/%.o: ../dial/%.c
112 $(COMPILE.c) -o $@ $<
115 pics/%.o: ../ipsec/%.c
116 $(COMPILE.c) -o $@ $<
119 pics/%.o: ../netdir/%.c
120 $(COMPILE.c) -o $@ $<
124 $(COMPILE.c) -o $@ $<
127 pics/%.o: ../netselect/%.c
128 $(COMPILE.c) -o $@ $<
132 $(COMPILE.c) -o $@ $<
136 $(COMPILE.c) -DPORTMAP -DNIS -o $@ $<
140 $(COMPILE.c) -o $@ $<
144 $(COMPILE.c) -o $@ $<
148 $(COMPILE.c) -o $@ $<
151 pics/%.o: ../nis/gen/%.c ../nis/gen/nis_clnt.h
152 $(COMPILE.c) -o $@ $<
156 pics/%.o: ../nis/gen/nis_clnt.h
157 $(COMPILE.cc) -o $@ $<
160 # include library definitions
161 include ../../Makefile.lib
163 # install this library in the root filesystem
164 include ../../Makefile.rootfs
166 LIBS = $(DYNLIB) $(LINTLIB)
170 # Override the position-independent code generation flags.
172 # These files are particularly rich with references to global things.
173 # Ordering is by number of got references per file of files that have
174 # non-performance sensitive code in them.
176 # If you need to add more files and the GOT overflows with "pic" items,
177 # then use the environment variable LD_OPTIONS=-Dgot,detail to have the
178 # linker print out the list of GOT hogs..
180 GOTHOGS = dial.o print_obj.o clnt_perror.o nsl_stdio_prv.o netdir.o \
182 BIGPICS = $(GOTHOGS:%=pics/%)
183 $(BIGPICS) := sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
184 $(BIGPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS)
186 # Compile C++ code without exceptions to avoid a dependence on libC.
188 CCFLAGS += $(NOEXCEPTIONS)
189 CCFLAGS64 += $(NOEXCEPTIONS)
191 CPPFLAGS += -I$(SRC)/lib/common/inc -I$(SRC)/lib/libnsl/include -D_REENTRANT
192 CPPFLAGS += -I$(SRC)/lib/libnsl/dial
194 CFLAGS += $(CCVERBOSE)
196 # Make string literals read-only to save memory.
197 CFLAGS += $(XSTRCONST)
198 CFLAGS64 += $(XSTRCONST)
199 CCFLAGS += -_CC=-features=conststrings
200 CCFLAGS64 += -_CC=-features=conststrings
202 CERRWARN += -_gcc=-Wno-char-subscripts
203 CERRWARN += -_gcc=-Wno-parentheses
204 CERRWARN += -_gcc=-Wno-uninitialized
205 CERRWARN += -_gcc=-Wno-switch
206 CERRWARN += -_gcc=-Wno-char-subscripts
207 CERRWARN += -_gcc=-Wno-empty-body
208 CERRWARN += -_gcc=-Wno-unused-variable
209 CERRWARN += -_gcc=-Wno-clobbered
213 LDLIBS += $(LIBMP) -lmd -lc
214 DYNFLAGS += $(ZNODELETE)
216 $(LINTLIB):= SRCS=$(SRCDIR)/$(LINTSRC)
217 LINTFLAGS += -m -DPORTMAP
218 LINTFLAGS64 += -m -DPORTMAP
224 # Don't lint WRAPPERS as they are explicitly unclean
225 SRCS= $(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)
239 @$(LINT.c) $(SRCS) $(LDLIBS)
241 # include library targets
242 include ../../Makefile.targ