Artifact
ac05bd257ac892b60b39e4ed6b984d6adcbbfdaaf80aad50473dc0c024734760:
0000: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d #---------------
0010: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 20 2d -------------- -
0040: 2a 2d 20 6d 61 6b 65 66 69 6c 65 20 2d 2a 2d 0a *- makefile -*-.
0050: 23 0a 23 20 4d 61 6b 65 66 69 6c 65 20 66 6f 72 #.# Makefile for
0060: 20 54 63 6c 54 4c 53 20 65 78 74 65 6e 73 69 6f TclTLS extensio
0070: 6e 73 2e 0a 23 0a 23 20 42 61 73 69 63 20 62 75 ns..#.# Basic bu
0080: 69 6c 64 2c 20 74 65 73 74 20 61 6e 64 20 69 6e ild, test and in
0090: 73 74 61 6c 6c 0a 23 20 20 20 6e 6d 61 6b 65 20 stall.# nmake
00a0: 2f 66 20 6d 61 6b 65 66 69 6c 65 2e 76 63 20 49 /f makefile.vc I
00b0: 4e 53 54 41 4c 4c 44 49 52 3d 63 3a 5c 70 61 74 NSTALLDIR=c:\pat
00c0: 68 5c 74 6f 5c 74 63 6c 0a 23 20 20 20 6e 6d 61 h\to\tcl.# nma
00d0: 6b 65 20 2f 66 20 6d 61 6b 65 66 69 6c 65 2e 76 ke /f makefile.v
00e0: 63 20 49 4e 53 54 41 4c 4c 44 49 52 3d 63 3a 5c c INSTALLDIR=c:\
00f0: 70 61 74 68 5c 74 6f 5c 74 63 6c 20 74 65 73 74 path\to\tcl test
0100: 0a 23 20 20 20 6e 6d 61 6b 65 20 2f 66 20 6d 61 .# nmake /f ma
0110: 6b 65 66 69 6c 65 2e 76 63 20 49 4e 53 54 41 4c kefile.vc INSTAL
0120: 4c 44 49 52 3d 63 3a 5c 70 61 74 68 5c 74 6f 5c LDIR=c:\path\to\
0130: 74 63 6c 20 69 6e 73 74 61 6c 6c 0a 23 0a 23 20 tcl install.#.#
0140: 46 6f 72 20 6f 74 68 65 72 20 62 75 69 6c 64 20 For other build
0150: 6f 70 74 69 6f 6e 73 20 28 64 65 62 75 67 2c 20 options (debug,
0160: 73 74 61 74 69 63 20 65 74 63 2e 29 2c 0a 23 20 static etc.),.#
0170: 53 65 65 20 54 49 50 20 34 37 37 20 28 68 74 74 See TIP 477 (htt
0180: 70 73 3a 2f 2f 63 6f 72 65 2e 74 63 6c 2d 6c 61 ps://core.tcl-la
0190: 6e 67 2e 6f 72 67 2f 74 69 70 73 2f 64 6f 63 2f ng.org/tips/doc/
01a0: 6d 61 69 6e 2f 74 69 70 2f 34 37 37 2e 6d 64 29 main/tip/477.md)
01b0: 20 66 6f 72 0a 23 20 64 65 74 61 69 6c 65 64 20 for.# detailed
01c0: 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 0a 23 documentation..#
01d0: 0a 23 20 53 65 65 20 74 68 65 20 66 69 6c 65 20 .# See the file
01e0: 22 6c 69 63 65 6e 73 65 2e 74 65 72 6d 73 22 20 "license.terms"
01f0: 66 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 for information
0200: 6f 6e 20 75 73 61 67 65 20 61 6e 64 20 72 65 64 on usage and red
0210: 69 73 74 72 69 62 75 74 69 6f 6e 0a 23 20 6f 66 istribution.# of
0220: 20 74 68 69 73 20 66 69 6c 65 2c 20 61 6e 64 20 this file, and
0230: 66 6f 72 20 61 20 44 49 53 43 4c 41 49 4d 45 52 for a DISCLAIMER
0240: 20 4f 46 20 41 4c 4c 20 57 41 52 52 41 4e 54 49 OF ALL WARRANTI
0250: 45 53 2e 0a 23 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d ES..#.#---------
0260: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0270: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0280: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0290: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
02a0: 2d 2d 2d 2d 2d 0a 0a 23 20 54 68 65 20 6e 61 6d -----..# The nam
02b0: 65 20 6f 66 20 74 68 65 20 70 61 63 6b 61 67 65 e of the package
02c0: 0a 50 52 4f 4a 45 43 54 3d 74 6c 73 0a 0a 21 69 .PROJECT=tls..!i
02d0: 6e 63 6c 75 64 65 20 22 72 75 6c 65 73 2d 65 78 nclude "rules-ex
02e0: 74 2e 76 63 22 0a 0a 23 20 44 65 66 69 6e 65 20 t.vc"..# Define
02f0: 74 68 65 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 the object files
0300: 20 61 6e 64 20 72 65 73 6f 75 72 63 65 20 66 69 and resource fi
0310: 6c 65 20 74 68 61 74 20 6d 61 6b 65 20 75 70 20 le that make up
0320: 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 2e 0a 23 the extension..#
0330: 20 4e 6f 74 65 20 74 68 65 20 72 65 73 6f 75 72 Note the resour
0340: 63 65 20 66 69 6c 65 20 64 6f 65 73 20 6e 6f 74 ce file does not
0350: 20 6d 61 6b 65 73 20 73 65 6e 73 65 20 69 66 20 makes sense if
0360: 64 6f 69 6e 67 20 61 20 73 74 61 74 69 63 20 6c doing a static l
0370: 69 62 72 61 72 79 20 62 75 69 6c 64 0a 23 20 68 ibrary build.# h
0380: 65 6e 63 65 20 69 74 20 69 73 20 75 6e 64 65 72 ence it is under
0390: 20 74 68 61 74 20 63 6f 6e 64 69 74 69 6f 6e 2e that condition.
03a0: 20 54 4d 50 5f 44 49 52 20 69 73 20 74 68 65 20 TMP_DIR is the
03b0: 6f 75 74 70 75 74 20 64 69 72 65 63 74 6f 72 79 output directory
03c0: 0a 23 20 64 65 66 69 6e 65 64 20 62 79 20 72 75 .# defined by ru
03d0: 6c 65 73 20 66 6f 72 20 6f 62 6a 65 63 74 20 66 les for object f
03e0: 69 6c 65 73 2e 0a 50 52 4a 5f 4f 42 4a 53 20 3d iles..PRJ_OBJS =
03f0: 20 24 28 54 4d 50 5f 44 49 52 29 5c 74 6c 73 2e $(TMP_DIR)\tls.
0400: 6f 62 6a 20 5c 0a 09 24 28 54 4d 50 5f 44 49 52 obj \..$(TMP_DIR
0410: 29 5c 74 6c 73 42 49 4f 2e 6f 62 6a 20 5c 0a 09 )\tlsBIO.obj \..
0420: 24 28 54 4d 50 5f 44 49 52 29 5c 74 6c 73 44 69 $(TMP_DIR)\tlsDi
0430: 67 65 73 74 2e 6f 62 6a 20 5c 0a 09 24 28 54 4d gest.obj \..$(TM
0440: 50 5f 44 49 52 29 5c 74 6c 73 45 6e 63 72 79 70 P_DIR)\tlsEncryp
0450: 74 2e 6f 62 6a 20 5c 0a 09 24 28 54 4d 50 5f 44 t.obj \..$(TMP_D
0460: 49 52 29 5c 74 6c 73 49 6e 66 6f 2e 6f 62 6a 20 IR)\tlsInfo.obj
0470: 5c 0a 09 24 28 54 4d 50 5f 44 49 52 29 5c 74 6c \..$(TMP_DIR)\tl
0480: 73 49 4f 2e 6f 62 6a 20 5c 0a 09 24 28 54 4d 50 sIO.obj \..$(TMP
0490: 5f 44 49 52 29 5c 74 6c 73 4b 65 79 2e 6f 62 6a _DIR)\tlsKey.obj
04a0: 20 5c 0a 09 24 28 54 4d 50 5f 44 49 52 29 5c 74 \..$(TMP_DIR)\t
04b0: 6c 73 58 35 30 39 2e 6f 62 6a 0a 0a 23 20 44 65 lsX509.obj..# De
04c0: 66 69 6e 65 20 61 6e 79 20 61 64 64 69 74 69 6f fine any additio
04d0: 6e 61 6c 20 70 72 6f 6a 65 63 74 20 69 6e 63 6c nal project incl
04e0: 75 64 65 20 66 6c 61 67 73 0a 23 20 53 53 4c 5f ude flags.# SSL_
04f0: 49 4e 53 54 41 4c 4c 5f 46 4f 4c 44 45 52 20 3d INSTALL_FOLDER =
0500: 20 77 69 74 68 20 74 68 65 20 4f 70 65 6e 53 53 with the OpenSS
0510: 4c 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 L installation f
0520: 6f 6c 64 65 72 20 66 6f 6c 6c 6f 77 69 6e 67 2e older following.
0530: 0a 50 52 4a 5f 49 4e 43 4c 55 44 45 53 20 3d 20 .PRJ_INCLUDES =
0540: 2d 49 22 24 28 53 53 4c 5f 49 4e 53 54 41 4c 4c -I"$(SSL_INSTALL
0550: 5f 46 4f 4c 44 45 52 29 5c 69 6e 63 6c 75 64 65 _FOLDER)\include
0560: 22 20 2d 49 22 24 28 4f 50 45 4e 53 53 4c 5f 49 " -I"$(OPENSSL_I
0570: 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 69 6e 63 6c NSTALL_DIR)\incl
0580: 75 64 65 22 0a 0a 23 20 44 65 66 69 6e 65 20 61 ude"..# Define a
0590: 6e 79 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f ny additional co
05a0: 6d 70 69 6c 65 72 20 66 6c 61 67 73 20 74 68 61 mpiler flags tha
05b0: 74 20 6d 69 67 68 74 20 62 65 20 72 65 71 75 69 t might be requi
05c0: 72 65 64 20 66 6f 72 20 74 68 65 20 70 72 6f 6a red for the proj
05d0: 65 63 74 0a 50 52 4a 5f 44 45 46 49 4e 45 53 20 ect.PRJ_DEFINES
05e0: 3d 20 2d 44 20 4e 4f 5f 53 53 4c 32 20 2d 44 20 = -D NO_SSL2 -D
05f0: 4e 4f 5f 53 53 4c 33 20 2d 44 20 5f 43 52 54 5f NO_SSL3 -D _CRT_
0600: 53 45 43 55 52 45 5f 4e 4f 5f 57 41 52 4e 49 4e SECURE_NO_WARNIN
0610: 47 53 0a 0a 23 0a 23 20 53 53 4c 20 4c 69 62 73 GS..#.# SSL Libs
0620: 3a 0a 23 20 20 20 20 31 2e 20 24 7b 4c 49 42 43 :.# 1. ${LIBC
0630: 52 59 50 54 4f 7d 2e 64 6c 6c 0a 23 20 20 20 20 RYPTO}.dll.#
0640: 32 2e 20 24 7b 4c 49 42 53 53 4c 7d 2e 64 6c 6c 2. ${LIBSSL}.dll
0650: 0a 23 20 57 68 65 72 65 20 4c 49 42 43 52 59 50 .# Where LIBCRYP
0660: 54 4f 20 28 23 31 2e 29 20 61 6e 64 20 4c 49 42 TO (#1.) and LIB
0670: 53 53 4c 20 28 23 32 2e 29 20 61 72 65 20 64 65 SSL (#2.) are de
0680: 66 69 6e 65 64 20 61 73 20 66 6f 6c 6c 6f 77 73 fined as follows
0690: 3a 0a 23 20 20 20 20 76 31 2e 31 3a 20 6c 69 62 :.# v1.1: lib
06a0: 63 72 79 70 74 6f 2d 31 2e 31 2d 78 36 34 2e 64 crypto-1.1-x64.d
06b0: 6c 6c 20 61 6e 64 20 6c 69 62 73 73 6c 2d 31 2e ll and libssl-1.
06c0: 31 2d 78 36 34 2e 64 6c 6c 0a 23 20 20 20 20 76 1-x64.dll.# v
06d0: 33 3a 20 6c 69 62 63 72 79 70 74 6f 2d 33 2d 78 3: libcrypto-3-x
06e0: 36 34 2e 64 6c 6c 20 61 6e 64 20 6c 69 62 73 73 64.dll and libss
06f0: 6c 2d 33 2d 78 36 34 2e 64 6c 6c 0a 23 20 4f 6e l-3-x64.dll.# On
0700: 20 2a 6e 69 78 20 6c 69 62 63 72 79 70 74 6f 2e *nix libcrypto.
0710: 73 6f 2e 2a 20 61 6e 64 20 6c 69 62 73 73 6c 2e so.* and libssl.
0720: 73 6f 2e 2a 20 28 77 68 65 72 65 20 73 75 66 66 so.* (where suff
0730: 69 78 20 69 73 20 61 20 76 65 72 73 69 6f 6e 20 ix is a version
0740: 69 6e 64 69 63 61 74 6f 72 29 2e 0a 23 0a 50 52 indicator)..#.PR
0750: 4a 5f 4c 49 42 53 20 3d 20 5c 0a 09 22 24 28 53 J_LIBS = \.."$(S
0760: 53 4c 5f 49 4e 53 54 41 4c 4c 5f 46 4f 4c 44 45 SL_INSTALL_FOLDE
0770: 52 29 5c 6c 69 62 5c 6c 69 62 73 73 6c 2e 6c 69 R)\lib\libssl.li
0780: 62 22 20 5c 0a 09 22 24 28 53 53 4c 5f 49 4e 53 b" \.."$(SSL_INS
0790: 54 41 4c 4c 5f 46 4f 4c 44 45 52 29 5c 6c 69 62 TALL_FOLDER)\lib
07a0: 5c 6c 69 62 63 72 79 70 74 6f 2e 6c 69 62 22 20 \libcrypto.lib"
07b0: 5c 0a 09 57 53 32 5f 33 32 2e 4c 49 42 20 47 44 \..WS2_32.LIB GD
07c0: 49 33 32 2e 4c 49 42 20 41 44 56 41 50 49 33 32 I32.LIB ADVAPI32
07d0: 2e 4c 49 42 20 43 52 59 50 54 33 32 2e 4c 49 42 .LIB CRYPT32.LIB
07e0: 20 55 53 45 52 33 32 2e 4c 49 42 0a 0a 23 20 44 USER32.LIB..# D
07f0: 65 66 69 6e 65 20 74 68 65 20 73 74 61 6e 64 61 efine the standa
0800: 72 64 20 74 61 72 67 65 74 73 0a 21 69 6e 63 6c rd targets.!incl
0810: 75 64 65 20 22 74 61 72 67 65 74 73 2e 76 63 22 ude "targets.vc"
0820: 0a 0a 23 20 50 72 6f 6a 65 63 74 20 73 70 65 63 ..# Project spec
0830: 69 66 69 63 20 74 61 72 67 65 74 73 0a 0a 61 6c ific targets..al
0840: 6c 3a 0a 0a 63 6c 65 61 6e 3a 20 64 65 66 61 75 l:..clean: defau
0850: 6c 74 2d 63 6c 65 61 6e 0a 0a 23 20 57 65 20 6d lt-clean..# We m
0860: 75 73 74 20 64 65 66 69 6e 65 20 61 20 70 6b 67 ust define a pkg
0870: 69 6e 64 65 78 20 74 61 72 67 65 74 20 74 68 61 index target tha
0880: 74 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 20 t will create a
0890: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 23 20 66 pkgIndex.tcl.# f
08a0: 69 6c 65 20 69 6e 20 74 68 65 20 24 28 4f 55 54 ile in the $(OUT
08b0: 5f 44 49 52 29 20 64 69 72 65 63 74 6f 72 79 2e _DIR) directory.
08c0: 20 57 65 20 63 61 6e 20 6a 75 73 74 20 72 65 64 We can just red
08d0: 69 72 65 63 74 20 74 6f 20 74 68 65 0a 23 20 64 irect to the.# d
08e0: 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 78 20 efault-pkgindex
08f0: 74 61 72 67 65 74 20 66 6f 72 20 6f 75 72 20 73 target for our s
0900: 61 6d 70 6c 65 20 65 78 74 65 6e 73 69 6f 6e 2e ample extension.
0910: 0a 70 6b 67 69 6e 64 65 78 3a 20 64 65 66 61 75 .pkgindex: defau
0920: 6c 74 2d 70 6b 67 69 6e 64 65 78 0a 0a 23 20 54 lt-pkgindex..# T
0930: 68 65 20 64 65 66 61 75 6c 74 20 69 6e 73 74 61 he default insta
0940: 6c 6c 20 74 61 72 67 65 74 20 6f 6e 6c 79 20 69 ll target only i
0950: 6e 73 74 61 6c 6c 73 20 62 69 6e 61 72 69 65 73 nstalls binaries
0960: 20 61 6e 64 20 73 63 72 69 70 74 73 20 73 6f 20 and scripts so
0970: 61 64 64 0a 23 20 61 6e 20 61 64 64 69 74 69 6f add.# an additio
0980: 6e 61 6c 20 74 61 72 67 65 74 20 66 6f 72 20 6f nal target for o
0990: 75 72 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e ur documentation
09a0: 2e 20 4e 6f 74 65 20 74 68 69 73 20 2a 61 64 64 . Note this *add
09b0: 73 2a 20 61 20 74 61 72 67 65 74 0a 23 20 73 69 s* a target.# si
09c0: 6e 63 65 20 6e 6f 20 63 6f 6d 6d 61 6e 64 73 20 nce no commands
09d0: 61 72 65 20 6c 69 73 74 65 64 20 61 66 74 65 72 are listed after
09e0: 20 69 74 2e 20 54 68 65 20 6f 72 69 67 69 6e 61 it. The origina
09f0: 6c 20 74 61 72 67 65 74 73 20 66 6f 72 0a 23 20 l targets for.#
0a00: 69 6e 73 74 61 6c 6c 20 28 66 72 6f 6d 20 74 61 install (from ta
0a10: 72 67 65 74 73 2e 76 63 29 20 77 69 6c 6c 20 72 rgets.vc) will r
0a20: 65 6d 61 69 6e 2e 0a 69 6e 73 74 61 6c 6c 3a 20 emain..install:
0a30: 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 78 default-pkgindex
0a40: 2d 74 65 61 20 64 65 66 61 75 6c 74 2d 69 6e 73 -tea default-ins
0a50: 74 61 6c 6c 20 64 65 66 61 75 6c 74 2d 69 6e 73 tall default-ins
0a60: 74 61 6c 6c 2d 64 6f 63 73 2d 68 74 6d 6c 0a 0a tall-docs-html..
0a70: 23 20 54 65 73 74 20 70 61 63 6b 61 67 65 0a 74 # Test package.t
0a80: 65 73 74 3a 20 64 65 66 61 75 6c 74 2d 74 65 73 est: default-tes
0a90: 74 0a t.