thisconfigdir=./..
myfulldir=lib/gssapi/generic
mydir=generic
BUILDTOP=$(REL)..$(S)..$(S)..
LOCALINCLUDES = -I. -I$(srcdir)

##DOS##BUILDTOP = ..\..\..
##DOS##PREFIXDIR=generic
##DOS##OBJFILE=..\$(OUTPRE)generic.lst
##WIN16##LIBNAME=..\gssapi.lib

##DOS##DLL_EXP_TYPE=GSS

ETSRCS= gssapi_err_generic.c
ETOBJS= $(OUTPRE)gssapi_err_generic.$(OBJEXT)
ETHDRS= gssapi_err_generic.h

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

HDRS=	$(EHDRDIR)$(S)gssapi.h \
	$(EHDRDIR)$(S)gssapi_generic.h

MK_EHDRDIR=if test -d $(EHDRDIR); then :; else (set -x; mkdir $(EHDRDIR)); fi
##DOS##MK_EHDRDIR=rem

gssapi-include: $(EHDRDIR)$(S)gssapi.h

$(EHDRDIR)$(S)gssapi.h: gssapi.h
	@$(MK_EHDRDIR)
	$(CP) gssapi.h $@
$(EHDRDIR)$(S)gssapi_generic.h: $(srcdir)$(S)gssapi_generic.h
	@$(MK_EHDRDIR)
	$(CP) $(srcdir)$(S)gssapi_generic.h $@

$(OUTPRE)gssapi_err_generic.$(OBJEXT): gssapi_err_generic.c
gssapi_err_generic.h: gssapi_err_generic.et
gssapi_err_generic.c: gssapi_err_generic.et

gssapi.h: gssapi.hin
	@echo "Creating gssapi.h" ; \
	h=gss$$$$; $(RM) $$h; \
	(echo "/* This is the gssapi.h prologue. */"; \
	echo "/* It contains some choice pieces of autoconf.h */"; \
	grep SIZEOF $(BUILDTOP)/include/krb5/autoconf.h; \
	grep 'HAVE_.*_H' $(BUILDTOP)/include/krb5/autoconf.h; \
	grep 'USE_.*_H' $(BUILDTOP)/include/krb5/autoconf.h; \
	echo "/* End of gssapi.h prologue. */"; \
	cat $(srcdir)/gssapi.hin )> $$h && \
	(set -x; $(MV) $$h $@) ; e=$$?; $(RM) $$h; exit $$e

#if HasHashLibrary
# UTIL_VALIDATE_SRC= $(srcdir)/util_validate.c
# UTIL_VALIDATE_OBJ= util_validate.$(OBJEXT)
#else
#UTIL_VALIDATE_SRC= $(srcdir)/utl_nohash_validate.c
#UTIL_VALIDATE_OBJ= utl_nohash_validate.$(OBJEXT)
#endif

SRCS = \
	$(srcdir)/disp_com_err_status.c \
	$(srcdir)/disp_major_status.c \
	$(srcdir)/gssapi_generic.c \
	$(srcdir)/oid_ops.c \
	$(srcdir)/rel_buffer.c \
	$(srcdir)/rel_oid_set.c \
	$(srcdir)/util_buffer.c \
	$(srcdir)/util_oid.c \
	$(srcdir)/util_ordering.c \
	$(srcdir)/util_set.c \
	$(srcdir)/util_token.c \
	$(srcdir)/util_validate.c \
	gssapi_err_generic.c

OBJS = \
	$(OUTPRE)disp_com_err_status.$(OBJEXT) \
	$(OUTPRE)disp_major_status.$(OBJEXT) \
	$(OUTPRE)gssapi_generic.$(OBJEXT) \
	$(OUTPRE)oid_ops.$(OBJEXT) \
	$(OUTPRE)rel_buffer.$(OBJEXT) \
	$(OUTPRE)rel_oid_set.$(OBJEXT) \
	$(OUTPRE)util_buffer.$(OBJEXT) \
	$(OUTPRE)util_oid.$(OBJEXT) \
	$(OUTPRE)util_ordering.$(OBJEXT) \
	$(OUTPRE)util_set.$(OBJEXT) \
	$(OUTPRE)util_token.$(OBJEXT) \
	$(OUTPRE)util_validate.$(OBJEXT) \
	$(OUTPRE)gssapi_err_generic.$(OBJEXT)

STLIBOBJS = \
	disp_com_err_status.o \
	disp_major_status.o \
	gssapi_generic.o \
	oid_ops.o \
	rel_buffer.o \
	rel_oid_set.o \
	util_buffer.o \
	util_oid.o \
	util_ordering.o \
	util_set.o \
	util_token.o \
	util_validate.o \
	gssapi_err_generic.o

EXPORTED_HEADERS= gssapi_generic.h
EXPORTED_BUILT_HEADERS= gssapi.h

$(OBJS): $(EXPORTED_HEADERS) $(ETHDRS)

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


##DOS##LIBOBJS = $(OBJS)

all-windows:: win-create-ehdrdir
all-windows:: $(HDRS)

win-create-ehdrdir:
	if not exist $(EHDRDIR)\nul mkdir $(EHDRDIR)

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

clean-windows::
	$(RM) $(HDRS)
	-if exist $(EHDRDIR)\nul rmdir $(EHDRDIR)

# Krb5InstallHeaders($(EXPORTED_HEADERS), $(KRB5_INCDIR)/krb5)
install-headers-unix install:: gssapi.h
	@set -x; for f in $(EXPORTED_HEADERS) ; \
	do $(INSTALL_DATA) $(srcdir)/$$f	\
		$(DESTDIR)$(KRB5_INCDIR)/gssapi/$$f ; \
	done
	@set -x; for f in $(EXPORTED_BUILT_HEADERS) ; \
	do $(INSTALL_DATA) $$f	\
		$(DESTDIR)$(KRB5_INCDIR)/gssapi/$$f ; \
	done

depend:: $(ETSRCS)

# @libobj_frag@

# +++ Dependency line eater +++
# 
# Makefile dependencies follow.  This must be the last section in
# the Makefile.in file
#
disp_com_err_status.so disp_com_err_status.po $(OUTPRE)disp_com_err_status.$(OBJEXT): disp_com_err_status.c \
  gssapiP_generic.h gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
disp_major_status.so disp_major_status.po $(OUTPRE)disp_major_status.$(OBJEXT): disp_major_status.c \
  gssapiP_generic.h gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
gssapi_generic.so gssapi_generic.po $(OUTPRE)gssapi_generic.$(OBJEXT): gssapi_generic.c \
  gssapiP_generic.h gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
oid_ops.so oid_ops.po $(OUTPRE)oid_ops.$(OBJEXT): oid_ops.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
rel_buffer.so rel_buffer.po $(OUTPRE)rel_buffer.$(OBJEXT): rel_buffer.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
rel_oid_set.so rel_oid_set.po $(OUTPRE)rel_oid_set.$(OBJEXT): rel_oid_set.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
util_buffer.so util_buffer.po $(OUTPRE)util_buffer.$(OBJEXT): util_buffer.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
util_oid.so util_oid.po $(OUTPRE)util_oid.$(OBJEXT): util_oid.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
util_ordering.so util_ordering.po $(OUTPRE)util_ordering.$(OBJEXT): util_ordering.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
util_set.so util_set.po $(OUTPRE)util_set.$(OBJEXT): util_set.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
util_token.so util_token.po $(OUTPRE)util_token.$(OBJEXT): util_token.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
util_validate.so util_validate.po $(OUTPRE)util_validate.$(OBJEXT): util_validate.c gssapiP_generic.h \
  gssapi_generic.h $(BUILDTOP)/include/gssapi/gssapi.h \
  gssapi_err_generic.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(BUILDTOP)/include/krb5/autoconf.h
gssapi_err_generic.so gssapi_err_generic.po $(OUTPRE)gssapi_err_generic.$(OBJEXT): gssapi_err_generic.c \
  $(COM_ERR_DEPS)

