#### include configury here
##DOS!include ..\config\common
##DOS!include ..\config\mt-win
BUILDTOP=$(C)$(S)$(U)
SRCS=kinit.c kdestroy.c klist.c ksu.c ksrvtgt.c
CODE=$(SRCS) Makefile.in
DEFINES=-DDEBUG
LIBS= $(KRB_LIB) $(DES_LIB) $(SYS_LIBS)
DEPLIBS= $(KRB_LIBDEP) $(DES_LIBDEP)

all:: kinit kdestroy klist ksu ksrvtgt

kinit: kinit.$(OBJEXT) $(DEPLIBS)
	$(CC) $(CFLAGS_LINK) $(LDFLAGS) -o $@ kinit.$(OBJEXT) $(LIBS)

kdestroy: kdestroy.$(OBJEXT) $(DEPLIBS)
	$(CC) $(CFLAGS_LINK) $(LDFLAGS) -o $@ kdestroy.$(OBJEXT) $(LIBS)

klist: klist.$(OBJEXT) $(DEPLIBS)
	$(CC) $(CFLAGS_LINK) $(LDFLAGS) -o $@ klist.$(OBJEXT) $(LIBS)

ksu: ksu.$(OBJEXT) $(DEPLIBS)
	$(CC) $(CFLAGS_LINK) $(LDFLAGS) -o $@ ksu.$(OBJEXT) $(LIBS)

ksrvtgt: ksrvtgt.$(OBJEXT) $(DEPLIBS)
	$(CC) $(CFLAGS_LINK) $(LDFLAGS) -o $@ ksrvtgt.$(OBJEXT) $(LIBS)

install::
	$(INSTALLPROG) kinit	$(DESTDIR)$(PROGDIR)$(S)kinit
	$(INSTALLPROG) kdestroy	$(DESTDIR)$(PROGDIR)$(S)kdestroy
	$(INSTALLPROG) klist	$(DESTDIR)$(PROGDIR)$(S)klist
	$(INSTALLPROG) ksu	$(DESTDIR)$(PROGDIR)$(S)ksu
	$(INSTALLPROG) ksrvtgt	$(DESTDIR)$(PROGDIR)$(S)ksrvtgt

clean:: clean-$(WHAT)
	-$(RM) kinit$(EXEEXT)
	-$(RM) kdestroy$(EXEEXT)
	-$(RM) klist$(EXEEXT)
	-$(RM) *.$(OBJEXT)

distclean:: clean
	$(RM) *~ core
	$(RM) Makefile config.status 

clean-:: clean-unix
clean-unix::
	-$(RM) ksu$(EXEEXT)
	-$(RM) ksrvtgt$(EXEEXT)

clean-windows:
	-$(RM) msvc.pdb
	-$(RM) proj.err
