thisconfigdir=.
myfulldir=lib/crypto
mydir=.
BUILDTOP=$(REL)$(U)$(S)$(U)
LOCAL_SUBDIRS=crc32 des dk enc_provider hash_provider keyhash_provider \
	md4 md5 old raw sha1
LOCALINCLUDES = -I$(srcdir)/enc_provider \
	-I$(srcdir)/hash_provider -I$(srcdir)/keyhash_provider \
	-I$(srcdir)/old -I$(srcdir)/raw -I$(srcdir)/dk

##DOSBUILDTOP = ..\..
##DOSLIBNAME=$(OUTPRE)crypto.lib
##DOSOBJFILE=$(OUTPRE)crypto.lst
##DOSOBJFILELIST=@$(OUTPRE)crypto.lst @$(OUTPRE)des.lst @$(OUTPRE)md4.lst @$(OUTPRE)md5.lst @$(OUTPRE)sha1.lst @$(OUTPRE)crc32.lst @$(OUTPRE)dk.lst @$(OUTPRE)old.lst @$(OUTPRE)raw.lst @$(OUTPRE)enc_prov.lst @$(OUTPRE)hash_pro.lst @$(OUTPRE)kh_pro.lst
##DOSOBJFILEDEP =$(OUTPRE)crypto.lst $(OUTPRE)des.lst $(OUTPRE)md4.lst $(OUTPRE)md5.lst $(OUTPRE)sha1.lst $(OUTPRE)crc32.lst $(OUTPRE)dk.lst $(OUTPRE)old.lst $(OUTPRE)raw.lst $(OUTPRE)enc_prov.lst $(OUTPRE)hash_pro.lst $(OUTPRE)kh_pro.lst

MAC_SUBDIRS = crc32 des dk enc_provider hash_provider keyhash_provider \
	md4 md5 old raw sha1

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

STLIBOBJS=\
	block_size.o		\
	checksum_length.o	\
	cksumtype_to_string.o	\
	cksumtypes.o		\
	coll_proof_cksum.o	\
	crypto_libinit.o	\
	decrypt.o		\
	encrypt.o		\
	encrypt_length.o	\
	enctype_compare.o	\
	enctype_to_string.o	\
	etypes.o		\
	hmac.o			\
	keyed_cksum.o		\
	keyed_checksum_types.o	\
	make_checksum.o		\
	make_random_key.o	\
	nfold.o			\
	old_api_glue.o		\
	prng.o			\
	string_to_cksumtype.o	\
	string_to_enctype.o	\
	string_to_key.o		\
	valid_cksumtype.o	\
	valid_enctype.o		\
	verify_checksum.o

OBJS=\
	$(OUTPRE)block_size.$(OBJEXT)		\
	$(OUTPRE)checksum_length.$(OBJEXT)	\
	$(OUTPRE)cksumtype_to_string.$(OBJEXT)	\
	$(OUTPRE)cksumtypes.$(OBJEXT)		\
	$(OUTPRE)coll_proof_cksum.$(OBJEXT)	\
	$(OUTPRE)crypto_libinit.$(OBJEXT)	\
	$(OUTPRE)decrypt.$(OBJEXT)		\
	$(OUTPRE)encrypt.$(OBJEXT)		\
	$(OUTPRE)encrypt_length.$(OBJEXT)	\
	$(OUTPRE)enctype_compare.$(OBJEXT)	\
	$(OUTPRE)enctype_to_string.$(OBJEXT)	\
	$(OUTPRE)etypes.$(OBJEXT)		\
	$(OUTPRE)hmac.$(OBJEXT)			\
	$(OUTPRE)keyed_cksum.$(OBJEXT)		\
	$(OUTPRE)keyed_checksum_types.$(OBJEXT)	\
	$(OUTPRE)make_checksum.$(OBJEXT)	\
	$(OUTPRE)make_random_key.$(OBJEXT)	\
	$(OUTPRE)nfold.$(OBJEXT)		\
	$(OUTPRE)old_api_glue.$(OBJEXT)		\
	$(OUTPRE)prng.$(OBJEXT)			\
	$(OUTPRE)string_to_cksumtype.$(OBJEXT)	\
	$(OUTPRE)string_to_enctype.$(OBJEXT)	\
	$(OUTPRE)string_to_key.$(OBJEXT)	\
	$(OUTPRE)valid_cksumtype.$(OBJEXT)	\
	$(OUTPRE)valid_enctype.$(OBJEXT)	\
	$(OUTPRE)verify_checksum.$(OBJEXT)

SRCS=\
	$(subdir)/block_size.c		\
	$(subdir)/checksum_length.c	\
	$(subdir)/cksumtype_to_string.c	\
	$(subdir)/cksumtypes.c		\
	$(subdir)/coll_proof_cksum.c	\
	$(subdir)/crypto_libinit.c	\
	$(subdir)/decrypt.c		\
	$(subdir)/encrypt.c		\
	$(subdir)/encrypt_length.c	\
	$(subdir)/enctype_compare.c	\
	$(subdir)/enctype_to_string.c	\
	$(subdir)/etypes.c		\
	$(subdir)/hmac.c		\
	$(subdir)/keyed_cksum.c		\
	$(subdir)/keyed_checksum_types.c\
	$(subdir)/make_checksum.c	\
	$(subdir)/make_random_key.c	\
	$(subdir)/nfold.c		\
	$(subdir)/old_api_glue.c	\
	$(subdir)/prng.c		\
	$(subdir)/string_to_cksumtype.c	\
	$(subdir)/string_to_enctype.c	\
	$(subdir)/string_to_key.c	\
	$(subdir)/valid_cksumtype.c	\
	$(subdir)/valid_enctype.c	\
	$(subdir)/verify_checksum.c


LIB=k5crypto
LIBMAJOR=3
LIBMINOR=0
RELDIR=crypto

STOBJLISTS=crc32/OBJS.ST des/OBJS.ST dk/OBJS.ST enc_provider/OBJS.ST \
	hash_provider/OBJS.ST keyhash_provider/OBJS.ST md4/OBJS.ST \
	md5/OBJS.ST old/OBJS.ST raw/OBJS.ST sha1/OBJS.ST OBJS.ST

# No dependencies.  Record places to find this shared object if the target
# link editor and loader support it.
DEPLIBS=
SHLIB_LIBS=
SHLIB_LDFLAGS= $(LDFLAGS) @SHLIB_RPATH_DIRS@
SHLIB_LIBDIRS= @SHLIB_LIBDIRS@

##DOS##LIBOBJS = $(OBJS)

all-unix:: all-liblinks
install-unix:: install-libs

libcrypto.lib:
	libdir crypto.lib

clean-unix:: clean-liblinks clean-libs clean-libobjs

check-unix:: t_nfold
	$(RUN_SETUP) ./t_nfold

t_nfold$(EXEEXT): t_nfold.$(OBJEXT) nfold.$(OBJEXT)
	$(CC_LINK) -o $@ t_nfold.$(OBJEXT) nfold.$(OBJEXT)

clean::
	$(RM) t_nfold.o t_nfold

all-windows::
	cd crc32
	@echo Making in crypto\crc32
	$(MAKE) -$(MFLAGS)
	cd ..\des
	@echo Making in crypto\des
	$(MAKE) -$(MFLAGS)
	cd ..\dk
	@echo Making in crypto\dk
	$(MAKE) -$(MFLAGS)
	cd ..\enc_provider
	@echo Making in crypto\enc_provider
	$(MAKE) -$(MFLAGS)
	cd ..\hash_provider
	@echo Making in crypto\hash_provider
	$(MAKE) -$(MFLAGS)
	cd ..\keyhash_provider
	@echo Making in crypto\keyhash_provider
	$(MAKE) -$(MFLAGS)
	cd ..\md4
	@echo Making in crypto\md4
	$(MAKE) -$(MFLAGS)
	cd ..\md5
	@echo Making in crypto\md5
	$(MAKE) -$(MFLAGS)
	cd ..\old
	@echo Making in crypto\old
	$(MAKE) -$(MFLAGS)
	cd ..\raw
	@echo Making in crypto\raw
	$(MAKE) -$(MFLAGS)
	cd ..\sha1
	@echo Making in crypto\sha1
	$(MAKE) -$(MFLAGS)
	cd ..

clean-windows::
	cd crc32
	@echo Making in clean crypto\crc32
	$(MAKE) -$(MFLAGS) clean
	cd ..\des
	@echo Making clean in crypto\des
	$(MAKE) -$(MFLAGS) clean
	cd ..\dk
	@echo Making clean in crypto\dk
	$(MAKE) -$(MFLAGS) clean
	cd ..\enc_provider
	@echo Making clean in crypto\enc_provider
	$(MAKE) -$(MFLAGS) clean
	cd ..\hash_provider
	@echo Making clean in crypto\hash_provider
	$(MAKE) -$(MFLAGS) clean
	cd ..\keyhash_provider
	@echo Making clean in crypto\keyhash_provider
	$(MAKE) -$(MFLAGS) clean
	cd ..\md4
	@echo Making clean in crypto\md4
	$(MAKE) -$(MFLAGS) clean
	cd ..\md5
	@echo Making clean in crypto\md5
	$(MAKE) -$(MFLAGS) clean
	cd ..\old
	@echo Making clean in crypto\old
	$(MAKE) -$(MFLAGS) clean
	cd ..\raw
	@echo Making clean in crypto\raw
	$(MAKE) -$(MFLAGS) clean
	cd ..\sha1
	@echo Making clean in crypto\sha1
	$(MAKE) -$(MFLAGS) clean
	cd ..

check-windows::
	cd crc32
	@echo Making in check crypto\crc32
	$(MAKE) -$(MFLAGS) check
	cd ..\des
	@echo Making check in crypto\des
	$(MAKE) -$(MFLAGS) check
	cd ..\dk
	@echo Making check in crypto\dk
	$(MAKE) -$(MFLAGS) check
	cd ..\enc_provider
	@echo Making check in crypto\enc_provider
	$(MAKE) -$(MFLAGS) check
	cd ..\hash_provider
	@echo Making check in crypto\hash_provider
	$(MAKE) -$(MFLAGS) check
	cd ..\keyhash_provider
	@echo Making check in crypto\keyhash_provider
	$(MAKE) -$(MFLAGS) check
	cd ..\md4
	@echo Making check in crypto\md4
	$(MAKE) -$(MFLAGS) check
	cd ..\md5
	@echo Making check in crypto\md5
	$(MAKE) -$(MFLAGS) check
	cd ..\old
	@echo Making check in crypto\old
	$(MAKE) -$(MFLAGS) check
	cd ..\raw
	@echo Making check in crypto\raw
	$(MAKE) -$(MFLAGS) check
	cd ..\sha1
	@echo Making check in crypto\sha1
	$(MAKE) -$(MFLAGS) check
	cd ..

