# Makefile.in --
#
#	This file is the Makefile for the TEA compliant Trf Extension.
#	If it has the name "Makefile.in" then it is a template for a Makefile;
#	to generate the actual Makefile, run "./configure", which is a
#	configuration script generated by the "autoconf" program (constructs
#	like "@foo@" will get replaced in the actual Makefile.
#
# Copyright (c) 1999 Scriptics Corporation.
# Copyright (c) 1999 Andreas Kupries <a.kupries@westend.com>.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: Makefile.in,v 1.12 2001/03/27 13:08:44 tcl Exp $

#========================================================================
# Additional variables defined here for convenient access to some
# directories in the tree. The prefix 'TRF_' is used to differentiate them
# from everything else which was predefined by TEA.
#========================================================================

TRF_TOPDIR	=	$(srcdir)
TRF_GENSRCDIR	=	$(TRF_TOPDIR)/generic
TRF_DOCDIR	=	$(TRF_TOPDIR)/doc
TRF_TESTDIR	=	$(TRF_TOPDIR)/tests
TRF_TEATESTDIR	=	$(TRF_TOPDIR)/tea.tests
TRF_COMPATDIR	=	$(TRF_TOPDIR)/compat
TRF_MDDIR	=	$(TRF_TOPDIR)/md5-crypt

#========================================================================
# This is the (parameterized) name of the library that we are building.
# Extended for possible creation of supporting md5-crypt library.
#========================================================================

lib_BINARIES	=	$(Trf_LIB_FILE) $(Trf_STUB_LIB_FILE) $(MD5_LIB_FILE)
BINARIES	=	$(lib_BINARIES)

#========================================================================
# Enumerate the names of the source files included in this package.
# This will be used when a dist target is added to the Makefile.
#========================================================================

Trf_SOURCES	=	$(TRF_BASE_SRC)	\
			$(TRF_CVT_SRC)	\
			$(TRF_MD_SRC)	\
			$(TRF_ECC_SRC)	\
			$(TRF_COMPRESS_SRC)

TRF_BASE_SRC	=	$(TRF_GENSRCDIR)/zlib.c		\
			$(TRF_GENSRCDIR)/bz2lib.c	\
			$(TRF_GENSRCDIR)/loadman.c	\
			$(TRF_GENSRCDIR)/init.c		\
			$(TRF_GENSRCDIR)/registry.c	\
			$(TRF_GENSRCDIR)/unstack.c	\
			$(TRF_GENSRCDIR)/load.c		\
			$(TRF_GENSRCDIR)/trfStubInit.c	\
			$(TRF_GENSRCDIR)/crypt.c

# Deprecated		$(TRF_GENSRCDIR)/binio.c

TRF_CVT_SRC	=	$(TRF_CVT_BASE_SRC)	\
			$(TRF_CVT_ALG_SRC)

TRF_CVT_BASE_SRC=	$(TRF_GENSRCDIR)/convert.c	\
			$(TRF_GENSRCDIR)/util.c		\
			$(TRF_GENSRCDIR)/ref_opt.c

TRF_CVT_ALG_SRC	=	$(TRF_GENSRCDIR)/bincode.c	\
			$(TRF_GENSRCDIR)/hexcode.c	\
			$(TRF_GENSRCDIR)/octcode.c	\
			$(TRF_GENSRCDIR)/uucode.c	\
			$(TRF_GENSRCDIR)/b64code.c	\
			$(TRF_GENSRCDIR)/asc85code.c	\
			$(TRF_GENSRCDIR)/otpcode.c	\
			$(TRF_GENSRCDIR)/qpcode.c	\
			$(TRF_GENSRCDIR)/reflect.c

TRF_MD_SRC	=	$(TRF_GENSRCDIR)/dig_opt.c	\
			$(TRF_GENSRCDIR)/digest.c	\
			$(TRF_GENSRCDIR)/crc.c		\
			$(TRF_GENSRCDIR)/md5dig.c	\
			$(TRF_GENSRCDIR)/haval.c	\
			$(TRF_GENSRCDIR)/sha.c		\
			$(TRF_GENSRCDIR)/adler.c	\
			$(TRF_GENSRCDIR)/crc_zlib.c	\
			$(TRF_GENSRCDIR)/md2.c		\
			$(TRF_GENSRCDIR)/sha1.c		\
			$(TRF_GENSRCDIR)/rmd160.c	\
			$(TRF_GENSRCDIR)/rmd128.c	\
			$(TRF_GENSRCDIR)/otpmd5.c	\
			$(TRF_GENSRCDIR)/otpsha1.c

TRF_ECC_SRC	=	$(TRF_GENSRCDIR)/rs_ecc.c

TRF_COMPRESS_SRC=	$(TRF_GENSRCDIR)/zip_opt.c	\
			$(TRF_GENSRCDIR)/zip.c		\
			$(TRF_GENSRCDIR)/bz2_opt.c	\
			$(TRF_GENSRCDIR)/bz2.c

SOURCES		=	$(Trf_SOURCES)

#========================================================================

MD5_SOURCES	=	$(TRF_MDDIR)/crypt-entry.c	\
			$(TRF_MDDIR)/md5-crypt.c	\
			$(TRF_MDDIR)/md5.c		\
			$(TRF_COMPATDIR)/stpncpy.c

#========================================================================
# Enumerate the names of the object files included in this package.
# These objects are created and linked into the final library.  In
# most cases these object files will correspond to the source files
# above.
#========================================================================

Trf_STUB_OBJECTS=	trfStubLib.$(OBJEXT)

Trf_OBJECTS	=	$(TRF_BASE_OBJ)		\
			$(TRF_CVT_OBJ)		\
			$(TRF_MD_OBJ)		\
			$(TRF_ECC_OBJ)		\
			$(TRF_COMPRESS_OBJ)

TRF_BASE_OBJ	=	@DL_OBJS@ bz2lib.$(OBJEXT)	\
			zlib.$(OBJEXT)		\
			loadman.$(OBJEXT) 	\
			init.$(OBJEXT)		\
			registry.$(OBJEXT) 	\
			unstack.$(OBJEXT) 	\
			load.$(OBJEXT)		\
			crypt.$(OBJEXT)		\
			trfStubInit.$(OBJEXT)

# Deprecated		binio.$(OBJEXT)

TRF_CVT_OBJ	=	$(TRF_CVT_BASE_OBJ)	\
			$(TRF_CVT_ALG_OBJ)

TRF_CVT_BASE_OBJ=	convert.$(OBJEXT)	\
			util.$(OBJEXT)		\
			ref_opt.$(OBJEXT)

TRF_CVT_ALG_OBJ	=	bincode.$(OBJEXT)	\
			hexcode.$(OBJEXT)	\
			octcode.$(OBJEXT)	\
			uucode.$(OBJEXT)	\
			b64code.$(OBJEXT)	\
			asc85code.$(OBJEXT)	\
			otpcode.$(OBJEXT)	\
			qpcode.$(OBJEXT)	\
			reflect.$(OBJEXT)

TRF_MD_OBJ	=	dig_opt.$(OBJEXT)	\
			digest.$(OBJEXT)	\
			crc.$(OBJEXT)		\
			md5dig.$(OBJEXT)	\
			haval.$(OBJEXT)		\
			sha.$(OBJEXT)		\
			adler.$(OBJEXT)		\
			crc_zlib.$(OBJEXT)	\
			md2.$(OBJEXT)		\
			sha1.$(OBJEXT)		\
			rmd160.$(OBJEXT)	\
			rmd128.$(OBJEXT)	\
			otpmd5.$(OBJEXT)	\
			otpsha1.$(OBJEXT)

TRF_ECC_OBJ	=	rs_ecc.$(OBJEXT)

TRF_COMPRESS_OBJ=	zip_opt.$(OBJEXT)	\
			zip.$(OBJEXT)		\
			bz2_opt.$(OBJEXT)	\
			bz2.$(OBJEXT)

OBJECTS		=	$(Trf_OBJECTS)

#========================================================================

MD5_OBJECTS	=	stpncpy.$(OBJEXT)	\
			crypt-entry.$(OBJEXT)	\
			md5-crypt.$(OBJEXT)	\
			md5.$(OBJEXT)

#========================================================================
# The substitution of "Trf_LIB_FILE" into the variable name below
# let's us refer to the objects for the library without knowing the name
# of the library in advance.  It also lets us use the "$@" variable in
# the rule for building the library, so we can refer to both the list of 
# objects and the library itself in a platform-independent manner.
#========================================================================

Trf_LIB_FILE			=	@Trf_LIB_FILE@
$(Trf_LIB_FILE)_OBJECTS		=	$(Trf_OBJECTS)

Trf_STUB_LIB_FILE		=	@Trf_STUB_LIB_FILE@
$(Trf_STUB_LIB_FILE)_OBJECTS	=	$(Trf_STUB_OBJECTS)

Trf_INCLUDES		=	-I$(ZLIB_INCLUDE_DIR)	\
				-I$(SSL_INCLUDE_DIR)	\

#========================================================================

MD5_LIB_FILE			=	@MD5_LIB_FILE@
$(MD5_LIB_FILE)_OBJECTS		=	$(MD5_OBJECTS)

#========================================================================
# This is a list of header files to be installed
#========================================================================

GENERIC_HDRS	=	$(TRF_GENSRCDIR)/transform.h	\
			$(TRF_GENSRCDIR)/trfDecls.h

#========================================================================
# Define a list of files containing the stub declarations.
#========================================================================

Trf_DECLS = \
	$(TRF_GENSRCDIR)/trf.decls \
	$(TRF_GENSRCDIR)/trfInt.decls

#========================================================================
# Add additional lines to handle any additional AC_SUBST cases that
# have been added to the configure script.
#========================================================================

TRF_VERSION		=	2.1
TRF_TESTS		=	@TRF_TESTS@

SSL_LIB_DIR		=	@SSL_LIB_DIR@
SSL_INCLUDE_DIR		=	@SSL_INCLUDE_DIR@

ZLIB_LIB_DIR		=	@ZLIB_LIB_DIR@
ZLIB_INCLUDE_DIR	=	@ZLIB_INCLUDE_DIR@

#========================================================================
# Nothing of the variables below this line need to be changed.  Please
# check the TARGETS section below to make sure the make targets are
# correct.
#========================================================================

SHELL		= @SHELL@

srcdir		= @srcdir@
top_srcdir	= @top_srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@

bindir		= @bindir@
sbindir		= @sbindir@
libexecdir	= @libexecdir@
datadir		= @datadir@
sysconfdir	= @sysconfdir@
sharedstatedir	= @sharedstatedir@
localstatedir	= @localstatedir@
libdir		= @libdir@
infodir		= @infodir@
mandir		= @mandir@
includedir	= @includedir@
oldincludedir	= /usr/include

DESTDIR =

pkgdatadir	= $(datadir)/@PACKAGE@
pkglibdir	= $(libdir)/@PACKAGE@
pkgincludedir	= $(includedir)/@PACKAGE@

top_builddir	= .

INSTALL			= @INSTALL@
INSTALL_PROGRAM		= @INSTALL_PROGRAM@
INSTALL_DATA		= @INSTALL_DATA@
INSTALL_SCRIPT		= @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG	=
transform		= @program_transform_name@

NORMAL_INSTALL		= :
PRE_INSTALL		= :
POST_INSTALL		= :
NORMAL_UNINSTALL	= :
PRE_UNINSTALL		= :
POST_UNINSTALL		= :

PACKAGE			= @PACKAGE@
VERSION			= @VERSION@
CC			= @CC@
CFLAGS_DEBUG		= @CFLAGS_DEBUG@
CFLAGS_DEFAULT		= @CFLAGS_DEFAULT@
CFLAGS_OPTIMIZE		= @CFLAGS_OPTIMIZE@
CLEANFILES		= @CLEANFILES@
EXEEXT			= @EXEEXT@
LDFLAGS_DEBUG		= @LDFLAGS_DEBUG@
LDFLAGS_DEFAULT		= @LDFLAGS_DEFAULT@
LDFLAGS_OPTIMIZE	= @LDFLAGS_OPTIMIZE@
MAKE_LIB		= @MAKE_LIB@
MAKE_SHARED_LIB		= @MAKE_SHARED_LIB@
MAKE_STATIC_LIB		= @MAKE_STATIC_LIB@
OBJEXT			= @OBJEXT@
RANLIB			= @RANLIB@
SHLIB_CFLAGS		= @SHLIB_CFLAGS@
SHLIB_LD		= @SHLIB_LD@
SHLIB_LDFLAGS		= @SHLIB_LDFLAGS@
SHLIB_LD_LIBS		= @SHLIB_LD_LIBS@
STLIB_LD		= @STLIB_LD@
TCL_BIN_DIR		= @TCL_BIN_DIR@
TCL_DEFS		= @TCL_DEFS@
TCL_EXTRA_CFLAGS	= @TCL_EXTRA_CFLAGS@
TCL_LD_FLAGS		= @TCL_LD_FLAGS@
TCL_LIBS		= @TCL_LIBS@
TCL_SHLIB_LD_LIBS	= @TCL_SHLIB_LD_LIBS@
TCL_SRC_DIR		= @TCL_SRC_DIR@
TCL_DBGX		= @TCL_DBGX@
TCL_STUB_LIB_FILE	= @TCL_STUB_LIB_FILE@
TCL_STUB_LIB_SPEC	= @TCL_STUB_LIB_SPEC@
TCL_TOOL_DIR_NATIVE	= @TCL_TOOL_DIR_NATIVE@
TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
TCL_UNIX_DIR_NATIVE	= @TCL_UNIX_DIR_NATIVE@
TCL_WIN_DIR_NATIVE	= @TCL_WIN_DIR_NATIVE@
INCLUDE_DIR_NATIVE	= @INCLUDE_DIR_NATIVE@
TCL_BMAP_DIR_NATIVE	= @TCL_BMAP_DIR_NATIVE@
TCL_PLATFORM_DIR_NATIVE	= @TCL_PLATFORM_DIR_NATIVE@
TCL_GENERIC_DIR_NATIVE	= @TCL_GENERIC_DIR_NATIVE@
TCLSH_PROG		= @TCLSH_PROG@

AUTOCONF	= autoconf

LDFLAGS		= $(LDFLAGS_DEFAULT)

INCLUDES	= @TCL_INCLUDES@ $(Trf_INCLUDES)
MD_INCLUDES	= $(INCLUDES) -I$(TRF_MDDIR)

EXTRA_CFLAGS	=	$(TCL_DEFS)		\
			$(PROTO_FLAGS)		\
			$(SECURITY_FLAGS)	\
			$(MEM_DEBUG_FLAGS)	\
			$(KEYSYM_FLAGS)		\
			$(NO_DEPRECATED_FLAGS)

DEFS		= @DEFS@ $(EXTRA_CFLAGS)

ACLOCAL_M4		= $(top_srcdir)/aclocal.m4
mkinstalldirs		= $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES	= mkIndex.tcl test.setup

CPPFLAGS	= @CPPFLAGS@
LIBS		= @LIBS@
AR		= ar
CFLAGS		= @CFLAGS@
COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

COMPILE_MD	= $(CC) $(DEFS) $(MD_INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

CCLD		= $(CC)
LINK		= $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@

#========================================================================
# Start of user-definable TARGETS section
#========================================================================

#========================================================================
# TEA TARGETS.  Please note that the "libraries:" target refers to platform
# independent files, and the "binaries:" target inclues executable programs and
# platform-dependent libraries.  Modify these targets so that they install
# the various pieces of your package.  The make and install rules
# for the BINARIES that you specified above have already been done.
#========================================================================

all: binaries libraries doc

#========================================================================
# The binaries target builds executable programs, Windows .dll's, unix
# shared/static libraries, and any other platform-dependent files.
# The list of targets to build for "binaries:" is specified at the top
# of the Makefile, in the "BINARIES" variable.
#========================================================================

binaries: $(BINARIES)

libraries:

doc:
#	Currently no documentation to create, the HTML is part of the
#	distribution.
#	.................................................................
#	@echo "If you have documentation to create, place the commands to"
#	@echo "build the docs in the 'doc:' target.  For example:"
#	@echo ""
#	@echo "xml2nroff exampleA.xml > exampleA.n"
#	@echo "xml2html exampleA.xml > exampleA.html"

install: all install-binaries install-libraries install-doc

install-binaries: binaries install-lib-binaries install-bin-binaries

#========================================================================
# This rule installs platform-independent files, such as header files.
#========================================================================

install-libraries: libraries
	$(mkinstalldirs) $(includedir)
	@echo "Installing header files in $(includedir)"
	@for i in $(GENERIC_HDRS) ; do \
	    echo "Installing $$i" ; \
	    $(INSTALL_DATA) $$i $(includedir) ; \
	done;

#========================================================================
# Install documentation.  Unix manpages should go in the $(mandir)
# directory.
#========================================================================

install-doc: doc
	@echo "Information about the usage of this extension can be found"
	@echo "in the HTML documentation at ${TRF_DOCDIR}/html/index.html"
	@echo "or, more specifically ${TRF_DOCDIR}/html/trf_cmds.html"
	@echo "Just use your favorite browser to read them."

#	Currently no documentation to install. We have documentation in HTML
#	format, but there is no agreed upon place for them.
#	...............................................
#	$(mkinstalldirs) $(mandir)/man1
#	$(mkinstalldirs) $(mandir)/man3
#	$(mkinstalldirs) $(mandir)/mann
#	@for i in $(srcdir)/*.n; \
#	    do \
#	    echo "Installing $$i"; \
#	    rm -f $(mandir)/mann/$$i; \
#	    $(INSTALL_DATA) $$i $(mandir)/mann/$$i ; \
#	    chmod 444 $(mandir)/mann/$$i; \
#       done

check:	test
test:
	LD_LIBRARY_PATH="$(srcdir):../tea/:$(ZLIB_LIB_DIR):$(SSL_LIB_DIR)"; \
	export LD_LIBRARY_PATH; \
	SHLIB_PATH="$LD_LIBRARY_PATH"; export SHLIB_PATH ;	\
	echo load ./$(Trf_LIB_FILE) \; cd $(TRF_TESTDIR) \; source defs \; defConstraints \"$(TRF_TESTS)\" \; source all | $(TCLSH_PROG)

testshell	=	$(TCLSH_PROG) $(srcdir)/testshell

tcheck:
ttest:
	LD_LIBRARY_PATH="$(srcdir):$(ZLIB_LIB_DIR):$(SSL_LIB_DIR)";	\
	export LD_LIBRARY_PATH; SHLIB_PATH="$LD_LIBRARY_PATH"; export SHLIB_PATH ;	\
	$(testshell)	\
		-constraints '$(TRF_TESTS)'	\
		-loadfile $(srcdir)/test.setup	\
		-testdir  $(TRF_TEATESTDIR) 


#	LD_LIBRARY_PATH="$(srcdir):$(TCL_LIB_DIR)"; export \
#	SHLIB_PATH="$(srcdir):$(TCL_LIB_DIR)"; \

depend:

#
# Target to regenerate header files and stub files from the *.decls tables.
#

genstubs:
	$(TCLSH_PROG)	\
		$(TRF_TOOLDIR)/genStubs.tcl $(TRF_GENSRCDIR) \
		$(TRF_GENSRCDIR)/trf.decls	\
		$(TRF_GENSRCDIR)/trfInt.decls

#
# Target to check that all exported functions have an entry in the stubs
# tables.
#

checkstubs:
	-@for i in `nm -p $(Trf_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
		| sort -n`; do \
		match=0; \
		for j in $(Trf_DECLS); do \
		    if [ `grep -c $$i $$j` -gt 0 ]; then \
			match=1; \
		    fi; \
		done; \
		if [ $$match -eq 0 ]; then echo $$i; fi \
	done

#========================================================================
# Enumerate the names of the object files included in this package.
# These objects are created and linked into the final library.  In
# most cases these object files will correspond to the source files
# above.
#
# $(Trf_LIB_FILE) is listed as part of the BINARIES variable at the
# top of the Makefile.  That ensures that this target is built when you
# run "make binaries".
#
# You shouldn't need to modify this target.
#========================================================================

$(Trf_LIB_FILE): $(Trf_OBJECTS)
	-rm -f $(Trf_LIB_FILE)
	@MAKE_LIB@
	$(RANLIB) $(Trf_LIB_FILE)

$(Trf_STUB_LIB_FILE): $(Trf_STUB_OBJECTS)
	$(AR) cr $@ $(Trf_STUB_OBJECTS)

#========================================================================
# Additional target for supporting library.

$(MD5_LIB_FILE): $(MD5_OBJECTS)
	-rm -f $(MD5_LIB_FILE)
	@MAKE_LIB@
	$(RANLIB) $(MD5_LIB_FILE)

#========================================================================
# We need to enumerate the list of .c to .o lines here.
# Unfortunately, there does not seem to be any other way to do this
# in a Makefile-independent way.  We can't use VPATH because it picks up
# object files that may be located in the source directory.
#
# In the following lines, $(srcdir) refers to the toplevel directory
# containing your extension.
#
# ** Wrong **, it refers to the path P which was used to find the file
# given to AC_INIT, i.e. in case of AC_INIT(file) the system found it via
# P/file. Here it most commonly refers to '/somewhere/trf/tea/', which
# is not the toplevel directory containing the extensions.
#
# The text above assumes a directory structure where the Makefile and all
# related files *are* found in the toplevel directory. 
#
# If your sources are in a subdirectory, you will have to modify the paths
# to reflect this:
#
# exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c
# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@
#========================================================================

trfStubLib.$(OBJEXT):	$(TRF_GENSRCDIR)/trfStubLib.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/trfStubLib.c` -o $@

trfStubInit.$(OBJEXT):	$(TRF_GENSRCDIR)/trfStubInit.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/trfStubInit.c` -o $@

load.$(OBJEXT): $(TRF_GENSRCDIR)/load.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/load.c` -o $@

crypt.$(OBJEXT): $(TRF_GENSRCDIR)/crypt.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/crypt.c` -o $@

zlib.$(OBJEXT): $(TRF_GENSRCDIR)/zlib.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/zlib.c` -o $@

bz2lib.$(OBJEXT): $(TRF_GENSRCDIR)/bz2lib.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/bz2lib.c` -o $@

loadman.$(OBJEXT): $(TRF_GENSRCDIR)/loadman.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/loadman.c` -o $@

init.$(OBJEXT): $(TRF_GENSRCDIR)/init.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/init.c` -o $@

registry.$(OBJEXT): $(TRF_GENSRCDIR)/registry.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/registry.c` -o $@

unstack.$(OBJEXT): $(TRF_GENSRCDIR)/unstack.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/unstack.c` -o $@

#binio.$(OBJEXT): $(TRF_GENSRCDIR)/binio.c
#	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/binio.c` -o $@

convert.$(OBJEXT): $(TRF_GENSRCDIR)/convert.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/convert.c` -o $@

util.$(OBJEXT): $(TRF_GENSRCDIR)/util.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/util.c` -o $@

bincode.$(OBJEXT): $(TRF_GENSRCDIR)/bincode.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/bincode.c` -o $@

hexcode.$(OBJEXT): $(TRF_GENSRCDIR)/hexcode.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/hexcode.c` -o $@

octcode.$(OBJEXT): $(TRF_GENSRCDIR)/octcode.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/octcode.c` -o $@

uucode.$(OBJEXT): $(TRF_GENSRCDIR)/uucode.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/uucode.c` -o $@

b64code.$(OBJEXT): $(TRF_GENSRCDIR)/b64code.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/b64code.c` -o $@

asc85code.$(OBJEXT): $(TRF_GENSRCDIR)/asc85code.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/asc85code.c` -o $@

otpcode.$(OBJEXT): $(TRF_GENSRCDIR)/otpcode.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/otpcode.c` -o $@

dig_opt.$(OBJEXT): $(TRF_GENSRCDIR)/dig_opt.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/dig_opt.c` -o $@

digest.$(OBJEXT): $(TRF_GENSRCDIR)/digest.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/digest.c` -o $@

crc.$(OBJEXT): $(TRF_GENSRCDIR)/crc.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/crc.c` -o $@

md5dig.$(OBJEXT): $(TRF_GENSRCDIR)/md5dig.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/md5dig.c` -o $@

md2.$(OBJEXT): $(TRF_GENSRCDIR)/md2.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/md2.c` -o $@

haval.$(OBJEXT): $(TRF_GENSRCDIR)/haval.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/haval.c` -o $@

sha.$(OBJEXT): $(TRF_GENSRCDIR)/sha.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/sha.c` -o $@

sha1.$(OBJEXT): $(TRF_GENSRCDIR)/sha1.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/sha1.c` -o $@

rmd160.$(OBJEXT): $(TRF_GENSRCDIR)/rmd160.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/rmd160.c` -o $@

rmd128.$(OBJEXT): $(TRF_GENSRCDIR)/rmd128.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/rmd128.c` -o $@

otpmd5.$(OBJEXT): $(TRF_GENSRCDIR)/otpmd5.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/otpmd5.c` -o $@

otpsha1.$(OBJEXT): $(TRF_GENSRCDIR)/otpsha1.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/otpsha1.c` -o $@

adler.$(OBJEXT): $(TRF_GENSRCDIR)/adler.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/adler.c` -o $@

crc_zlib.$(OBJEXT): $(TRF_GENSRCDIR)/crc_zlib.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/crc_zlib.c` -o $@

rs_ecc.$(OBJEXT): $(TRF_GENSRCDIR)/rs_ecc.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/rs_ecc.c` -o $@

zip_opt.$(OBJEXT): $(TRF_GENSRCDIR)/zip_opt.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/zip_opt.c` -o $@

zip.$(OBJEXT): $(TRF_GENSRCDIR)/zip.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/zip.c` -o $@

bz2_opt.$(OBJEXT): $(TRF_GENSRCDIR)/bz2_opt.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/bz2_opt.c` -o $@

bz2.$(OBJEXT): $(TRF_GENSRCDIR)/bz2.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/bz2.c` -o $@

qpcode.$(OBJEXT): $(TRF_GENSRCDIR)/qpcode.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/qpcode.c` -o $@

reflect.$(OBJEXT): $(TRF_GENSRCDIR)/reflect.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/reflect.c` -o $@

ref_opt.$(OBJEXT): $(TRF_GENSRCDIR)/ref_opt.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/ref_opt.c` -o $@


#-------------------------------------------------------#
# compat files

tclLoadAix.$(OBJEXT):	$(TRF_COMPATDIR)/tclLoadAix.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_COMPATDIR)/tclLoadAix.c` -o $@

tclLoadDld.$(OBJEXT):	$(TRF_COMPATDIR)/tclLoadDld.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_COMPATDIR)/tclLoadDld.c` -o $@

tclLoadShl.$(OBJEXT):	$(TRF_COMPATDIR)/tclLoadShl.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_COMPATDIR)/tclLoadShl.c` -o $@

tclLoadAout.$(OBJEXT):	$(TRF_COMPATDIR)/tclLoadAout.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_COMPATDIR)/tclLoadAout.c` -o $@

tclLoadNone.$(OBJEXT):	$(TRF_COMPATDIR)/tclLoadNone.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_COMPATDIR)/tclLoadNone.c` -o $@

_eprintf.$(OBJEXT):	$(TRF_COMPATDIR)/_eprintf.c
	$(COMPILE) -c `@CYGPATH@ $(TRF_COMPATDIR)/_eprintf.c` -o $@

#-------------------------------------------------------#
# MD5 files for supporting library

stpncpy.$(OBJEXT):	$(TRF_COMPATDIR)/stpncpy.c
	$(COMPILE_MD) -c `@CYGPATH@ $(TRF_COMPATDIR)/stpncpy.c` -o $@

crypt-entry.$(OBJEXT):	$(TRF_MDDIR)/crypt-entry.c
	$(COMPILE_MD) -c `@CYGPATH@ $(TRF_MDDIR)/crypt-entry.c` -o $@

md5-crypt.$(OBJEXT):	$(TRF_MDDIR)/md5-crypt.c
	$(COMPILE_MD) -c `@CYGPATH@ $(TRF_MDDIR)/md5-crypt.c` -o $@

md5.$(OBJEXT):	$(TRF_MDDIR)/md5.c
	$(COMPILE_MD) -c `@CYGPATH@ $(TRF_MDDIR)/md5.c` -o $@

#========================================================================
# End of user-definable section
#========================================================================

#========================================================================
# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
# variable in configure.in
#========================================================================

clean:  
	-test -z "$(BINARIES)" || rm -f $(BINARIES)
	-rm -f *.o core *.core
	-rm -f *.$(OBJEXT)
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean: clean
	-rm -f *.tab.c
	-rm -f Makefile $(CONFIG_CLEAN_FILES)
	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
	-rm -f config.status

#========================================================================
# Install binary object libraries.  On Windows this includes both .dll and
# .lib files.  Because the .lib files are not explicitly listed anywhere,
# we need to deduce their existence from the .dll file of the same name.
# Additionally, the .dll files go into the bin directory, but the .lib
# files go into the lib directory.  On Unix platforms, all library files
# go into the lib directory.  In addition, this will generate the pkgIndex.tcl
# file in the install location (assuming it can find a usable tclsh8.2 shell)
#
# You should not have to modify this target.
#========================================================================

install-lib-binaries: installdirs
	@list='$(lib_BINARIES)'; for p in $$list; do \
	  if test -f $$p; then \
	    ext=`echo $$p|sed -e "s/.*\.//"`; \
	    if test "x$$ext" = "xdll"; then \
	        echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
	        $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
		if test -f $$lib; then \
		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \
	            $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \
		fi; \
	    else \
		echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
	        $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
	    fi; \
	  else :; fi; \
	done
	@list='$(lib_BINARIES)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
	  else :; fi; \
	done
	if test "x$(MAKE_LIB)" = "x$(MAKE_SHARED_LIB)"; then \
	  $(TCLSH_PROG) mkIndex.tcl $(lib_BINARIES); \
	fi

#========================================================================
# Install binary executables (e.g. .exe files)
#
# You should not have to modify this target.
#========================================================================

install-bin-binaries: installdirs
	@list='$(bin_BINARIES)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
	    $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
	  else :; fi; \
	done

.SUFFIXES: .c .o .obj

Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
	cd $(top_builddir) \
	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	$(SHELL) ./config.status --recheck

$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
	cd $(srcdir) && $(AUTOCONF)


uninstall-binaries:
	@$(NORMAL_UNINSTALL)
	list='$(BINARIES)'; for p in $$list; do \
	  rm -f $(DESTDIR)$(libdir)/$$p; \
	done

installdirs:
	$(mkinstalldirs)  $(DESTDIR)$(libdir)
	$(mkinstalldirs)  $(DESTDIR)$(bindir)
	$(mkinstalldirs)  $(DESTDIR)$(pkglibdir)

.PHONY: all binaries clean depend distclean doc install installdirs libraries test

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

