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