thisconfigdir=./..
myfulldir=lib/krb5/error_tables
mydir=error_tables
BUILDTOP=$(REL)$(U)$(S)$(U)$(S)$(U)

##DOS##BUILDTOP = ..\..\..
##DOS##PREFIXDIR=error_tables
##DOS##OBJFILE=..\$(OUTPRE)err_tbls.lst
##WIN16##LIBNAME=..\krb5.lib

EHDRDIR=$(BUILDTOP)$(S)include$(S)krb5

# The "unixmac" and "includes" rules need to run in Makefile.in,
# without all the support glop like $(S) and $(BUILDTOP)...so, fake it.
#
# Faking things breaks VPATH support, which is a requirement for me -- TYT.
# You need to do this right!  Whatever config tools that you're using under
# the macintosh, is going to need to handle BUILDTOP and SRCTOP explicitly.
# Setting BUILDTOP and SRCTOP to be the same is Right Out.
#
#BUILDTOP2 = ../../..
#SRCTOP2 = $(BUILDTOP2)
#EHDRDIR2=$(BUILDTOP2)/include/krb5

STLIBOBJS= asn1_err.o kdb5_err.o krb5_err.o \
      kv5m_err.o adm_err.o init_ets.o

HDRS= asn1_err.h kdb5_err.h krb5_err.h kv5m_err.h adm_err.h
OBJS= $(OUTPRE)asn1_err.$(OBJEXT) $(OUTPRE)kdb5_err.$(OBJEXT) $(OUTPRE)krb5_err.$(OBJEXT) \
      $(OUTPRE)kv5m_err.$(OBJEXT) $(OUTPRE)adm_err.$(OBJEXT) $(OUTPRE)init_ets.$(OBJEXT)
ETSRCS= asn1_err.c kdb5_err.c krb5_err.c kv5m_err.c adm_err.c
SRCS= asn1_err.c kdb5_err.c krb5_err.c kv5m_err.c adm_err.c \
	$(srcdir)/init_ets.c

##DOS##LIBOBJS = $(OBJS)

all-unix:: all-libobjs
all-libobjs: $(HDRS)

unixmac: $(HDRS) $(SRCS)

awk-windows:
	$(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=asn1_err.h asn1_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=kdb5_err.h kdb5_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=krb5_err.h krb5_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=adm_err.h adm_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=kv5m_err.h kv5m_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=asn1_err.c asn1_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=kdb5_err.c kdb5_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=krb5_err.c krb5_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=adm_err.c adm_err.et
	$(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=kv5m_err.c kv5m_err.et
	if exist asn1_err.h copy asn1_err.h $(EHDRDIR)
	if exist kdb5_err.h copy kdb5_err.h $(EHDRDIR)
	if exist krb5_err.h copy krb5_err.h $(EHDRDIR)
	if exist adm_err.h copy adm_err.h $(EHDRDIR)
	if exist kv5m_err.h copy kv5m_err.h $(EHDRDIR)

#
# dependencies for traditional makes
#
$(OUTPRE)asn1_err.$(OBJEXT): asn1_err.c
$(OUTPRE)kdb5_err.$(OBJEXT): kdb5_err.c
$(OUTPRE)krb5_err.$(OBJEXT): krb5_err.c
$(OUTPRE)adm_err.$(OBJEXT): adm_err.c
$(OUTPRE)kv5m_err.$(OBJEXT): kv5m_err.c

clean-unix:: clean-libobjs
	$(RM) $(HDRS) $(ETSRCS)
