#	$NetBSD: Makefile,v 1.3 1999/08/04 06:27:26 thorpej Exp $

KRB5TOP=${.CURDIR}/../..

INCS=	profile.h krb5.h k5-int.h db-ndbm.h osconf.h autoconf.h kdb.h \
	kdb_dbm.h port-sockets.h adm_proto.h dyn.h kdb_dbc.h adm.h
INCSDIR=/usr/include/krb5

CLEANFILES+= profile.h krb5.h

KRB5INCSDIR= ${KRB5TOP}/dist/krb5/src/include
.PATH: $(KRB5INCSDIR)
.PATH: $(KRB5INCSDIR)/krb5
.PATH: ${KRB5TOP}/dist/krb5/src/util/dyn
.NOPATH: krb5.h

profsrcdir= ${KRB5TOP}/dist/krb5/src/util/profile
ETSRCS+= $(profsrcdir)/prof_err.et

profile.h: prof_err.h $(profsrcdir)/profile.hin prof_err.h
	cat $(profsrcdir)/profile.hin prof_err.h > $@

k5etdir= ${KRB5TOP}/dist/krb5/src/lib/krb5/error_tables
ETSRCS+= $(k5etdir)/krb5_err.et $(k5etdir)/kdb5_err.et $(k5etdir)/kv5m_err.et \
	$(k5etdir)/asn1_err.et
krb5.h: $(KRB5INCSDIR)/krb5.hin \
	krb5_err.h kdb5_err.h kv5m_err.h asn1_err.h
	cp ${KRB5INCSDIR}/krb5.hin krb5.htmp
	cat krb5_err.h kdb5_err.h kv5m_err.h asn1_err.h >> krb5.htmp
	-unifdef -DHAVE_SYS_TYPES_H krb5.htmp > krb5.h
	rm krb5.htmp

.include <bsd.own.mk>
.include <bsd.prog.mk>
