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

##DOSBUILDTOP = ..\..\..
##DOSLIBNAME=..\$(OUTPRE)gssapi.$(LIBEXT)

##DOS##DLL_EXP_TYPE=GSS

LIBDONE=DONE
LIB_SUBDIRS=.
DEPLIBS=
SHLIB_LDFLAGS= $(LDFLAGS) @SHLIB_RPATH_DIRS@ \
	$(LD_UNRESOLVED_PREFIX)krb5_gss_initialize


SHLIB_LIBDIRS= @SHLIB_LIBDIRS@

SRCS	= $(srcdir)/g_acquire_cred.c \
	  $(srcdir)/g_rel_cred.c \
	  $(srcdir)/g_init_sec_context.c \
	  $(srcdir)/g_accept_sec_context.c \
	  $(srcdir)/g_process_context.c \
	  $(srcdir)/g_delete_sec_context.c \
	  $(srcdir)/g_imp_sec_context.c \
	  $(srcdir)/g_exp_sec_context.c \
	  $(srcdir)/g_context_time.c \
	  $(srcdir)/g_sign.c \
	  $(srcdir)/g_verify.c \
	  $(srcdir)/g_seal.c \
	  $(srcdir)/g_unseal.c \
	  $(srcdir)/g_dsp_status.c \
	  $(srcdir)/g_indicate_mechs.c \
	  $(srcdir)/g_compare_name.c \
	  $(srcdir)/g_dsp_name.c \
	  $(srcdir)/g_imp_name.c \
	  $(srcdir)/g_rel_name.c \
	  $(srcdir)/g_rel_buffer.c \
	  $(srcdir)/g_rel_oid_set.c \
	  $(srcdir)/g_oid_ops.c \
	  $(srcdir)/g_inq_cred.c \
	  $(srcdir)/g_inq_context.c \
	  $(srcdir)/g_inq_names.c \
	  $(srcdir)/g_initialize.c \
	  $(srcdir)/g_glue.c \
	  $(srcdir)/gssd_pname_to_uid.c \
	  $(srcdir)/gen_oids.c \
	  $(srcdir)/oid_ops.c \
	  $(srcdir)/g_mechname.c 

OBJS	= $(OUTPRE)g_acquire_cred.$(OBJEXT) \
	  $(OUTPRE)g_rel_cred.$(OBJEXT) \
	  $(OUTPRE)g_init_sec_context.$(OBJEXT) \
	  $(OUTPRE)g_accept_sec_context.$(OBJEXT) \
	  $(OUTPRE)g_process_context.$(OBJEXT) \
	  $(OUTPRE)g_delete_sec_context.$(OBJEXT) \
	  $(OUTPRE)g_imp_sec_context.$(OBJEXT) \
	  $(OUTPRE)g_exp_sec_context.$(OBJEXT) \
	  $(OUTPRE)g_context_time.$(OBJEXT) \
	  $(OUTPRE)g_sign.$(OBJEXT) \
	  $(OUTPRE)g_verify.$(OBJEXT) \
	  $(OUTPRE)g_seal.$(OBJEXT) \
	  $(OUTPRE)g_unseal.$(OBJEXT) \
	  $(OUTPRE)g_dsp_status.$(OBJEXT) \
	  $(OUTPRE)g_indicate_mechs.$(OBJEXT) \
	  $(OUTPRE)g_compare_name.$(OBJEXT) \
	  $(OUTPRE)g_dsp_name.$(OBJEXT) \
	  $(OUTPRE)g_imp_name.$(OBJEXT) \
	  $(OUTPRE)g_rel_name.$(OBJEXT) \
	  $(OUTPRE)g_rel_buffer.$(OBJEXT) \
	  $(OUTPRE)g_rel_oid_set.$(OBJEXT) \
	  $(OUTPRE)g_oid_ops.$(OBJEXT) \
	  $(OUTPRE)g_inq_cred.$(OBJEXT) \
	  $(OUTPRE)g_inq_context.$(OBJEXT) \
	  $(OUTPRE)g_inq_names.$(OBJEXT) \
	  $(OUTPRE)g_initialize.$(OBJEXT) \
	  $(OUTPRE)g_glue.$(OBJEXT) \
	  $(OUTPRE)gssd_pname_to_uid.$(OBJEXT) \
	  $(OUTPRE)gen_oids.$(OBJEXT) \
	  $(OUTPRE)oid_ops.$(OBJEXT) \
	  $(OUTPRE)g_mechname.$(OBJEXT)

EHDRDIR= $(BUILDTOP)$(S)include$(S)gssapi
EXPORTED_HEADERS = mechglue.h

@SHARED_RULE@

all:: all-$(WHAT) 

all-unix:: shared includes $(OBJS)

all-mac:: shared includes $(OBJS)

all-windows:: includes $(OBJS)
	if not exist $(EHDRDIR)\nul mkdir $(EHDRDIR)
	copy mechglue.h $(EHDRDIR)

shared:
	mkdir shared

unixmac: 

libgssapi.$(STEXT): $(OBJS)
	$(RM) $@
	$(ARADD) $@ $(OBJS)
	$(RANLIB) $@


#libgssapi.$(LIBEXT): $(OBJS)
#	$(ARCHIVE) $@ $(OBJS)
#	$(RANLIB) $@

clean:: clean-$(WHAT)

clean-unix::
	$(RM) shared/*

clean-mac::
	$(RM) shared/*

clean-windows::
	$(RM) $(EHDRDIR)\gssapi.h $(EHDRDIR)\gssapi_generic.h
	if exist $(EHDRDIR)\nul rmdir $(EHDRDIR)

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

includes::
