Artifact Content
Bounty program for improvements to Tcl and certain Tcl packages.

Artifact cbd033543a3a36b3a7616fa5cca8be68e2f8fec4:

CC = @[email protected]
AR = @[email protected]
RANLIB = @[email protected]
CFLAGS = @[email protected] @[email protected]
CPPFLAGS = @[email protected] [email protected]@ -I. @[email protected] @[email protected]
LDFLAGS = @[email protected] @[email protected]
LIBS = @[email protected]
INSTALL = @[email protected]
PACKAGE_VERSION = @[email protected]
prefix = @[email protected]
exec_prefix = @[email protected]
libdir = @[email protected]
TCL_PACKAGE_PATH = @[email protected]
VPATH = @[email protected]

all: @[email protected]

# The shared object target
[email protected]@: tls.o tlsBIO.o tlsIO.o tlsX509.o Makefile
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o [email protected]@ tls.o tlsBIO.o tlsIO.o tlsX509.o $(LIBS)

# The static target
[email protected]@: tls.o tlsBIO.o tlsIO.o tlsX509.o Makefile
	$(AR) rcu tls.o tlsBIO.o tlsIO.o tlsX509.o
	mv tcltls.a

# Dependencies for all our targets
tls.o: @[email protected]/tls.c @[email protected]/tlsInt.h @[email protected]/tclOpts.h tls.tcl.h dh_params.h Makefile
tlsBIO.o: @[email protected]/tlsBIO.c @[email protected]/tlsInt.h Makefile
tlsIO.o: @[email protected]/tlsIO.c @[email protected]/tlsInt.h Makefile
tlsX509.o: @[email protected]/tlsX509.c @[email protected]/tlsInt.h Makefile

# Create a C-source-ified version of the script resources
# for TclTLS so that we only need a single file to enable
# this extension
tls.tcl.h: @[email protected]/tls.tcl
	od -A n -v -t xC < '@[email protected]/tls.tcl' >
	sed '[email protected]  *@@g;[email protected]@0x&, @g' < >
	rm -f
	mv tls.tcl.h

# Create default DH parameters
dh_params.h: @[email protected]/gen_dh_params Makefile
	@[email protected]/gen_dh_params @[email protected] >
	mv dh_params.h

# Generic target for building files from the "srcdir"
# tree -- the default target will not match paths
	$(CC) $(CPPFLAGS) $(CFLAGS) -o "[email protected]" -c "$<"

# Install the extension
install: @[email protected] pkgIndex.tcl
	$(INSTALL) -t '$(DESTDIR)$(PACKAGE_INSTALL_DIR)' @[email protected] pkgIndex.tcl

# Test target, run the automated test suite
test: @[email protected]
	cd tests && @[email protected] all.tcl

# Clean the local build directory for rebuild against the same configuration
	rm -f tls.o tlsBIO.o tlsIO.o tlsX509.o
	rm -f [email protected]@
	rm -f [email protected]@.a [email protected]@.def
	rm -f tcltls.a
	rm -f
	@if [ '@[email protected]' != '.' ]; then echo rm -f tls.tcl.h; rm -f tls.tcl.h; fi

# Clean the local build directory back to what it was after unpacking the
# distribution tarball
distclean: clean
	rm -f config.log config.status
	rm -f dh_params.h
	rm -f Makefile pkgIndex.tcl
	rm -f tcltls.a.linkadd

# Clean the local build directory back to only thing things that exist in
# version control system
mrproper: distclean
	rm -f @[email protected]/configure @[email protected]/config.sub @[email protected]/config.guess @[email protected]/install-sh
	rm -f @[email protected]/aclocal.m4
	rm -rf @[email protected]/autom4te.cache
	rm -f @[email protected]/tls.tcl.h

.PHONY: all install clean distclean mrproper test