Hex Artifact Content

Artifact c94d145e50fdc862a6e0188848b13b6ebd3a3c1547caaaf1c73bedafd8ee37fb:


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 58 35 30 39 2e 6f 62  _DIR)\tlsX509.ob
04a0: 6a 0a 0a 23 20 44 65 66 69 6e 65 20 61 6e 79 20  j..# Define any 
04b0: 61 64 64 69 74 69 6f 6e 61 6c 20 70 72 6f 6a 65  additional proje
04c0: 63 74 20 69 6e 63 6c 75 64 65 20 66 6c 61 67 73  ct include flags
04d0: 0a 23 20 53 53 4c 5f 49 4e 53 54 41 4c 4c 5f 46  .# SSL_INSTALL_F
04e0: 4f 4c 44 45 52 20 3d 20 77 69 74 68 20 74 68 65  OLDER = with the
04f0: 20 4f 70 65 6e 53 53 4c 20 69 6e 73 74 61 6c 6c   OpenSSL install
0500: 61 74 69 6f 6e 20 66 6f 6c 64 65 72 20 66 6f 6c  ation folder fol
0510: 6c 6f 77 69 6e 67 2e 0a 50 52 4a 5f 49 4e 43 4c  lowing..PRJ_INCL
0520: 55 44 45 53 20 3d 20 2d 49 22 24 28 53 53 4c 5f  UDES = -I"$(SSL_
0530: 49 4e 53 54 41 4c 4c 5f 46 4f 4c 44 45 52 29 5c  INSTALL_FOLDER)\
0540: 69 6e 63 6c 75 64 65 22 20 2d 49 22 24 28 4f 50  include" -I"$(OP
0550: 45 4e 53 53 4c 5f 49 4e 53 54 41 4c 4c 5f 44 49  ENSSL_INSTALL_DI
0560: 52 29 5c 69 6e 63 6c 75 64 65 22 0a 0a 23 20 44  R)\include"..# D
0570: 65 66 69 6e 65 20 61 6e 79 20 61 64 64 69 74 69  efine any additi
0580: 6f 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 20 66 6c  onal compiler fl
0590: 61 67 73 20 74 68 61 74 20 6d 69 67 68 74 20 62  ags that might b
05a0: 65 20 72 65 71 75 69 72 65 64 20 66 6f 72 20 74  e required for t
05b0: 68 65 20 70 72 6f 6a 65 63 74 0a 50 52 4a 5f 44  he project.PRJ_D
05c0: 45 46 49 4e 45 53 20 3d 20 2d 44 20 4e 4f 5f 53  EFINES = -D NO_S
05d0: 53 4c 32 20 2d 44 20 4e 4f 5f 53 53 4c 33 20 2d  SL2 -D NO_SSL3 -
05e0: 44 20 5f 43 52 54 5f 53 45 43 55 52 45 5f 4e 4f  D _CRT_SECURE_NO
05f0: 5f 57 41 52 4e 49 4e 47 53 0a 0a 23 0a 23 20 53  _WARNINGS..#.# S
0600: 53 4c 20 4c 69 62 73 3a 0a 23 20 20 20 20 31 2e  SL Libs:.#    1.
0610: 20 24 7b 4c 49 42 43 52 59 50 54 4f 7d 2e 64 6c   ${LIBCRYPTO}.dl
0620: 6c 0a 23 20 20 20 20 32 2e 20 24 7b 4c 49 42 53  l.#    2. ${LIBS
0630: 53 4c 7d 2e 64 6c 6c 0a 23 20 57 68 65 72 65 20  SL}.dll.# Where 
0640: 4c 49 42 43 52 59 50 54 4f 20 28 23 31 2e 29 20  LIBCRYPTO (#1.) 
0650: 61 6e 64 20 4c 49 42 53 53 4c 20 28 23 32 2e 29  and LIBSSL (#2.)
0660: 20 61 72 65 20 64 65 66 69 6e 65 64 20 61 73 20   are defined as 
0670: 66 6f 6c 6c 6f 77 73 3a 0a 23 20 20 20 20 76 31  follows:.#    v1
0680: 2e 31 3a 20 6c 69 62 63 72 79 70 74 6f 2d 31 2e  .1: libcrypto-1.
0690: 31 2d 78 36 34 2e 64 6c 6c 20 61 6e 64 20 6c 69  1-x64.dll and li
06a0: 62 73 73 6c 2d 31 2e 31 2d 78 36 34 2e 64 6c 6c  bssl-1.1-x64.dll
06b0: 0a 23 20 20 20 20 76 33 3a 20 6c 69 62 63 72 79  .#    v3: libcry
06c0: 70 74 6f 2d 33 2d 78 36 34 2e 64 6c 6c 20 61 6e  pto-3-x64.dll an
06d0: 64 20 6c 69 62 73 73 6c 2d 33 2d 78 36 34 2e 64  d libssl-3-x64.d
06e0: 6c 6c 0a 23 20 4f 6e 20 2a 6e 69 78 20 6c 69 62  ll.# On *nix lib
06f0: 63 72 79 70 74 6f 2e 73 6f 2e 2a 20 61 6e 64 20  crypto.so.* and 
0700: 6c 69 62 73 73 6c 2e 73 6f 2e 2a 20 28 77 68 65  libssl.so.* (whe
0710: 72 65 20 73 75 66 66 69 78 20 69 73 20 61 20 76  re suffix is a v
0720: 65 72 73 69 6f 6e 20 69 6e 64 69 63 61 74 6f 72  ersion indicator
0730: 29 2e 0a 23 0a 50 52 4a 5f 4c 49 42 53 20 3d 20  )..#.PRJ_LIBS = 
0740: 5c 0a 09 22 24 28 53 53 4c 5f 49 4e 53 54 41 4c  \.."$(SSL_INSTAL
0750: 4c 5f 46 4f 4c 44 45 52 29 5c 6c 69 62 5c 6c 69  L_FOLDER)\lib\li
0760: 62 73 73 6c 2e 6c 69 62 22 20 5c 0a 09 22 24 28  bssl.lib" \.."$(
0770: 53 53 4c 5f 49 4e 53 54 41 4c 4c 5f 46 4f 4c 44  SSL_INSTALL_FOLD
0780: 45 52 29 5c 6c 69 62 5c 6c 69 62 63 72 79 70 74  ER)\lib\libcrypt
0790: 6f 2e 6c 69 62 22 20 5c 0a 09 57 53 32 5f 33 32  o.lib" \..WS2_32
07a0: 2e 4c 49 42 20 47 44 49 33 32 2e 4c 49 42 20 41  .LIB GDI32.LIB A
07b0: 44 56 41 50 49 33 32 2e 4c 49 42 20 43 52 59 50  DVAPI32.LIB CRYP
07c0: 54 33 32 2e 4c 49 42 20 55 53 45 52 33 32 2e 4c  T32.LIB USER32.L
07d0: 49 42 0a 0a 23 20 44 65 66 69 6e 65 20 74 68 65  IB..# Define the
07e0: 20 73 74 61 6e 64 61 72 64 20 74 61 72 67 65 74   standard target
07f0: 73 0a 21 69 6e 63 6c 75 64 65 20 22 74 61 72 67  s.!include "targ
0800: 65 74 73 2e 76 63 22 0a 0a 23 20 50 72 6f 6a 65  ets.vc"..# Proje
0810: 63 74 20 73 70 65 63 69 66 69 63 20 74 61 72 67  ct specific targ
0820: 65 74 73 0a 0a 61 6c 6c 3a 0a 0a 63 6c 65 61 6e  ets..all:..clean
0830: 3a 20 64 65 66 61 75 6c 74 2d 63 6c 65 61 6e 0a  : default-clean.
0840: 0a 23 20 57 65 20 6d 75 73 74 20 64 65 66 69 6e  .# We must defin
0850: 65 20 61 20 70 6b 67 69 6e 64 65 78 20 74 61 72  e a pkgindex tar
0860: 67 65 74 20 74 68 61 74 20 77 69 6c 6c 20 63 72  get that will cr
0870: 65 61 74 65 20 61 20 70 6b 67 49 6e 64 65 78 2e  eate a pkgIndex.
0880: 74 63 6c 0a 23 20 66 69 6c 65 20 69 6e 20 74 68  tcl.# file in th
0890: 65 20 24 28 4f 55 54 5f 44 49 52 29 20 64 69 72  e $(OUT_DIR) dir
08a0: 65 63 74 6f 72 79 2e 20 57 65 20 63 61 6e 20 6a  ectory. We can j
08b0: 75 73 74 20 72 65 64 69 72 65 63 74 20 74 6f 20  ust redirect to 
08c0: 74 68 65 0a 23 20 64 65 66 61 75 6c 74 2d 70 6b  the.# default-pk
08d0: 67 69 6e 64 65 78 20 74 61 72 67 65 74 20 66 6f  gindex target fo
08e0: 72 20 6f 75 72 20 73 61 6d 70 6c 65 20 65 78 74  r our sample ext
08f0: 65 6e 73 69 6f 6e 2e 0a 70 6b 67 69 6e 64 65 78  ension..pkgindex
0900: 3a 20 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64  : default-pkgind
0910: 65 78 0a 0a 23 20 54 68 65 20 64 65 66 61 75 6c  ex..# The defaul
0920: 74 20 69 6e 73 74 61 6c 6c 20 74 61 72 67 65 74  t install target
0930: 20 6f 6e 6c 79 20 69 6e 73 74 61 6c 6c 73 20 62   only installs b
0940: 69 6e 61 72 69 65 73 20 61 6e 64 20 73 63 72 69  inaries and scri
0950: 70 74 73 20 73 6f 20 61 64 64 0a 23 20 61 6e 20  pts so add.# an 
0960: 61 64 64 69 74 69 6f 6e 61 6c 20 74 61 72 67 65  additional targe
0970: 74 20 66 6f 72 20 6f 75 72 20 64 6f 63 75 6d 65  t for our docume
0980: 6e 74 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 74 68  ntation. Note th
0990: 69 73 20 2a 61 64 64 73 2a 20 61 20 74 61 72 67  is *adds* a targ
09a0: 65 74 0a 23 20 73 69 6e 63 65 20 6e 6f 20 63 6f  et.# since no co
09b0: 6d 6d 61 6e 64 73 20 61 72 65 20 6c 69 73 74 65  mmands are liste
09c0: 64 20 61 66 74 65 72 20 69 74 2e 20 54 68 65 20  d after it. The 
09d0: 6f 72 69 67 69 6e 61 6c 20 74 61 72 67 65 74 73  original targets
09e0: 20 66 6f 72 0a 23 20 69 6e 73 74 61 6c 6c 20 28   for.# install (
09f0: 66 72 6f 6d 20 74 61 72 67 65 74 73 2e 76 63 29  from targets.vc)
0a00: 20 77 69 6c 6c 20 72 65 6d 61 69 6e 2e 0a 69 6e   will remain..in
0a10: 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 70  stall: default-p
0a20: 6b 67 69 6e 64 65 78 2d 74 65 61 20 64 65 66 61  kgindex-tea defa
0a30: 75 6c 74 2d 69 6e 73 74 61 6c 6c 20 64 65 66 61  ult-install defa
0a40: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73  ult-install-docs
0a50: 2d 68 74 6d 6c 0a 0a 23 20 54 65 73 74 20 70 61  -html..# Test pa
0a60: 63 6b 61 67 65 0a 74 65 73 74 3a 20 64 65 66 61  ckage.test: defa
0a70: 75 6c 74 2d 74 65 73 74 0a                       ult-test.