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

Artifact 500d902713f524be019c3a26f27cecd8dba6174107c312b9b26aeecf60265d60:


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]
PACKAGE_VERSION = @[email protected]
prefix = @[email protected]
exec_prefix = @[email protected]
libdir = @[email protected]
TCL_PACKAGE_PATH = @[email protected]
PACKAGE_INSTALL_DIR = $(TCL_PACKAGE_PATH)/tcltls$(PACKAGE_VERSION)
INSTALL = @[email protected]
INSTALL_PROGRAM = @[email protected]
INSTALL_DATA = @[email protected]
VPATH = @[email protected]

all: @[email protected]

@[email protected]: @[email protected]@[email protected]
	mv @[email protected]@[email protected] @[email protected]

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

# The static target
[email protected][email protected]: tls.o tlsBIO.o tlsIO.o tlsX509.o Makefile
	$(AR) rcu [email protected][email protected] tls.o tlsBIO.o tlsIO.o tlsX509.o
	-$(RANLIB) [email protected][email protected]

# 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
	$(CC) $(CPPFLAGS) $(CFLAGS) -o tls.o -c @[email protected]/tls.c

tlsBIO.o: @[email protected]/tlsBIO.c @[email protected]/tlsInt.h Makefile
	$(CC) $(CPPFLAGS) $(CFLAGS) -o tlsBIO.o -c @[email protected]/tlsBIO.c

tlsIO.o: @[email protected]/tlsIO.c @[email protected]/tlsInt.h Makefile
	$(CC) $(CPPFLAGS) $(CFLAGS) -o tlsIO.o -c @[email protected]/tlsIO.c

tlsX509.o: @[email protected]/tlsX509.c @[email protected]/tlsInt.h Makefile
	$(CC) $(CPPFLAGS) $(CFLAGS) -o tlsX509.o -c @[email protected]/tlsX509.c

# 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 Makefile
	od -A n -v -t xC < '@[email protected]/tls.tcl' > tls.tcl.h.new.1
	sed '[email protected][^0-9A-Fa-f]@@g;[email protected]@0x&, @g' < tls.tcl.h.new.1 > tls.tcl.h.new.2
	rm -f tls.tcl.h.new.1
	mv tls.tcl.h.new.2 tls.tcl.h

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

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

# A convienent helper to undo the installation just done
uninstall:
	rm -f '$(DESTDIR)$(PACKAGE_INSTALL_DIR)/@[email protected]'
	rm -f '$(DESTDIR)$(PACKAGE_INSTALL_DIR)/pkgIndex.tcl'
	-rmdir '$(DESTDIR)$(PACKAGE_INSTALL_DIR)'

# Test target, run the automated test suite
test: @[email protected]
	@[email protected] @[email protected]/tests/all.tcl $(TESTFLAGS) -load "lappend auto_path $(shell pwd)"

# Clean the local build directory for rebuild against the same configuration
clean:
	rm -f tls.o tlsBIO.o tlsIO.o tlsX509.o
	rm -f @[email protected] [email protected][email protected] [email protected][email protected]
	rm -f [email protected][email protected] [email protected][email protected]
	rm -f tls.tcl.h tls.tcl.h.new.1 tls.tcl.h.new.2

# 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.new dh_params.h
	rm -f Makefile pkgIndex.tcl
	rm -f tcltls.a.linkadd
	rm -f tcltls.syms

# 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

.PHONY: all install uninstall clean distclean mrproper test