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

##DOS##BUILDTOP = ..\..\..
##DOS##PREFIXDIR=aes
##DOS##OBJFILE=..\$(OUTPRE)aes.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=\
	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) -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)

check:: run-aes-test
run-aes-test: aes-test
	$(RUN_SETUP) ./aes-test -k > vk.txt
	cmp vk.txt $(srcdir)/expect-vk.txt
	$(RUN_SETUP) ./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): aescrypt.c aesopt.h aes.h \
  uitypes.h
aestab.so aestab.po $(OUTPRE)aestab.$(OBJEXT): aestab.c aesopt.h aes.h \
  uitypes.h
aeskey.so aeskey.po $(OUTPRE)aeskey.$(OBJEXT): aeskey.c aesopt.h aes.h \
  uitypes.h
aes_s2k.so aes_s2k.po $(OUTPRE)aes_s2k.$(OBJEXT): aes_s2k.c $(SRCTOP)/include/k5-int.h \
  $(BUILDTOP)/include/krb5/osconf.h $(BUILDTOP)/include/krb5/autoconf.h \
  $(BUILDTOP)/include/krb5.h $(COM_ERR_DEPS) $(BUILDTOP)/include/profile.h \
  $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
  $(SRCTOP)/include/krb5/kdb.h $(srcdir)/../dk/dk.h aes_s2k.h

