3
# This file is a Makefile for the tls Tcl extension. If it has the name
4
# "Makefile.in" then it is a template for a Makefile; to generate the
5
# actual Makefile, run "./configure", which is a configuration script
6
# generated by the "autoconf" program (constructs like "@foo@" will get
7
# replaced in the actual Makefile.
9
# Copyright (c) 1999-2000 Ajuba Solutions.
10
# All rights reserved.
12
# See the file "license.terms" for information on usage and redistribution
13
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
# RCS: @(#) $Id: Makefile.in,v 1.19 2004/02/04 04:02:17 razzell Exp $
18
lib_BINARIES=$(tls_LIB_FILE)
19
BINARIES=$(lib_BINARIES)
21
#========================================================================
22
# Enumerate the names of the source files included in this package.
23
# This will be used when a dist target is added to the Makefile.
24
#========================================================================
26
tls_SOURCES = tls.c tlsIO.c tlsBIO.c \
29
SOURCES = $(tls_SOURCES)
31
tls_SCRIPT_FILES = tls.tcl
33
#========================================================================
34
# Enumerate the names of the object files included in this package.
35
# These objects are created and linked into the final library.
36
#========================================================================
38
tls_OBJECTS = tls.$(OBJEXT) tlsIO.$(OBJEXT) tlsBIO.$(OBJEXT) \
39
tlsX509.$(OBJEXT) fixstrtod.$(OBJEXT)
40
# strncasecmp.$(OBJEXT)
41
OBJECTS = $(tls_OBJECTS)
43
#========================================================================
44
# The substitution of "tls_LIB_FILE" into the variable name below
45
# allows us to refer to the objects for the library without knowing the name
46
# of the library in advance. It also lets us use the "$@" variable in
47
# the rule for building the library, so we can refer to both the list of
48
# objects and the library itself in a platform-independent manner.
49
#========================================================================
51
tls_LIB_FILE = @tls_LIB_FILE@
52
$(tls_LIB_FILE)_OBJECTS = $(tls_OBJECTS)
54
#========================================================================
55
# This is a list of header files to be installed
56
#========================================================================
61
#========================================================================
62
# Variables and AC_SUBST cases added for tls.
63
#========================================================================
66
SSL_LIB_DIR = @SSL_LIB_DIR@
67
SSL_INCLUDE_DIR = @SSL_INCLUDE_DIR@
68
SSL_INCLUDE_DIR_NATIVE = @SSL_INCLUDE_DIR_NATIVE@
69
SSL_INCLUDES = -I$(SSL_INCLUDE_DIR_NATIVE)
72
#========================================================================
73
# This is boilerplate from the sample tcl extension Makefile.in:
74
# Nothing of the variables below this line need to be changed. Please
75
# check the TARGETS section below to make sure the make targets are
77
#========================================================================
82
top_srcdir = @top_srcdir@
84
exec_prefix = @exec_prefix@
88
libexecdir = @libexecdir@
90
sysconfdir = @sysconfdir@
91
sharedstatedir = @sharedstatedir@
92
localstatedir = @localstatedir@
96
includedir = @includedir@
97
oldincludedir = /usr/include
102
pkgdatadir = $(datadir)/@PACKAGE@@VERSION@
103
pkglibdir = $(libdir)/@PACKAGE@@VERSION@
104
pkgincludedir = $(includedir)/@PACKAGE@@VERSION@
109
INSTALL_PROGRAM = @INSTALL_PROGRAM@
110
INSTALL_DATA = @INSTALL_DATA@
111
INSTALL_SCRIPT = @INSTALL_SCRIPT@
113
transform = @program_transform_name@
125
CFLAGS_DEBUG = @CFLAGS_DEBUG@
126
CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
127
CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
128
CLEANFILES = @CLEANFILES@
130
LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
131
LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
132
LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
133
MAKE_LIB = @MAKE_LIB@
134
MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
135
MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
138
SHLIB_CFLAGS = @SHLIB_CFLAGS@
139
SHLIB_LD = @SHLIB_LD@
140
SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
141
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
142
STLIB_LD = @STLIB_LD@
143
TCL_BIN_DIR = @TCL_BIN_DIR@
144
TCL_DEFS = @TCL_DEFS@
145
TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
146
TCL_LD_FLAGS = @TCL_LD_FLAGS@
147
TCL_LIBS = @TCL_LIBS@
148
TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
149
TCL_SRC_DIR = @TCL_SRC_DIR@
150
TCL_DBGX = @TCL_DBGX@
151
TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
152
TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
153
TCLSH_PROG = @TCLSH_PROG@
157
LDFLAGS = $(LDFLAGS_DEFAULT)
159
INCLUDES = @TCL_INCLUDES@ $(SSL_INCLUDES)
161
EXTRA_CFLAGS = $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS)
163
DEFS = @DEFS@ $(EXTRA_CFLAGS)
165
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
166
CONFIGDIR = @CONFIGDIR@
167
mkinstalldirs = $(SHELL) $(CONFIGDIR)/mkinstalldirs
170
CPPFLAGS = @CPPFLAGS@
174
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
176
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
178
#========================================================================
179
# Start of user-definable TARGETS section
180
#========================================================================
182
#========================================================================
183
# TEA TARGETS. Please note that the "libraries:" target refers to platform
184
# independent files, and the "binaries:" target inclues executable programs and
185
# platform-dependent libraries. Modify these targets so that they install
186
# the various pieces of your package. The make and install rules
187
# for the BINARIES that you specified above have already been done.
188
#========================================================================
190
all: binaries libraries doc
192
#========================================================================
193
# The binaries target builds executable programs, Windows .dll's, unix
194
# shared/static libraries, and any other platform-dependent files.
195
# The list of targets to build for "binaries:" is specified at the top
196
# of the Makefile, in the "BINARIES" variable.
197
#========================================================================
199
binaries: $(BINARIES)
201
libraries: $(tls_SCRIPT_FILES)
205
install: all install-binaries install-libraries install-doc
207
install-binaries: binaries install-lib-binaries install-bin-binaries
208
sed -e "s#\@RELPATH\@#$(RELPATH)#" \
209
-e "s#\@tls_LIB_FILE\@#$(tls_LIB_FILE)#" \
210
< $(srcdir)/pkgIndex.tcl.in > pkgIndex.tcl
211
$(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
213
#========================================================================
214
# This rule installs platform-independent files, such as header files.
215
#========================================================================
217
install-libraries: libraries
218
$(mkinstalldirs) $(includedir)
219
@echo "Installing header files in $(includedir)"
220
@for i in $(GENERIC_HDRS) ; do \
221
echo "Installing $$i" ; \
222
$(INSTALL_DATA) $$i $(includedir) ; \
224
$(INSTALL_DATA) $(srcdir)/tls.tcl $(pkglibdir)
226
#========================================================================
227
# Install documentation. Unix manpages should go in the $(mandir)
229
#========================================================================
232
# $(mkinstalldirs) $(mandir)/man1
233
# $(mkinstalldirs) $(mandir)/man3
234
# $(mkinstalldirs) $(mandir)/mann
235
# @echo "Installing documentation in $(mandir)"
236
# @for i in $(srcdir)/*.n; \
238
# echo "Installing $$i"; \
239
# rm -f $(mandir)/mann/$$i; \
240
# $(INSTALL_DATA) $$i $(mandir)/mann ; \
243
test: binaries libraries
244
sed -e "s#\@RELPATH\@#.#" -e "s#\@tls_LIB_FILE\@#$(tls_LIB_FILE)#" \
245
< $(srcdir)/pkgIndex.tcl.in > pkgIndex.tcl
246
LD_LIBRARY_PATH=$(BUILD_DIR):$(TCL_BIN_DIR):$(LD_LIBRARY_PATH) \
247
PATH="$(BUILD_DIR)":"$(TCL_BIN_DIR)":"$(PATH)" \
248
$(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
252
#========================================================================
253
# Enumerate the names of the object files included in this package.
254
# These objects are created and linked into the final library. In
255
# most cases these object files will correspond to the source files
258
# $(exampleA_LIB_FILE) should be listed as part of the BINARIES variable
259
# at the top of the Makefile. That will ensure that this target is built
260
# when you run "make binaries".
262
# You shouldn't need to modify this target, except to change the package
263
# name from "exampleA" to your package's name.
264
#========================================================================
266
$(tls_LIB_FILE): $(tls_OBJECTS)
267
-rm -f $(tls_LIB_FILE)
269
$(RANLIB) $(tls_LIB_FILE)
271
#========================================================================
272
# We need to enumerate the list of .c to .o lines here.
273
# Unfortunately, there does not seem to be any other way to do this
274
# in a Makefile-independent way. We can't use VPATH because it picks up
275
# object files that may be located in the source directory.
277
# In the following lines, $(srcdir) refers to the toplevel directory
278
# containing your extension. If your sources are in a subdirectory,
279
# you will have to modify the paths to reflect this:
281
# exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c
282
# $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@
283
#========================================================================
285
tls.$(OBJEXT): $(srcdir)/tls.c
286
$(COMPILE) -c `@CYGPATH@ $(srcdir)/tls.c` -o $@
288
tlsIO.$(OBJEXT): $(srcdir)/tlsIO.c
289
$(COMPILE) -c `@CYGPATH@ $(srcdir)/tlsIO.c` -o $@
291
tlsBIO.$(OBJEXT): $(srcdir)/tlsBIO.c
292
$(COMPILE) -c `@CYGPATH@ $(srcdir)/tlsBIO.c` -o $@
294
tlsX509.$(OBJEXT): $(srcdir)/tlsX509.c
295
$(COMPILE) -c `@CYGPATH@ $(srcdir)/tlsX509.c` -o $@
297
fixstrtod.$(OBJEXT): $(srcdir)/fixstrtod.c
298
$(COMPILE) -c `@CYGPATH@ $(srcdir)/fixstrtod.c` -o $@
300
strncasecmp.$(OBJEXT): $(srcdir)/strncasecmp.c
301
$(COMPILE) -c `@CYGPATH@ $(srcdir)/strncasecmp.c` -o $@
303
#========================================================================
304
# End of user-definable section
305
#========================================================================
307
#========================================================================
308
# Don't modify the file to clean here. Instead, set the "CLEANFILES"
309
# variable in configure.in
310
#========================================================================
313
-test -z "$(BINARIES)" || rm -f $(BINARIES)
314
-rm -f *.o core *.core
316
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
320
-rm -f Makefile $(CONFIG_CLEAN_FILES)
321
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
324
PKG_DIR = $(PACKAGE)$(VERSION)
327
COMPRESS = tar cvf - $(PKG_DIR) | $(COMPEXE) > $(PKG_DIR).tar.$(COMPEXT)
328
DIST_ROOT = /tmp/dist
329
DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
332
rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.$(COMPEXT)
334
dist: dist-clean $(srcdir)/configure
336
cp -p $(srcdir)/README.txt $(srcdir)/ChangeLog $(srcdir)/tls.htm \
337
$(srcdir)/configure $(srcdir)/configure.in \
338
$(srcdir)/Makefile.in $(srcdir)/*.c $(srcdir)/*.h \
339
$(srcdir)/pkgIndex.tcl.in $(srcdir)/license.terms \
340
$(srcdir)/aclocal.m4 $(srcdir)/tls.tcl \
343
mkdir $(DIST_DIR)/config
344
cp -p $(srcdir)/config/install-sh $(srcdir)/config/mkinstalldirs \
345
$(srcdir)/config/tcl.m4 \
348
mkdir $(DIST_DIR)/tests
349
cp -p $(srcdir)/tests/*.{tcl,test} $(DIST_DIR)/tests
351
mkdir $(DIST_DIR)/tests/certs
352
cp -p $(srcdir)/tests/certs/*.{pem,key,req,txt} $(DIST_DIR)/tests/certs
354
chmod 664 $(DIST_DIR)/Makefile.in
355
chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
356
chmod +x $(DIST_DIR)/config/install-sh
358
(cd $(DIST_ROOT); $(COMPRESS);)
360
#========================================================================
361
# Install binary object libraries. On Windows this includes both .dll and
362
# .lib files. Because the .lib files are not explicitly listed anywhere,
363
# we need to deduce their existence from the .dll file of the same name.
364
# Additionally, the .dll files go into the bin directory, but the .lib
365
# files go into the lib directory. On Unix platforms, all library files
366
# go into the lib directory. In addition, this will generate the pkgIndex.tcl
367
# file in the install location (assuming it can find a usable tclsh8.2 shell)
369
# You should not have to modify this target.
370
#========================================================================
372
install-lib-binaries: installdirs
373
@list='$(lib_BINARIES)'; for p in $$list; do \
374
if test -f $$p; then \
375
ext=`echo $$p|sed -e "s/.*\.//"`; \
376
if test "x$$ext" = "xdll"; then \
377
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
378
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
379
lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
380
if test -f $$lib; then \
381
echo " $(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib"; \
382
$(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib; \
385
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \
386
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \
390
@list='$(lib_BINARIES)'; for p in $$list; do \
391
if test -f $$p; then \
392
echo " $(RANLIB) $(DESTDIR)$(bindir)/$$p"; \
393
$(RANLIB) $(DESTDIR)$(bindir)/$$p; \
397
#========================================================================
398
# Install binary executables (e.g. .exe files)
400
# You should not have to modify this target.
401
#========================================================================
403
install-bin-binaries: installdirs
404
@list='$(bin_BINARIES)'; for p in $$list; do \
405
if test -f $$p; then \
406
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
407
$(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
411
.SUFFIXES: .c .o .obj
413
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
415
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
419
list='$(BINARIES)'; for p in $$list; do \
420
rm -f $(DESTDIR)$(libdir)/$$p; \
424
$(mkinstalldirs) $(DESTDIR)$(libdir)
425
$(mkinstalldirs) $(DESTDIR)$(bindir)
426
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
428
.PHONY: all binaries clean depend distclean doc install installdirs \
431
# Tell versions [3.59,3.63) of GNU make to not export all variables.
432
# Otherwise a system limit (for SysV at least) may be exceeded.