thisconfigdir=./..
myfulldir=lib/crypto/des
mydir=des
BUILDTOP=$(REL)$(U)$(S)$(U)$(S)$(U)

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

PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)

RUN_SETUP = @KRB5_RUN_ENV@ KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf

STLIBOBJS=\
	afsstring2key.o	\
	d3_cbc.o	\
	d3_kysched.o	\
	f_cbc.o 	\
	f_cksum.o	\
	f_parity.o 	\
	f_sched.o 	\
	f_tables.o	\
	key_sched.o	\
	string2key.o	\
	weak_key.o

OBJS=	$(OUTPRE)afsstring2key.$(OBJEXT)	\
	$(OUTPRE)d3_cbc.$(OBJEXT)	\
	$(OUTPRE)d3_kysched.$(OBJEXT)	\
	$(OUTPRE)f_cbc.$(OBJEXT) 	\
	$(OUTPRE)f_cksum.$(OBJEXT)	\
	$(OUTPRE)f_parity.$(OBJEXT) 	\
	$(OUTPRE)f_sched.$(OBJEXT) 	\
	$(OUTPRE)f_tables.$(OBJEXT)	\
	$(OUTPRE)key_sched.$(OBJEXT)	\
	$(OUTPRE)string2key.$(OBJEXT)	\
	$(OUTPRE)weak_key.$(OBJEXT)

SRCS=	$(srcdir)/afsstring2key.c	\
	$(srcdir)/d3_cbc.c	\
	$(srcdir)/d3_kysched.c	\
	$(srcdir)/f_cbc.c	\
	$(srcdir)/f_cksum.c	\
	$(srcdir)/f_parity.c	\
	$(srcdir)/f_sched.c	\
	$(srcdir)/f_tables.c	\
	$(srcdir)/key_sched.c	\
	$(srcdir)/weak_key.c	\
	$(srcdir)/string2key.c

##DOS##LIBOBJS = $(OBJS)

all-unix:: all-libobjs

includes:: depend

depend:: $(SRCS)

TOBJS = $(OUTPRE)key_sched.$(OBJEXT) $(OUTPRE)f_sched.$(OBJEXT) $(OUTPRE)f_cbc.$(OBJEXT) \
	$(OUTPRE)f_tables.$(OBJEXT) $(OUTPRE)f_cksum.$(OBJEXT)

verify$(EXEEXT): t_verify.$(OBJEXT) $(TOBJS) f_parity.$(OBJEXT) \
	$(COM_ERR_DEPLIB)
	$(CC_LINK) -o $@ t_verify.$(OBJEXT) $(TOBJS) f_parity.$(OBJEXT) \
		-lcom_err

destest$(EXEEXT): destest.$(OBJEXT) $(TOBJS)
	$(CC_LINK) -o $@ destest.$(OBJEXT) $(TOBJS)

check-unix:: verify destest
	$(RUN_SETUP) ./verify -z
	$(RUN_SETUP) ./verify -m
	$(RUN_SETUP) ./verify
	$(RUN_SETUP) ./destest < $(srcdir)/keytest.data

check-windows::

clean:: 
	$(RM) destest$(EXEEXT) verify$(EXEEXT) destest.$(OBJEXT) \
	t_verify.$(OBJEXT)

clean-unix:: clean-libobjs
