thisconfigdir=./..
myfulldir=appl/gss-sample
mydir=gss-sample
BUILDTOP=$(REL)..$(S)..
DEFINES = -DUSE_AUTOCONF_H -DGSSAPI_V2
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)

SRCS= $(srcdir)/gss-client.c $(srcdir)/gss-misc.c $(srcdir)/gss-server.c

OBJS= gss-client.o gss-misc.o gss-server.o

all-unix:: gss-server gss-client

##WIN32##VERSIONRC = $(BUILDTOP)\windows\version.rc
##WIN32##RCFLAGS=$(CPPFLAGS) -I$(SRCTOP) -D_WIN32 -DRES_ONLY

##WIN32##GSSCLIENT=$(OUTPRE)gss-client.exe
##WIN32##GSSSERVER=$(OUTPRE)gss-server.exe

##WIN32##CLIENTRES=$(GSSCLIENT:.exe=.res)
##WIN32##SERVERRES=$(GSSSERVER:.exe=.res)

##WIN32##$(CLIENTRES): $(VERSIONRC)
##WIN32##        $(RC) $(RCFLAGS) -DGSS_CLIENT_APP -fo $@ -r $**
##WIN32##$(SERVERRES): $(VERSIONRC)
##WIN32##        $(RC) $(RCFLAGS) -DGSS_SERVER_APP -fo $@ -r $**


##WIN32##all-windows:: $(OUTPRE)gss-server.exe $(OUTPRE)gss-client.exe

gss-server: gss-server.o gss-misc.o $(GSS_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o gss-server gss-server.o gss-misc.o $(GSS_LIBS) $(KRB5_BASE_LIBS)

gss-client: gss-client.o gss-misc.o $(GSS_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o gss-client gss-client.o gss-misc.o $(GSS_LIBS) $(KRB5_BASE_LIBS)

##WIN32##$(GSSSERVER): $(OUTPRE)gss-server.obj $(OUTPRE)gss-misc.obj $(GLIB) $(KLIB) $(SERVERRES)
##WIN32##	link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib $(SCLIB)
##WIN32##	$(_VC_MANIFEST_EMBED_EXE)

##WIN32##$(GSSCLIENT): $(OUTPRE)gss-client.obj $(OUTPRE)gss-misc.obj $(GLIB) $(KLIB) $(CLIENTRES)
##WIN32##	link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib $(SCLIB)
##WIN32##	$(_VC_MANIFEST_EMBED_EXE)

clean-unix::
	$(RM) gss-server gss-client

install-unix::
	$(INSTALL_PROGRAM) gss-client $(DESTDIR)$(CLIENT_BINDIR)/gss-client
	$(INSTALL_PROGRAM) gss-server $(DESTDIR)$(SERVER_BINDIR)/gss-server
# +++ Dependency line eater +++
# 
# Makefile dependencies follow.  This must be the last section in
# the Makefile.in file
#
$(OUTPRE)gss-client.$(OBJEXT): $(BUILDTOP)/include/gssapi/gssapi.h \
  $(BUILDTOP)/include/gssapi/gssapi_generic.h gss-client.c \
  gss-misc.h
$(OUTPRE)gss-misc.$(OBJEXT): $(BUILDTOP)/include/gssapi/gssapi.h \
  $(BUILDTOP)/include/gssapi/gssapi_generic.h gss-misc.c \
  gss-misc.h
$(OUTPRE)gss-server.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssapi/gssapi_generic.h \
  $(SRCTOP)/include/port-sockets.h gss-misc.h gss-server.c
