thisconfigdir=../../..
myfulldir=lib/crypto/aes
mydir=lib/crypto/aes
BUILDTOP=$(REL)..$(S)..$(S)..
LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../dk
DEFS=

##DOS##BUILDTOP = ..\..\..
##DOS##PREFIXDIR=aes
##DOS##OBJFILE=..\$(OUTPRE)aes.lst

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

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

STLIBOBJS=\
	aescrypt.o	\
	aestab.o	\
	aeskey.o	\
	aes_s2k.o

OBJS=\
	$(OUTPRE)aescrypt.$(OBJEXT)	\
	$(OUTPRE)aestab.$(OBJEXT)	\
	$(OUTPRE)aeskey.$(OBJEXT)	\
	$(OUTPRE)aes_s2k.$(OBJEXT)

SRCS=\
	$(srcdir)/aescrypt.c	\
	$(srcdir)/aestab.c	\
	$(srcdir)/aeskey.c	\
	$(srcdir)/aes_s2k.c

GEN_OBJS=\
	$(OUTPRE)aescrypt.$(OBJEXT)	\
	$(OUTPRE)aestab.$(OBJEXT)	\
	$(OUTPRE)aeskey.$(OBJEXT)

##DOS##LIBOBJS = $(OBJS)

all-unix:: all-libobjs # aes-gen

includes:: depend

depend:: $(SRCS)

aes-gen: aes-gen.o $(GEN_OBJS)
	$(CC_LINK) -o aes-gen aes-gen.o $(GEN_OBJS)

run-aes-gen: aes-gen
	./aes-gen > kresults.out

check:: run-aes-gen

aes-test: aes-test.$(OBJEXT) $(CRYPTO_DEPLIB)
	$(CC_LINK) -o aes-test aes-test.$(OBJEXT) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(SUPPORT_LIB)

check:: run-aes-test
run-aes-test: aes-test
	$(RUN_SETUP) $(VALGRIND) ./aes-test -k > vk.txt
	cmp vk.txt $(srcdir)/expect-vk.txt
	$(RUN_SETUP) $(VALGRIND) ./aes-test > vt.txt
	cmp vt.txt $(srcdir)/expect-vt.txt

clean-unix:: clean-libobjs

clean::
	-$(RM) aes-gen aes-gen.o vt.txt vk.txt kresults.out aes-test aes-test.o

@libobj_frag@

# +++ Dependency line eater +++
# 
# Makefile dependencies follow.  This must be the last section in
# the Makefile.in file
#
aescrypt.so aescrypt.po $(OUTPRE)aescrypt.$(OBJEXT): \
  $(BUILDTOP)/include/autoconf.h aes.h aescrypt.c aesopt.h \
  uitypes.h
aestab.so aestab.po $(OUTPRE)aestab.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  aes.h aesopt.h aestab.c uitypes.h
aeskey.so aeskey.po $(OUTPRE)aeskey.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  aes.h aeskey.c aesopt.h uitypes.h
aes_s2k.so aes_s2k.po $(OUTPRE)aes_s2k.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
  $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-err.h \
  $(SRCTOP)/include/k5-int.h $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-plugin.h $(SRCTOP)/include/k5-thread.h \
  $(SRCTOP)/include/krb5.h $(SRCTOP)/include/krb5/locate_plugin.h \
  $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
  $(SRCTOP)/include/socket-utils.h $(srcdir)/../dk/dk.h \
  aes_s2k.c aes_s2k.h
