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 (the "License").
6# You may not use this file except in compliance with the License.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
22#
23# This make file will build mech_krb5.so.1. This shared object
24# contains all the functionality needed to support the Kereros V5 GSS-API
25# mechanism. No other Kerberos libraries are needed.
26#
27
28LIBRARY= mech_krb5.a
29VERS = .1
30
31FILEMODE=	755
32
33# objects are listed by source directory
34REL_PATH= ../
35
36to_all:	all
37
38# crypto
39CRYPTO = cksumtype_to_string.o \
40	coll_proof_cksum.o enctype_compare.o enctype_to_string.o \
41	keyed_checksum_types.o keyed_cksum.o \
42	make_random_key.o string_to_cksumtype.o \
43	string_to_enctype.o string_to_key.o valid_cksumtype.o \
44	valid_enctype.o pkcs11slot.o state.o pbkdf2.o old_api_glue.o \
45	keylengths.o random_to_key.o
46
47CRYPTO_UTS= cksumtypes.o decrypt.o encrypt.o encrypt_length.o \
48	etypes.o nfold.o verify_checksum.o default_state.o \
49	prng.o block_size.o make_checksum.o checksum_length.o hmac.o \
50	mandatory_sumtype.o combine_keys.o
51
52# crypto/raw
53CRYPTO_RAW= raw_decrypt.o raw_encrypt.o
54
55# crypto/des user space only
56CRYPTO_DES= afsstring2key.o string2key.o
57
58# crypto/des common to user and kernel space
59CRYPTO_DES_UTS= f_cbc.o f_cksum.o f_parity.o weak_key.o d3_cbc.o
60
61# crypto/arcfour user space only
62CRYPTO_ARCFOUR= arcfour_str2key.o
63
64# crypto/aes user space only
65CRYPTO_AES=	aes_s2k.o
66
67# crypto/arcfour common to user and kernel space
68CRYPTO_ARCFOUR_UTS = k5_arcfour.o
69
70#crypto/dk
71CRYPTO_DK= stringtokey.o
72
73CRYPTO_DK_UTS= checksum.o derive.o dk_decrypt.o dk_encrypt.o
74
75# crypto/crc32
76CRYPTO_CRC32= crc.o
77
78# crypto/crc32
79CRYPTO_CRC32_UTS= crc32.o
80
81# crypto/md4
82CRYPTO_MD4= md4.o
83
84# crypto/enc_provider
85CRYPTO_ENC= des.o des3.o arcfour_provider.o aes_provider.o
86
87# crypto/hash_provider
88CRYPTO_HASH= hash_md5.o hash_sha1.o hash_ef_generic.o
89CRYPTO_HASH_UTS= hash_crc32.o
90
91# crypto/keyhash_provider
92CRYPTO_KEYHASH= k5_md5des.o hmac_md5.o
93CRYPTO_KEYHASH_UTS= descbc.o
94
95# crypto/old
96CRYPTO_OLD=  des_stringtokey.o
97
98# crypto/old
99CRYPTO_OLD_UTS=  old_encrypt.o old_decrypt.o
100
101# et error_tables
102ET=	adb_err.o adm_err.o asn1_err.o chpass_util_strings.o error_message.o \
103	com_err.o gssapi_err_generic.o import_err.o \
104	gssapi_err_krb5.o kadm_err.o kdb5_err.o kpasswd_strings.o kdc5_err.o \
105	krb5_err.o kv5m_err.o prof_err.o pty_err.o ss_err.o
106
107# krb5/asn.1
108K5_ASN1= asn1_decode.o asn1_k_decode.o asn1_encode.o \
109	asn1_get.o asn1_make.o \
110	asn1buf.o krb5_decode.o krb5_encode.o \
111	asn1_k_encode.o asn1_misc.o ldap_key_seq.o
112
113# krb5/ccache
114K5_CC= cc_file.o cc_memory.o ccbase.o ccfns.o ccdefault.o ccdefops.o ser_cc.o cc_retr.o cccopy.o
115
116# krb5/keytab
117K5_KT=	ktadd.o ktbase.o ktdefault.o ktfr_entry.o \
118	ktremove.o read_servi.o kt_file.o kt_srvtab.o ktfns.o kt_findrealm.o
119
120K5_KRB= addr_comp.o  addr_order.o  addr_srch.o \
121	auth_con.o  bld_pr_ext.o  bld_princ.o  chk_trans.o \
122	conv_princ.o  copy_addrs.o  copy_creds.o  copy_data.o  copy_tick.o \
123	cp_key_cnt.o  decode_kdc.o  decrypt_tk.o  encode_kdc.o  encrypt_tk.o \
124	free_rtree.o  fwd_tgt.o  gc_frm_kdc.o  gc_via_tkt.o  gen_seqnum.o \
125	gen_subkey.o  get_creds.o  get_in_tkt.o kdc_rep_dc.o  mk_cred.o  \
126	mk_error.o  mk_priv.o  mk_rep.o  mk_req.o  mk_req_ext.o  mk_safe.o \
127	pr_to_salt.o   princ_comp.o  privacy_allowed.o  rd_cred.o \
128	rd_error.o  rd_priv.o  rd_rep.o  rd_req.o  rd_req_dec.o  rd_safe.o \
129	recvauth.o  send_tgs.o  sendauth.o  srv_rcache.o  str_conv.o \
130	tgtname.o  valid_times.o  walk_rtree.o appdefault.o deltat.o \
131	enc_helper.o gic_keytab.o gic_opt.o gic_pwd.o preauth2.o \
132	preauth.o vfy_increds.o vic_opt.o set_realm.o krb5_libinit.o chpw.o \
133	init_keyblock.o init_allocated_keyblock.o get_set_keyblock.o kerrs.o \
134	getuid.o pac.o
135
136K5_KRB_UTS= copy_athctr.o copy_auth.o copy_cksum.o copy_key.o \
137	copy_princ.o init_ctx.o kfree.o parse.o ser_actx.o \
138	ser_adata.o ser_addr.o ser_auth.o \
139	ser_cksum.o ser_ctx.o ser_key.o \
140	ser_princ.o serialize.o unparse.o
141
142K5_OS=	an_to_ln.o def_realm.o ccdefname.o free_krbhs.o free_hstrl.o \
143	full_ipadr.o get_krbhst.o gen_port.o genaddrs.o gen_rname.o \
144	gmt_mktime.o hostaddr.o hst_realm.o krbfileio.o \
145	ktdefname.o kuserok.o mk_faddr.o localaddr.o locate_kdc.o lock_file.o \
146	net_read.o net_write.o osconfig.o port2ip.o promptusr.o \
147	read_msg.o read_pwd.o realm_dom.o sendto_kdc.o sn2princ.o \
148	unlck_file.o ustime.o write_msg.o safechown.o \
149	prompter.o realm_iter.o foreachaddr.o \
150	dnsglue.o dnssrv.o thread_safe.o changepw.o accessor.o
151
152K5_OS_UTS=init_os_ctx.o timeofday.o toffset.o c_ustime.o
153
154K5_POSIX= setenv.o daemon.o
155
156K5_RCACHE=rc_base.o rc_file.o rc_mem.o rc_common.o rc_io.o rcdef.o rc_conv.o \
157	ser_rc.o rcfns.o rc_none.o
158
159MECH= 	accept_sec_context.o store_cred.o \
160	add_cred.o disp_com_err_status.o  disp_major_status.o \
161	compare_name.o context_time.o copy_ccache.o \
162	disp_name.o disp_status.o export_sec_context.o \
163	get_tkt_flags.o import_name.o indicate_mechs.o \
164	inq_context.o inq_cred.o inq_names.o \
165	krb5_gss_glue.o \
166	pname_to_uid.o process_context_token.o \
167        rel_buffer.o rel_oid.o rel_oid_set.o \
168	rel_cred.o  rel_name.o util_buffer.o \
169	util_dup.o util_localhost.o \
170	util_cksum.o acquire_cred.o init_sec_context.o \
171	set_ccache.o acquire_cred_with_pw.o lucid_context.o \
172	set_allowable_enctypes.o oid_ops.o export_name.o gss_libinit.o \
173	util_buffer_set.o
174
175MECH_UTS= delete_sec_context.o gssapi_krb5.o \
176	import_sec_context.o k5seal.o k5sealv3.o \
177	k5unseal.o seal.o ser_sctx.o \
178	sign.o unseal.o util_crypt.o  \
179	util_ordering.o util_seed.o util_seqnum.o \
180	util_set.o  util_token.o util_validate.o \
181	val_cred.o verify.o wrap_size_limit.o
182
183GSSAPI_UTS= gen_oids.o
184
185PROFILE_OBJS= prof_tree.o prof_file.o prof_parse.o prof_init.o \
186	prof_set.o prof_get.o prof_solaris.o
187
188SUPPORT_OBJS= fake-addrinfo.o init-addrinfo.o threads.o errors.o plugins.o \
189	      utf8_conv.o utf8.o
190
191KWARN_OBJS= kwarnd_clnt_stubs.o kwarnd_clnt.o kwarnd_handle.o kwarnd_xdr.o
192
193OBJECTS= \
194	$(MECH) $(MECH_UTS) $(GSSAPI_UTS)\
195	$(SUPPORT_OBJS) \
196	$(KWARN_OBJS) \
197	$(PROFILE_OBJS) \
198	$(CRYPTO) $(CRYPTO_UTS) \
199	$(CRYPTO_CRC32) \
200	$(CRYPTO_CRC32_UTS) \
201	$(CRYPTO_DES) $(CRYPTO_DES_UTS) \
202	$(CRYPTO_MD4) \
203	$(CRYPTO_DK) $(CRYPTO_DK_UTS) \
204	$(CRYPTO_ARCFOUR) $(CRYPTO_ARCFOUR_UTS) \
205	$(CRYPTO_AES) \
206	$(CRYPTO_ENC) \
207	$(CRYPTO_HASH) $(CRYPTO_HASH_UTS) \
208	$(CRYPTO_KEYHASH) $(CRYPTO_KEYHASH_UTS) \
209	$(CRYPTO_OLD) $(CRYPTO_OLD_UTS) \
210	$(CRYPTO_RAW) \
211	$(ET) \
212	$(K5_ASN1) \
213	$(K5_CC) \
214	$(K5_KT) \
215	$(K5_KRB) $(K5_KRB_UTS) \
216	$(K5_OS) $(K5_OS_UTS) \
217	$(K5_POSIX) $(K5_RCACHE)
218
219# include library definitions
220include $(REL_PATH)/../../Makefile.lib
221
222# Must come after Makefile.lib so CPPFLAGS doesn't get overwritten
223include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
224
225K5LIBLINK=$(LIBRARY:%.a=lib%.so)
226
227# override default text domain
228TEXT_DOMAIN= SUNW_OST_NETRPC
229INS.liblink2=	-$(RM) $@; $(SYMLINK) gss/$(LIBLINKPATH)$(LIBLINKS) $@
230
231CPPFLAGS += -I$(REL_PATH)/libgss -I../include  \
232		-I$(SRC)/uts/common/gssapi \
233		-I$(SRC)/uts/common/gssapi/include \
234		-I$(SRC)/lib/gss_mechs/mech_krb5/mech \
235		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
236		-I../include/krb5 \
237		-I../krb5/keytab \
238		-I../krb5/krb \
239		-I../krb5/os \
240		-I../krb5/ccache \
241		-I../krb5/rcache \
242		-I$(SRC)/lib/krb5 \
243		-I$(SRC)/lib/krb5/kadm5 \
244		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
245		-I$(SRC)/uts/common/gssapi/mechs/krb5/crypto/des
246
247# KRB5_DEFS can be assigned various preprocessor flags, typically -D
248# defines on the make invocation.  These values will be appended to
249# CPPFLAGS so the other flags in CPPFLAGS will not be overwritten.
250
251CPPFLAGS += $(KRB5_DEFS)
252
253MAPFILE_EXPORT = ../mapfile-vers-clean
254$(EXPORT_RELEASE_BUILD)MAPFILE_EXPORT = \
255		$(CLOSED)/lib/gss_mechs/mech_krb5/mapfile-vers-export
256MAPFILES =	../mapfile-vers $(MAPFILE_EXPORT)
257
258$(EXPORT_RELEASE_BUILD)include $(CLOSED)/lib/gss_mechs/mech_krb5/Makefile.export
259
260#CPPFLAGS += 	-D_REENTRANT
261$(PICS) :=	CFLAGS += $(XFFLAG)
262$(PICS) :=	CFLAGS64 += $(XFFLAG)
263$(PICS) :=	CCFLAGS += $(XFFLAG)
264$(PICS) :=	CCFLAGS64 += $(XFFLAG)
265
266LIBS = $(DYNLIB) $(K5LIBLINK)
267
268# override ROOTLIBDIR and ROOTLINKS
269ROOTLIBDIR=	$(ROOT)/usr/lib/gss
270ROOTLIBDIR64=	$(ROOT)/usr/lib/$(MACH64)/gss
271
272K5MECHLINK=	$(K5LIBLINK:%=$(ROOT)/usr/lib/%)
273K5MECHLINK64=	$(K5LIBLINK:%=$(ROOT)/usr/lib/$(MACH64)/%)
274
275ROOTLIBS=	$(LIBS:%=$(ROOTLIBDIR)/%) $(K5MECHLINK)
276ROOTLIBS64=	$(LIBS:%=$(ROOTLIBDIR64)/%) $(K5MECHLINK64)
277
278$(ROOTLIBDIR) $(ROOTLIBDIR64):
279	$(INS.dir)
280
281# create libmech_krb5 link locally
282$(K5LIBLINK): $(DYNLIB)
283	-$(RM) $@; $(SYMLINK) $(DYNLIB) $@
284
285# create libmech_krb5 link in $ROOT/usr/lib/gss/
286$(ROOTLIBDIR)/$(K5LIBLINK):	$(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
287	$(INS.liblink)
288
289# create libmech_krb5 link in $ROOT/usr/lib/$(MACH64)/gss
290$(ROOTLIBDIR64)/$(K5LIBLINK):	$(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
291	$(INS.liblink)
292
293# create libmech_krb5 link in ROOT/usr/lib
294$(K5MECHLINK):	$(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
295	$(INS.liblink2)
296
297# create libmech_krb5 link in ROOT/usr/lib/$(MACH64)
298$(K5MECHLINK64):	$(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
299	$(INS.liblink2)
300
301LDLIBS += -lgss -lsocket -lresolv -lc -lpkcs11 -lnsl -lkstat
302# -z ignore causes linker to ignore unneeded dependencies.  This is
303#  needed because -lnsl is only used if DEBUG is defined.
304DYNFLAGS += $(ZIGNORE)
305
306# mech lib needs special initialization at load time
307DYNFLAGS += -zinitarray=krb5_ld_init
308
309objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/%.c
310	$(COMPILE.c)  -o $@ $<
311	$(POST_PROCESS_O)
312
313objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/mech/%.c
314	$(COMPILE.c)  -o $@ $<
315	$(POST_PROCESS_O)
316
317objs/%.o pics/%.o: $(SRC)/lib/gss_mechs/mech_krb5/mech/%.c
318	$(COMPILE.c)  -o $@ $<
319	$(POST_PROCESS_O)
320
321objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/%.c
322	$(COMPILE.c)  -o $@ $<
323	$(POST_PROCESS_O)
324
325objs/%.o pics/%.o: $(REL_PATH)/crypto/%.c
326	$(COMPILE.c)  -o $@ $<
327	$(POST_PROCESS_O)
328
329objs/%.o pics/%.o: $(REL_PATH)/crypto/md4/%.c
330	$(COMPILE.c)  -o $@ $<
331	$(POST_PROCESS_O)
332
333objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/des/%.c
334	$(COMPILE.c)  -o $@ $<
335	$(POST_PROCESS_O)
336
337objs/%.o pics/%.o: $(REL_PATH)/crypto/des/%.c
338	$(COMPILE.c)  -o $@ $<
339	$(POST_PROCESS_O)
340
341objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/arcfour/%.c
342	$(COMPILE.c)  -o $@ $<
343	$(POST_PROCESS_O)
344
345objs/%.o pics/%.o: $(REL_PATH)/crypto/arcfour/%.c
346	$(COMPILE.c)  -o $@ $<
347	$(POST_PROCESS_O)
348
349objs/%.o pics/%.o: $(REL_PATH)/crypto/aes/%.c
350	$(COMPILE.c)  -o $@ $<
351	$(POST_PROCESS_O)
352
353objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/dk/%.c
354	$(COMPILE.c)  -o $@ $<
355	$(POST_PROCESS_O)
356
357objs/%.o pics/%.o: $(REL_PATH)/crypto/dk/%.c
358	$(COMPILE.c)  -o $@ $<
359	$(POST_PROCESS_O)
360
361objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/raw/%.c
362	$(COMPILE.c)  -o $@ $<
363	$(POST_PROCESS_O)
364
365objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/crc32/%.c
366	$(COMPILE.c)  -o $@ $<
367	$(POST_PROCESS_O)
368
369objs/%.o pics/%.o: $(REL_PATH)/crypto/crc32/%.c
370	$(COMPILE.c)  -o $@ $<
371	$(POST_PROCESS_O)
372
373objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/sha1/%.c
374	$(COMPILE.c)  -o $@ $<
375	$(POST_PROCESS_O)
376
377objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/enc_provider/%.c
378	$(COMPILE.c)  -o $@ $<
379	$(POST_PROCESS_O)
380
381objs/%.o pics/%.o: $(REL_PATH)/crypto/hash_provider/%.c
382	$(COMPILE.c)  -o $@ $<
383	$(POST_PROCESS_O)
384
385objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/hash_provider/%.c
386	$(COMPILE.c)  -o $@ $<
387	$(POST_PROCESS_O)
388
389objs/%.o pics/%.o: $(REL_PATH)/crypto/keyhash_provider/%.c
390	$(COMPILE.c)  -o $@ $<
391	$(POST_PROCESS_O)
392
393objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/keyhash_provider/%.c
394	$(COMPILE.c)  -o $@ $<
395	$(POST_PROCESS_O)
396
397objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/old/%.c
398	$(COMPILE.c)  -o $@ $<
399	$(POST_PROCESS_O)
400
401objs/%.o pics/%.o: $(REL_PATH)/crypto/old/%.c
402	$(COMPILE.c)  -o $@ $<
403	$(POST_PROCESS_O)
404
405objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/crypto/os/%.c
406	$(COMPILE.c)  -o $@ $<
407	$(POST_PROCESS_O)
408
409objs/%.o pics/%.o: $(REL_PATH)/crypto/sha1/%.c
410	$(COMPILE.c)  -o $@ $<
411	$(POST_PROCESS_O)
412
413objs/%.o pics/%.o: $(REL_PATH)/et/%.c
414	$(COMPILE.c)  -o $@ $<
415	$(POST_PROCESS_O)
416
417objs/%.o pics/%.o: $(REL_PATH)/krb5/asn.1/%.c
418	$(COMPILE.c)  -o $@ $<
419	$(POST_PROCESS_O)
420
421objs/%.o pics/%.o: $(REL_PATH)/krb5/ccache/%.c
422	$(COMPILE.c)  -o $@ $<
423	$(POST_PROCESS_O)
424
425objs/%.o pics/%.o: $(REL_PATH)/krb5/ccache/file/%.c
426	$(COMPILE.c)  -o $@ $<
427	$(POST_PROCESS_O)
428
429objs/%.o pics/%.o: $(REL_PATH)/krb5/ccache/stdio/%.c
430	$(COMPILE.c)  -o $@ $<
431	$(POST_PROCESS_O)
432
433objs/%.o pics/%.o: $(REL_PATH)/krb5/ccache/memory/%.c
434	$(COMPILE.c)  -o $@ $<
435	$(POST_PROCESS_O)
436
437objs/%.o pics/%.o: $(REL_PATH)/krb5/keytab/%.c
438	$(COMPILE.c)  -o $@ $<
439	$(POST_PROCESS_O)
440
441objs/%.o pics/%.o: $(REL_PATH)/krb5/keytab/file/%.c
442	$(COMPILE.c)  -o $@ $<
443	$(POST_PROCESS_O)
444
445objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/krb5/krb/%.c
446	$(COMPILE.c)  -o $@ $<
447	$(POST_PROCESS_O)
448
449objs/%.o pics/%.o: $(REL_PATH)/krb5/krb/%.c
450	$(COMPILE.c)  -o $@ $<
451	$(POST_PROCESS_O)
452
453objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/mechs/krb5/krb5/os/%.c
454	$(COMPILE.c)  -o $@ $<
455	$(POST_PROCESS_O)
456
457objs/%.o pics/%.o: $(REL_PATH)/krb5/os/%.c
458	$(COMPILE.c)  -o $@ $<
459	$(POST_PROCESS_O)
460
461objs/%.o pics/%.o: $(REL_PATH)/krb5/posix/%.c
462	$(COMPILE.c)  -o $@ $<
463	$(POST_PROCESS_O)
464
465objs/%.o pics/%.o: $(REL_PATH)/krb5/rcache/%.c
466	$(COMPILE.c)  -o $@ $<
467	$(POST_PROCESS_O)
468
469objs/%.o pics/%.o: $(REL_PATH)/profile/%.c
470	$(COMPILE.c)  -o $@ $<
471	$(POST_PROCESS_O)
472
473objs/%.o pics/%.o: $(REL_PATH)/support/%.c
474	$(COMPILE.c)  -o $@ $<
475	$(POST_PROCESS_O)
476
477# include library targets
478include $(REL_PATH)/../../Makefile.targ
479# We need to include all CPPFLAGS for the files since we are using
480# the macro to expand and they are not aware of flags yet .. ugh..
481
482OS_FLAGS = -DHAVE_LIBSOCKET -DHAVE_LIBNSL -DTIME_WITH_SYS_TIME \
483	-DHAVE_UNISTD_H -DHAVE_SYS_TIME_H -DHAVE_REGEX_H \
484	-DHAVE_REGEXP_H -DHAVE_RE_COMP -DHAVE_REGCOMP \
485	-DPOSIX_TYPES -DNDBM \
486	-DHAVE_STDLIB_H -DHAVE_STDARG_H -DHAVE_SYS_TYPES_H \
487	-DHAVE_NETINET_IN_H -DHAVE_SRAND48 \
488	-DHAVE_SRAND -DHAVE_SRANDOM -DHAVE_GETPID \
489	-DHAVE_ERRNO -DHAVE_STRFTIME -DHAVE_STRPTIME -DHAVE_STRERROR \
490	-DHAVE_STAT -DSIZEOF_INT=4 -DPROVIDE_KERNEL_IMPORT \
491	-DHAVE_STDINT_H -DPOSIX_SIGNALS -DHAVE_GETENV -DHAVE_SETENV \
492	-DHAVE_UNSETENV -DHAVE_FCHMOD -DHAVE_STRUCT_LIFCONF \
493	-DHAVE_VASPRINTF -DHAVE_RES_NINIT -DHAVE_RES_NDESTROY \
494	-DHAVE_RES_NSEARCH
495
496CPPFLAGS += -I$(REL_PATH)krb5/ccache/file $(OS_FLAGS)
497
498SOURCES= \
499	$(CRYPTO_OS_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/os/%.c)\
500	$(K5_OS_UTS:%.o=$(SRC)/uts/common/gssapi/mechs/krb5/krb5/os/%.c) \
501	$(K5_OS:%.o=$(SRC)/lib/gss_mechs/mech_krb5/krb5/os/%.c) \
502	$(CRYPTO:%.o=$(SRC)/lib/gss_mechs/mech_krb5/crypto/%.c) \
503	$(CRYPTO_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/%.c)\
504	$(CRYPTO_RAW:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/raw/%.c)\
505	$(CRYPTO_DES:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/des/%.c)\
506	$(CRYPTO_DES_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/des/%.c)\
507	$(CRYPTO_ARCFOUR:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/arcfour/%.c)\
508	$(CRYPTO_ARCFOUR_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/arcfour/%.c)\
509	$(CRYPTO_AES:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/aes/%.c)\
510	$(CRYPTO_DK:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/dk/%.c)\
511	$(CRYPTO_DK_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/dk/%.c)\
512	$(CRYPTO_CRC32:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/crc32/%.c)\
513	$(CRYPTO_MD4:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/md4/%.c)\
514	$(CRYPTO_CRC32_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/crc32/%.c)\
515	$(CRYPTO_ENC:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/enc_provider/%.c)\
516	$(CRYPTO_HASH:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/hash_provider/%.c)\
517	$(CRYPTO_HASH_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/hash_provider/%.c)\
518	$(CRYPTO_KEYHASH:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/keyhash_provider/%.c)\
519	$(CRYPTO_KEYHASH_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/keyhash_provider/%.c)\
520	$(CRYPTO_OLD:%.o= $(SRC)/lib/gss_mechs/mech_krb5/crypto/old/%.c)\
521	$(CRYPTO_OLD_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/crypto/old/%.c)\
522	$(ET:%.o= $(SRC)/lib/gss_mechs/mech_krb5/et/%.c) \
523	$(K5_ASN1:%.o= $(SRC)/lib/gss_mechs/mech_krb5/krb5/asn.1/%.c) \
524	$(K5_CC:%.o= $(SRC)/lib/gss_mechs/mech_krb5/krb5/ccache/%.c) \
525	$(K5_KT:%.o= $(SRC)/lib/gss_mechs/mech_krb5/krb5/keytab/%.c) \
526	$(K5_KRB:%.o= $(SRC)/lib/gss_mechs/mech_krb5/krb5/krb/%.c)\
527	$(K5_KRB_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/krb5/krb/%.c)\
528	$(K5_OS:%.o= $(SRC)/lib/gss_mechs/mech_krb5/krb5/os/%.c)\
529	$(K5_OS_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/krb5/os/%.c)\
530	$(K5_POSIX:%.o= $(SRC)/lib/gss_mechs/mech_krb5/krb5/posix/%.c)\
531	$(K5_RCACHE:%.o= $(SRC)/lib/gss_mechs/mech_krb5/krb5/rcache/%.c) \
532	$(MECH:%.o= $(SRC)/lib/gss_mechs/mech_krb5/mech/%.c) \
533	$(MECH_UTS:%.o= $(SRC)/uts/common/gssapi/mechs/krb5/mech/%.c) \
534	$(GSSAPI_UTS:%.o= $(SRC)/uts/common/gssapi/%.c) \
535	$(PROFILE_OBJS:%.o= $(SRC)/lib/gss_mechs/mech_krb5/profile/%.c) \
536	$(SUPPORT_OBJS:%.o= $(SRC)/lib/gss_mechs/mech_krb5/support/%.c)
537
538kwarnd.h:	$(SRC)/cmd/krb5/kwarn/kwarnd.x
539	$(RM) $@
540	$(RPCGEN) -M -h $(SRC)/cmd/krb5/kwarn/kwarnd.x | \
541	$(SED) -e 's!$(SRC)/cmd/krb5/kwarn/kwarnd.h!kwarnd.h!' > $@
542
543kwarnd_xdr.c:	kwarnd.h $(SRC)/cmd/krb5/kwarn/kwarnd.x
544	$(RM) $@
545	$(RPCGEN) -M -c $(SRC)/cmd/krb5/kwarn/kwarnd.x | \
546	$(SED) -e 's!$(SRC)/cmd/krb5/kwarn/kwarnd.h!kwarnd.h!' > $@
547
548kwarnd_clnt.c:   kwarnd.h $(SRC)/cmd/krb5/kwarn/kwarnd.x
549	$(RM) $@
550	$(RPCGEN) -M -l $(SRC)/cmd/krb5/kwarn/kwarnd.x | \
551	$(SED) -e 's!$(SRC)/cmd/krb5/kwarn/kwarnd.h!kwarnd.h!' > $@
552
553kwarnd_clnt_stubs.c: kwarnd.h $(SRC)/cmd/krb5/kwarn/kwarnd_clnt_stubs.c
554	$(RM) $@
555	$(CP) $(SRC)/cmd/krb5/kwarn/kwarnd_clnt_stubs.c $@
556
557kwarnd_handle.c: $(SRC)/cmd/krb5/kwarn/kwarnd_handle.c
558	$(RM) $@
559	$(CP) $(SRC)/cmd/krb5/kwarn/kwarnd_handle.c $@
560
561# So lint.out won't be needlessly recreated
562lint: $(LINTOUT)
563
564$(LINTOUT): $(SOURCES)
565	$(LINT.c) -o $(LIBNAME) $(SOURCES) > $(LINTOUT) 2>&1
566
567