# $Source: /afs/athena.mit.edu/astaff/project/kerberos/src/lib/krb/RCS/Imakefile,v $
# $Author: qjb $
# $Header: /afs/athena.mit.edu/astaff/project/kerberos/src/lib/krb/RCS/Imakefile,v 4.6 89/12/30 21:19:28 qjb Exp $
#
# Copyright 1987, 1988 by the Massachusetts Institute of Technology.
#
# For copying and distribution information,
# please see the file <mit-copyright.h>.
#
# Imakefile for main Kerberos library.

#ifdef OLD_COMPAT
OCOMPATSRCS = krbglue.c
OCOMPATOBJS = krbglue.o
#else
OCOMPATSRCS =
OCOMPATOBJS =
#endif
#ifdef NEED_SETENV
SETENVSRCS = setenv.c
SETENVOBJS = setenv.o
#else
SETENVSRCS = 
SETENVOBJS = 
#endif
#ifdef NEED_STRCASECMP
STRCASESRCS = strcasecmp.c
STRCASEOBJS = strcasecmp.o
#else
STRCASESRCS =
STRCASEOBJS =
#endif
#ifdef NEED_GETOPT
GETOPTSRCS = getopt.c
GETOPTOBJS = getopt.o
#else
GETOPTSRCS =
GETOPTOBJS =
#endif
#ifdef TKT_SHMEM
SHMSRCS = tf_shm.c
SHMOBJS = tf_shm.o
#else
SHMSRCS = 
SHMOBJS =
#endif
SRCS = \
	kntoln.c \
	create_auth_reply.c \
	create_death_packet.c \
	cr_err_reply.c \
	create_ciph.c \
	create_ticket.c \
	debug_decl.c \
	decomp_ticket.c \
	dest_tkt.c \
	extract_ticket.c \
	fgetst.c \
	getrealm.c \
	get_ad_tkt.c \
	get_admhst.c \
	get_cred.c \
	get_in_tkt.c \
	get_krbhst.c \
	get_krbrlm.c \
	get_phost.c \
	get_pw_tkt.c \
	get_request.c \
	get_svc_in_tkt.c \
	get_tf_fullname.c \
	get_tf_realm.c \
	getst.c \
	in_tkt.c \
	k_gethostname.c \
	klog.c \
	kname_parse.c \
	kparse.c \
	krb_err_txt.c \
	krb_get_in_tkt.c \
	kuserok.c \
	log.c \
	mk_req.c \
	mk_err.c \
	mk_priv.c \
	mk_safe.c \
	month_sname.c \
	netread.c \
	netwrite.c \
	one.c \
	pkt_cipher.c \
	pkt_clen.c \
	rd_req.c \
	rd_err.c \
	rd_priv.c \
	rd_safe.c \
	read_service_key.c \
	recvauth.c \
	save_credentials.c \
	send_to_kdc.c \
	sendauth.c \
	stime.c \
	tf_util.c \
	tkt_string.c \
	util.c \
	${OCOMPATSRCS} ${SETENVSRCS} ${STRCASESRCS} ${GETOPTSRCS} ${SHMSRCS}

OBJECTS	= \
	kntoln.o \
	create_auth_reply.o \
	create_death_packet.o \
	cr_err_reply.o \
	create_ciph.o \
	create_ticket.o \
	debug_decl.o \
	decomp_ticket.o \
	dest_tkt.o \
	extract_ticket.o \
	fgetst.o \
	getrealm.o \
	get_ad_tkt.o \
	get_admhst.o \
	get_cred.o \
	get_in_tkt.o \
	get_krbhst.o \
	get_krbrlm.o \
	get_phost.o \
	get_pw_tkt.o \
	get_request.o \
	get_svc_in_tkt.o \
	get_tf_fullname.o \
	get_tf_realm.o \
	getst.o \
	in_tkt.o \
	k_gethostname.o \
	klog.o \
	kname_parse.o \
	kparse.o \
	krb_err_txt.o \
	krb_get_in_tkt.o \
	kuserok.o \
	log.o \
	mk_req.o \
	mk_err.o \
	mk_priv.o \
	mk_safe.o \
	month_sname.o \
	netread.o \
	netwrite.o \
	one.o \
	pkt_cipher.o \
	pkt_clen.o \
	rd_req.o \
	rd_err.o \
	rd_priv.o \
	rd_safe.o \
	read_service_key.o \
	recvauth.o \
	save_credentials.o \
	send_to_kdc.o \
	sendauth.o \
	stime.o \
	tf_util.o \
	tkt_string.o \
	util.o \
	krb_err.o \
	${OCOMPATOBJS} ${SETENVOBJS} ${STRCASEOBJS} ${GETOPTOBJS} ${SHMOBJS}

SRCDIR=$(SRCTOP)/lib/krb
CODE=$(SRCS) Imakefile krb_err.et

all::

comp_et_depend(krb_err)

depend:: ${CODE} 

depend:: krb_err.h
	-if cmp krb_err.h ../../include/krb_err.h >/dev/null 2>&1; then \
		echo ; \
	else \
		$(RM) ../../include/krb_err.h ; \
		$(CP) krb_err.h ../../include/krb_err.h; \
	fi

install::
	$(INSTALLRAW) -c -m 0644 krb_err.h ${DESTDIR}${INCLDIR}/krb_err.h

# XXX this should be in a configuration header file.
DEFINES=-DBSD42

library_obj_rule()

install_library_target(krb,$(OBJECTS),$(SRCS),$(DES_LINTLIB))

library_ro_object(one)
library_ro_object(krb_err_txt)
