Fossil

Hex Artifact Content
Login

Artifact dcfafb1ac4d823af55ac01e5f6f7c541284026497cd1286d5d0a8a2061bd8d29:


0000: 23 21 2f 75 73 72 2f 62 69 6e 2f 74 63 6c 73 68  #!/usr/bin/tclsh
0010: 0a 23 0a 23 20 20 20 20 23 23 23 20 52 75 6e 20  .#.#    ### Run 
0020: 74 68 69 73 20 54 63 6c 20 73 63 72 69 70 74 20  this Tcl script 
0030: 45 56 45 52 59 20 74 69 6d 65 20 79 6f 75 20 6d  EVERY time you m
0040: 6f 64 69 66 79 20 69 74 20 69 6e 20 61 6e 79 20  odify it in any 
0050: 77 61 79 21 20 23 23 23 0a 23 0a 23 20 54 68 69  way! ###.#.# Thi
0060: 73 20 54 63 6c 20 73 63 72 69 70 74 20 67 65 6e  s Tcl script gen
0070: 65 72 61 74 65 73 20 6d 61 6b 65 20 66 69 6c 65  erates make file
0080: 73 20 66 6f 72 20 76 61 72 69 6f 75 73 20 70 6c  s for various pl
0090: 61 74 66 6f 72 6d 73 2e 20 54 68 65 20 6d 61 6b  atforms. The mak
00a0: 65 66 69 6c 65 73 0a 23 20 74 68 65 6e 20 6e 65  efiles.# then ne
00b0: 65 64 20 74 6f 20 62 65 20 63 6f 6d 6d 69 74 74  ed to be committ
00c0: 65 64 2e 0a 23 0a 23 20 49 66 20 79 6f 75 20 6d  ed..#.# If you m
00d0: 6f 64 69 66 79 20 74 68 69 73 20 66 69 6c 65 20  odify this file 
00e0: 74 68 65 6e 3a 0a 23 0a 23 20 20 20 20 20 31 2e  then:.#.#     1.
00f0: 20 63 64 20 73 72 63 3b 20 74 63 6c 73 68 20 6d   cd src; tclsh m
0100: 61 6b 65 6d 61 6b 65 2e 74 63 6c 0a 23 0a 23 20  akemake.tcl.#.# 
0110: 20 20 20 20 32 2e 20 69 66 20 65 72 72 6f 72 73      2. if errors
0120: 20 61 72 65 20 72 65 70 6f 72 74 65 64 2c 20 66   are reported, f
0130: 69 78 20 74 68 65 6d 20 61 6e 64 20 67 6f 20 74  ix them and go t
0140: 6f 20 73 74 65 70 20 31 0a 23 0a 23 20 20 20 20  o step 1.#.#    
0150: 20 33 2e 20 69 66 20 22 66 6f 73 73 69 6c 20 64   3. if "fossil d
0160: 69 66 66 22 20 72 65 70 6f 72 74 73 20 63 68 61  iff" reports cha
0170: 6e 67 65 73 20 69 6e 20 61 6e 79 20 6f 66 20 74  nges in any of t
0180: 68 65 20 67 65 6e 65 72 61 74 65 64 0a 23 20 20  he generated.#  
0190: 20 20 20 20 20 20 66 69 6c 65 73 2c 20 63 6f 6d        files, com
01a0: 6d 69 74 20 74 68 65 20 63 68 61 6e 67 65 64 20  mit the changed 
01b0: 66 69 6c 65 73 20 74 6f 20 74 68 65 20 72 65 70  files to the rep
01c0: 6f 0a 23 0a 23 20 46 69 6c 65 73 20 67 65 6e 65  o.#.# Files gene
01d0: 72 61 74 65 64 20 69 6e 63 6c 75 64 65 3a 0a 23  rated include:.#
01e0: 0a 23 20 20 20 20 20 73 72 63 2f 6d 61 69 6e 2e  .#     src/main.
01f0: 6d 6b 20 20 20 20 20 20 20 20 20 20 20 23 20 6d  mk           # m
0200: 61 6b 65 66 69 6c 65 20 66 6f 72 20 61 6c 6c 20  akefile for all 
0210: 75 6e 69 78 20 73 79 73 74 65 6d 73 0a 23 20 20  unix systems.#  
0220: 20 20 20 77 69 6e 2f 4d 61 6b 65 66 69 6c 65 2e     win/Makefile.
0230: 6d 69 6e 67 77 20 20 20 20 23 20 6d 61 6b 65 66  mingw    # makef
0240: 69 6c 65 20 66 6f 72 20 6d 69 6e 67 77 20 6f 6e  ile for mingw on
0250: 20 77 69 6e 64 6f 77 73 0a 23 20 20 20 20 20 77   windows.#     w
0260: 69 6e 2f 4d 61 6b 65 66 69 6c 65 2e 2a 20 20 20  in/Makefile.*   
0270: 20 20 20 20 20 23 20 6d 61 6b 65 66 69 6c 65 73       # makefiles
0280: 20 66 6f 72 20 6f 74 68 65 72 20 77 69 6e 64 6f   for other windo
0290: 77 73 20 63 6f 6d 70 69 6c 65 72 73 0a 23 0a 23  ws compilers.#.#
02a0: 20 41 64 64 20 6e 65 77 20 73 6f 75 72 63 65 20   Add new source 
02b0: 66 69 6c 65 73 20 62 79 20 6c 69 73 74 69 6e 67  files by listing
02c0: 20 74 68 65 20 66 69 6c 65 73 20 28 77 69 74 68   the files (with
02d0: 6f 75 74 20 74 68 65 69 72 20 2e 63 20 73 75 66  out their .c suf
02e0: 66 69 78 29 0a 23 20 69 6e 20 74 68 65 20 22 73  fix).# in the "s
02f0: 72 63 22 20 76 61 72 69 61 62 6c 65 2e 20 20 41  rc" variable.  A
0300: 64 64 20 6e 65 77 20 72 65 73 6f 75 72 63 65 20  dd new resource 
0310: 66 69 6c 65 73 20 74 6f 20 74 68 65 20 22 65 78  files to the "ex
0320: 74 72 61 5f 66 69 6c 65 73 22 0a 23 20 76 61 72  tra_files".# var
0330: 69 61 62 6c 65 2e 20 20 54 68 65 72 65 20 61 72  iable.  There ar
0340: 65 20 6f 74 68 65 72 20 76 61 72 69 61 62 6c 65  e other variable
0350: 73 20 74 68 61 74 20 79 6f 75 20 63 61 6e 20 61  s that you can a
0360: 6c 74 65 72 2c 20 64 6f 77 6e 20 74 6f 0a 23 20  lter, down to.# 
0370: 74 68 65 20 22 53 54 4f 50 20 48 45 52 45 22 20  the "STOP HERE" 
0380: 63 6f 6d 6d 65 6e 74 2e 20 20 54 68 65 20 73 74  comment.  The st
0390: 75 66 66 20 62 65 6c 6f 77 20 22 53 54 4f 50 20  uff below "STOP 
03a0: 48 45 52 45 22 20 73 68 6f 75 6c 64 20 72 61 72  HERE" should rar
03b0: 65 6c 79 20 6e 65 65 64 0a 23 20 74 6f 20 63 68  ely need.# to ch
03c0: 61 6e 67 65 2e 20 41 66 74 65 72 20 6d 6f 64 69  ange. After modi
03d0: 66 69 63 61 74 69 6f 6e 2c 20 67 6f 20 74 6f 20  fication, go to 
03e0: 73 74 65 70 20 31 20 61 62 6f 76 65 2e 0a 23 0a  step 1 above..#.
03f0: 23 20 44 65 6c 65 74 65 20 75 6e 75 73 65 64 20  # Delete unused 
0400: 73 6f 75 72 63 65 20 66 69 6c 65 73 20 69 6e 20  source files in 
0410: 74 68 65 20 22 73 72 63 22 20 76 61 72 69 61 62  the "src" variab
0420: 6c 65 2c 20 74 68 65 6e 20 67 6f 20 74 6f 20 73  le, then go to s
0430: 74 65 70 20 31 20 61 62 6f 76 65 2e 0a 23 0a 23  tep 1 above..#.#
0440: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0450: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0460: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0470: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0480: 23 23 23 23 23 23 23 23 23 23 23 23 0a 0a 23 20  ############..# 
0490: 42 61 73 65 6e 61 6d 65 73 20 6f 66 20 61 6c 6c  Basenames of all
04a0: 20 73 6f 75 72 63 65 20 66 69 6c 65 73 20 74 68   source files th
04b0: 61 74 20 67 65 74 20 70 72 65 70 72 6f 63 65 73  at get preproces
04c0: 73 65 64 20 75 73 69 6e 67 0a 23 20 22 74 72 61  sed using.# "tra
04d0: 6e 73 6c 61 74 65 22 20 61 6e 64 20 22 6d 61 6b  nslate" and "mak
04e0: 65 68 65 61 64 65 72 73 22 2e 20 20 54 6f 20 61  eheaders".  To a
04f0: 64 64 20 6e 65 77 20 43 2d 6c 61 6e 67 75 61 67  dd new C-languag
0500: 65 20 73 6f 75 72 63 65 20 66 69 6c 65 73 20 74  e source files t
0510: 6f 20 74 68 65 0a 23 20 70 72 6f 6a 65 63 74 2c  o the.# project,
0520: 20 73 69 6d 70 6c 79 20 61 64 64 20 74 68 65 20   simply add the 
0530: 62 61 73 65 6e 61 6d 65 20 74 6f 20 74 68 69 73  basename to this
0540: 20 6c 69 73 74 20 61 6e 64 20 72 65 72 75 6e 20   list and rerun 
0550: 74 68 69 73 20 73 63 72 69 70 74 2e 0a 23 0a 23  this script..#.#
0560: 20 53 65 74 20 74 68 65 20 73 65 70 61 72 61 74   Set the separat
0570: 65 20 65 78 74 72 61 5f 66 69 6c 65 73 20 76 61  e extra_files va
0580: 72 69 61 62 6c 65 20 66 75 72 74 68 65 72 20 64  riable further d
0590: 6f 77 6e 20 66 6f 72 20 68 6f 77 20 74 6f 20 61  own for how to a
05a0: 64 64 20 6e 6f 6e 2d 43 0a 23 20 66 69 6c 65 73  dd non-C.# files
05b0: 2c 20 73 75 63 68 20 61 73 20 73 74 72 69 6e 67  , such as string
05c0: 20 61 6e 64 20 42 4c 4f 42 20 72 65 73 6f 75 72   and BLOB resour
05d0: 63 65 73 2e 0a 23 0a 73 65 74 20 73 72 63 20 7b  ces..#.set src {
05e0: 0a 20 20 61 64 64 0a 20 20 61 6a 61 78 0a 20 20  .  add.  ajax.  
05f0: 61 6c 65 72 74 73 0a 20 20 61 6c 6c 72 65 70 6f  alerts.  allrepo
0600: 0a 20 20 61 74 74 61 63 68 0a 20 20 62 61 63 6b  .  attach.  back
0610: 6c 69 6e 6b 0a 20 20 62 61 63 6b 6f 66 66 69 63  link.  backoffic
0620: 65 0a 20 20 62 61 67 0a 20 20 62 69 73 65 63 74  e.  bag.  bisect
0630: 0a 20 20 62 6c 6f 62 0a 20 20 62 72 61 6e 63 68  .  blob.  branch
0640: 0a 20 20 62 72 6f 77 73 65 0a 20 20 62 75 69 6c  .  browse.  buil
0650: 74 69 6e 0a 20 20 62 75 6e 64 6c 65 0a 20 20 63  tin.  bundle.  c
0660: 61 63 68 65 0a 20 20 63 61 70 61 62 69 6c 69 74  ache.  capabilit
0670: 69 65 73 0a 20 20 63 61 70 74 63 68 61 0a 20 20  ies.  captcha.  
0680: 63 67 69 0a 20 20 63 68 61 74 0a 20 20 63 68 65  cgi.  chat.  che
0690: 63 6b 69 6e 0a 20 20 63 68 65 63 6b 6f 75 74 0a  ckin.  checkout.
06a0: 20 20 63 6c 65 61 72 73 69 67 6e 0a 20 20 63 6c    clearsign.  cl
06b0: 6f 6e 65 0a 20 20 63 6f 6c 6f 72 0a 20 20 63 6f  one.  color.  co
06c0: 6d 66 6f 72 6d 61 74 0a 20 20 63 6f 6e 66 69 67  mformat.  config
06d0: 75 72 65 0a 20 20 63 6f 6e 74 65 6e 74 0a 20 20  ure.  content.  
06e0: 63 6f 6f 6b 69 65 73 0a 20 20 64 62 0a 20 20 64  cookies.  db.  d
06f0: 65 6c 74 61 0a 20 20 64 65 6c 74 61 63 6d 64 0a  elta.  deltacmd.
0700: 20 20 64 65 6c 74 61 66 75 6e 63 0a 20 20 64 65    deltafunc.  de
0710: 73 63 65 6e 64 61 6e 74 73 0a 20 20 64 69 66 66  scendants.  diff
0720: 0a 20 20 64 69 66 66 63 6d 64 0a 20 20 64 69 73  .  diffcmd.  dis
0730: 70 61 74 63 68 0a 20 20 64 6f 63 0a 20 20 65 6e  patch.  doc.  en
0740: 63 6f 64 65 0a 20 20 65 74 61 67 0a 20 20 65 76  code.  etag.  ev
0750: 65 6e 74 0a 20 20 65 78 74 63 67 69 0a 20 20 65  ent.  extcgi.  e
0760: 78 70 6f 72 74 0a 20 20 66 69 6c 65 0a 20 20 66  xport.  file.  f
0770: 69 6c 65 65 64 69 74 0a 20 20 66 69 6e 66 6f 0a  ileedit.  finfo.
0780: 20 20 66 6f 63 69 0a 20 20 66 6f 72 75 6d 0a 20    foci.  forum. 
0790: 20 66 73 68 65 6c 6c 0a 20 20 66 75 73 65 66 73   fshell.  fusefs
07a0: 0a 20 20 66 75 7a 7a 0a 20 20 67 6c 6f 62 0a 20  .  fuzz.  glob. 
07b0: 20 67 72 61 70 68 0a 20 20 67 7a 69 70 0a 20 20   graph.  gzip.  
07c0: 68 6e 61 6d 65 0a 20 20 68 6f 6f 6b 0a 20 20 68  hname.  hook.  h
07d0: 74 74 70 0a 20 20 68 74 74 70 5f 73 6f 63 6b 65  ttp.  http_socke
07e0: 74 0a 20 20 68 74 74 70 5f 74 72 61 6e 73 70 6f  t.  http_transpo
07f0: 72 74 0a 20 20 69 6d 70 6f 72 74 0a 20 20 69 6e  rt.  import.  in
0800: 66 6f 0a 20 20 69 6e 74 65 72 77 69 6b 69 0a 20  fo.  interwiki. 
0810: 20 6a 73 6f 6e 0a 20 20 6a 73 6f 6e 5f 61 72 74   json.  json_art
0820: 69 66 61 63 74 0a 20 20 6a 73 6f 6e 5f 62 72 61  ifact.  json_bra
0830: 6e 63 68 0a 20 20 6a 73 6f 6e 5f 63 6f 6e 66 69  nch.  json_confi
0840: 67 0a 20 20 6a 73 6f 6e 5f 64 69 66 66 0a 20 20  g.  json_diff.  
0850: 6a 73 6f 6e 5f 64 69 72 0a 20 20 6a 73 6f 6e 5f  json_dir.  json_
0860: 66 69 6e 66 6f 0a 20 20 6a 73 6f 6e 5f 6c 6f 67  finfo.  json_log
0870: 69 6e 0a 20 20 6a 73 6f 6e 5f 71 75 65 72 79 0a  in.  json_query.
0880: 20 20 6a 73 6f 6e 5f 72 65 70 6f 72 74 0a 20 20    json_report.  
0890: 6a 73 6f 6e 5f 73 74 61 74 75 73 0a 20 20 6a 73  json_status.  js
08a0: 6f 6e 5f 74 61 67 0a 20 20 6a 73 6f 6e 5f 74 69  on_tag.  json_ti
08b0: 6d 65 6c 69 6e 65 0a 20 20 6a 73 6f 6e 5f 75 73  meline.  json_us
08c0: 65 72 0a 20 20 6a 73 6f 6e 5f 77 69 6b 69 0a 20  er.  json_wiki. 
08d0: 20 6c 65 61 66 0a 20 20 6c 6f 61 64 63 74 72 6c   leaf.  loadctrl
08e0: 0a 20 20 6c 6f 67 69 6e 0a 20 20 6c 6f 6f 6b 73  .  login.  looks
08f0: 6c 69 6b 65 0a 20 20 6d 61 69 6e 0a 20 20 6d 61  like.  main.  ma
0900: 6e 69 66 65 73 74 0a 20 20 6d 61 72 6b 64 6f 77  nifest.  markdow
0910: 6e 0a 20 20 6d 61 72 6b 64 6f 77 6e 5f 68 74 6d  n.  markdown_htm
0920: 6c 0a 20 20 6d 64 35 0a 20 20 6d 65 72 67 65 0a  l.  md5.  merge.
0930: 20 20 6d 65 72 67 65 33 0a 20 20 6d 6f 64 65 72    merge3.  moder
0940: 61 74 65 0a 20 20 6e 61 6d 65 0a 20 20 70 61 74  ate.  name.  pat
0950: 63 68 0a 20 20 70 61 74 68 0a 20 20 70 69 65 63  ch.  path.  piec
0960: 68 61 72 74 0a 20 20 70 69 6b 63 68 72 0a 20 20  hart.  pikchr.  
0970: 70 69 6b 63 68 72 73 68 6f 77 0a 20 20 70 69 76  pikchrshow.  piv
0980: 6f 74 0a 20 20 70 6f 70 65 6e 0a 20 20 70 71 75  ot.  popen.  pqu
0990: 65 75 65 0a 20 20 70 72 69 6e 74 66 0a 20 20 70  eue.  printf.  p
09a0: 75 62 6c 69 73 68 0a 20 20 70 75 72 67 65 0a 20  ublish.  purge. 
09b0: 20 72 65 62 75 69 6c 64 0a 20 20 72 65 67 65 78   rebuild.  regex
09c0: 70 0a 20 20 72 65 70 6f 6c 69 73 74 0a 20 20 72  p.  repolist.  r
09d0: 65 70 6f 72 74 0a 20 20 72 73 73 0a 20 20 73 63  eport.  rss.  sc
09e0: 68 65 6d 61 0a 20 20 73 65 61 72 63 68 0a 20 20  hema.  search.  
09f0: 73 65 63 75 72 69 74 79 5f 61 75 64 69 74 0a 20  security_audit. 
0a00: 20 73 65 74 75 70 0a 20 20 73 65 74 75 70 75 73   setup.  setupus
0a10: 65 72 0a 20 20 73 68 61 31 0a 20 20 73 68 61 31  er.  sha1.  sha1
0a20: 68 61 72 64 0a 20 20 73 68 61 33 0a 20 20 73 68  hard.  sha3.  sh
0a30: 75 6e 0a 20 20 73 69 74 65 6d 61 70 0a 20 20 73  un.  sitemap.  s
0a40: 6b 69 6e 73 0a 20 20 73 6d 74 70 0a 20 20 73 71  kins.  smtp.  sq
0a50: 6c 63 6d 64 0a 20 20 73 74 61 73 68 0a 20 20 73  lcmd.  stash.  s
0a60: 74 61 74 0a 20 20 73 74 61 74 72 65 70 0a 20 20  tat.  statrep.  
0a70: 73 74 79 6c 65 0a 20 20 73 79 6e 63 0a 20 20 74  style.  sync.  t
0a80: 61 67 0a 20 20 74 61 72 0a 20 20 74 65 72 6d 69  ag.  tar.  termi
0a90: 6e 61 6c 0a 20 20 74 68 5f 6d 61 69 6e 0a 20 20  nal.  th_main.  
0aa0: 74 69 6d 65 6c 69 6e 65 0a 20 20 74 6b 74 0a 20  timeline.  tkt. 
0ab0: 20 74 6b 74 73 65 74 75 70 0a 20 20 75 6e 64 6f   tktsetup.  undo
0ac0: 0a 20 20 75 6e 69 63 6f 64 65 0a 20 20 75 6e 76  .  unicode.  unv
0ad0: 65 72 73 69 6f 6e 65 64 0a 20 20 75 70 64 61 74  ersioned.  updat
0ae0: 65 0a 20 20 75 72 6c 0a 20 20 75 73 65 72 0a 20  e.  url.  user. 
0af0: 20 75 74 66 38 0a 20 20 75 74 69 6c 0a 20 20 76   utf8.  util.  v
0b00: 65 72 69 66 79 0a 20 20 76 66 69 6c 65 0a 20 20  erify.  vfile.  
0b10: 77 69 6b 69 0a 20 20 77 69 6b 69 66 6f 72 6d 61  wiki.  wikiforma
0b20: 74 0a 20 20 77 69 6e 66 69 6c 65 0a 20 20 77 69  t.  winfile.  wi
0b30: 6e 68 74 74 70 0a 20 20 78 66 65 72 0a 20 20 78  nhttp.  xfer.  x
0b40: 66 65 72 73 65 74 75 70 0a 20 20 7a 69 70 0a 20  fersetup.  zip. 
0b50: 20 68 74 74 70 5f 73 73 6c 0a 7d 0a 0a 23 20 41   http_ssl.}..# A
0b60: 64 64 69 74 69 6f 6e 61 6c 20 72 65 73 6f 75 72  dditional resour
0b70: 63 65 20 66 69 6c 65 73 20 74 68 61 74 20 67 65  ce files that ge
0b80: 74 20 62 75 69 6c 74 20 69 6e 74 6f 20 74 68 65  t built into the
0b90: 20 65 78 65 63 75 74 61 62 6c 65 2e 0a 23 0a 73   executable..#.s
0ba0: 65 74 20 65 78 74 72 61 5f 66 69 6c 65 73 20 7b  et extra_files {
0bb0: 0a 20 20 64 69 66 66 2e 74 63 6c 0a 20 20 6d 61  .  diff.tcl.  ma
0bc0: 72 6b 64 6f 77 6e 2e 6d 64 0a 20 20 77 69 6b 69  rkdown.md.  wiki
0bd0: 2e 77 69 6b 69 0a 20 20 2a 2e 6a 73 0a 20 20 64  .wiki.  *.js.  d
0be0: 65 66 61 75 6c 74 2e 63 73 73 0a 20 20 73 74 79  efault.css.  sty
0bf0: 6c 65 2e 2a 2e 63 73 73 0a 20 20 2e 2e 2f 73 6b  le.*.css.  ../sk
0c00: 69 6e 73 2f 2a 2f 2a 2e 74 78 74 0a 20 20 73 6f  ins/*/*.txt.  so
0c10: 75 6e 64 73 2f 2a 2e 77 61 76 0a 20 20 61 6c 65  unds/*.wav.  ale
0c20: 72 74 73 2f 2a 2e 77 61 76 0a 7d 0a 0a 23 20 4f  rts/*.wav.}..# O
0c30: 70 74 69 6f 6e 73 20 75 73 65 64 20 74 6f 20 63  ptions used to c
0c40: 6f 6d 70 69 6c 65 20 74 68 65 20 69 6e 63 6c 75  ompile the inclu
0c50: 64 65 64 20 53 51 4c 69 74 65 20 6c 69 62 72 61  ded SQLite libra
0c60: 72 79 2e 0a 23 0a 73 65 74 20 53 51 4c 49 54 45  ry..#.set SQLITE
0c70: 5f 4f 50 54 49 4f 4e 53 20 7b 0a 20 20 2d 44 4e  _OPTIONS {.  -DN
0c80: 44 45 42 55 47 3d 31 0a 20 20 2d 44 53 51 4c 49  DEBUG=1.  -DSQLI
0c90: 54 45 5f 44 51 53 3d 30 0a 20 20 2d 44 53 51 4c  TE_DQS=0.  -DSQL
0ca0: 49 54 45 5f 54 48 52 45 41 44 53 41 46 45 3d 30  ITE_THREADSAFE=0
0cb0: 0a 20 20 2d 44 53 51 4c 49 54 45 5f 44 45 46 41  .  -DSQLITE_DEFA
0cc0: 55 4c 54 5f 4d 45 4d 53 54 41 54 55 53 3d 30 0a  ULT_MEMSTATUS=0.
0cd0: 20 20 2d 44 53 51 4c 49 54 45 5f 44 45 46 41 55    -DSQLITE_DEFAU
0ce0: 4c 54 5f 57 41 4c 5f 53 59 4e 43 48 52 4f 4e 4f  LT_WAL_SYNCHRONO
0cf0: 55 53 3d 31 0a 20 20 2d 44 53 51 4c 49 54 45 5f  US=1.  -DSQLITE_
0d00: 4c 49 4b 45 5f 44 4f 45 53 4e 54 5f 4d 41 54 43  LIKE_DOESNT_MATC
0d10: 48 5f 42 4c 4f 42 53 0a 20 20 2d 44 53 51 4c 49  H_BLOBS.  -DSQLI
0d20: 54 45 5f 4f 4d 49 54 5f 44 45 43 4c 54 59 50 45  TE_OMIT_DECLTYPE
0d30: 0a 20 20 2d 44 53 51 4c 49 54 45 5f 4f 4d 49 54  .  -DSQLITE_OMIT
0d40: 5f 44 45 50 52 45 43 41 54 45 44 0a 20 20 2d 44  _DEPRECATED.  -D
0d50: 53 51 4c 49 54 45 5f 4f 4d 49 54 5f 50 52 4f 47  SQLITE_OMIT_PROG
0d60: 52 45 53 53 5f 43 41 4c 4c 42 41 43 4b 0a 20 20  RESS_CALLBACK.  
0d70: 2d 44 53 51 4c 49 54 45 5f 4f 4d 49 54 5f 53 48  -DSQLITE_OMIT_SH
0d80: 41 52 45 44 5f 43 41 43 48 45 0a 20 20 2d 44 53  ARED_CACHE.  -DS
0d90: 51 4c 49 54 45 5f 4f 4d 49 54 5f 4c 4f 41 44 5f  QLITE_OMIT_LOAD_
0da0: 45 58 54 45 4e 53 49 4f 4e 0a 20 20 2d 44 53 51  EXTENSION.  -DSQ
0db0: 4c 49 54 45 5f 4d 41 58 5f 45 58 50 52 5f 44 45  LITE_MAX_EXPR_DE
0dc0: 50 54 48 3d 30 0a 20 20 2d 44 53 51 4c 49 54 45  PTH=0.  -DSQLITE
0dd0: 5f 55 53 45 5f 41 4c 4c 4f 43 41 0a 20 20 2d 44  _USE_ALLOCA.  -D
0de0: 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45 5f 4c 4f  SQLITE_ENABLE_LO
0df0: 43 4b 49 4e 47 5f 53 54 59 4c 45 3d 30 0a 20 20  CKING_STYLE=0.  
0e00: 2d 44 53 51 4c 49 54 45 5f 44 45 46 41 55 4c 54  -DSQLITE_DEFAULT
0e10: 5f 46 49 4c 45 5f 46 4f 52 4d 41 54 3d 34 0a 20  _FILE_FORMAT=4. 
0e20: 20 2d 44 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45   -DSQLITE_ENABLE
0e30: 5f 45 58 50 4c 41 49 4e 5f 43 4f 4d 4d 45 4e 54  _EXPLAIN_COMMENT
0e40: 53 0a 20 20 2d 44 53 51 4c 49 54 45 5f 45 4e 41  S.  -DSQLITE_ENA
0e50: 42 4c 45 5f 46 54 53 34 0a 20 20 2d 44 53 51 4c  BLE_FTS4.  -DSQL
0e60: 49 54 45 5f 45 4e 41 42 4c 45 5f 44 42 53 54 41  ITE_ENABLE_DBSTA
0e70: 54 5f 56 54 41 42 0a 20 20 2d 44 53 51 4c 49 54  T_VTAB.  -DSQLIT
0e80: 45 5f 45 4e 41 42 4c 45 5f 4a 53 4f 4e 31 0a 20  E_ENABLE_JSON1. 
0e90: 20 2d 44 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45   -DSQLITE_ENABLE
0ea0: 5f 46 54 53 35 0a 20 20 2d 44 53 51 4c 49 54 45  _FTS5.  -DSQLITE
0eb0: 5f 45 4e 41 42 4c 45 5f 53 54 4d 54 56 54 41 42  _ENABLE_STMTVTAB
0ec0: 0a 20 20 2d 44 53 51 4c 49 54 45 5f 48 41 56 45  .  -DSQLITE_HAVE
0ed0: 5f 5a 4c 49 42 0a 20 20 2d 44 53 51 4c 49 54 45  _ZLIB.  -DSQLITE
0ee0: 5f 49 4e 54 52 4f 53 50 45 43 54 49 4f 4e 5f 50  _INTROSPECTION_P
0ef0: 52 41 47 4d 41 53 0a 20 20 2d 44 53 51 4c 49 54  RAGMAS.  -DSQLIT
0f00: 45 5f 45 4e 41 42 4c 45 5f 44 42 50 41 47 45 5f  E_ENABLE_DBPAGE_
0f10: 56 54 41 42 0a 20 20 2d 44 53 51 4c 49 54 45 5f  VTAB.  -DSQLITE_
0f20: 54 52 55 53 54 45 44 5f 53 43 48 45 4d 41 3d 30  TRUSTED_SCHEMA=0
0f30: 0a 7d 0a 23 6c 61 70 70 65 6e 64 20 53 51 4c 49  .}.#lappend SQLI
0f40: 54 45 5f 4f 50 54 49 4f 4e 53 20 2d 44 53 51 4c  TE_OPTIONS -DSQL
0f50: 49 54 45 5f 45 4e 41 42 4c 45 5f 46 54 53 33 3d  ITE_ENABLE_FTS3=
0f60: 31 0a 23 6c 61 70 70 65 6e 64 20 53 51 4c 49 54  1.#lappend SQLIT
0f70: 45 5f 4f 50 54 49 4f 4e 53 20 2d 44 53 51 4c 49  E_OPTIONS -DSQLI
0f80: 54 45 5f 45 4e 41 42 4c 45 5f 53 54 41 54 34 0a  TE_ENABLE_STAT4.
0f90: 23 6c 61 70 70 65 6e 64 20 53 51 4c 49 54 45 5f  #lappend SQLITE_
0fa0: 4f 50 54 49 4f 4e 53 20 2d 44 53 51 4c 49 54 45  OPTIONS -DSQLITE
0fb0: 5f 57 49 4e 33 32 5f 4e 4f 5f 41 4e 53 49 0a 23  _WIN32_NO_ANSI.#
0fc0: 6c 61 70 70 65 6e 64 20 53 51 4c 49 54 45 5f 4f  lappend SQLITE_O
0fd0: 50 54 49 4f 4e 53 20 2d 44 53 51 4c 49 54 45 5f  PTIONS -DSQLITE_
0fe0: 57 49 4e 4e 54 5f 4d 41 58 5f 50 41 54 48 5f 43  WINNT_MAX_PATH_C
0ff0: 48 41 52 53 3d 34 30 39 36 0a 0a 23 20 4f 70 74  HARS=4096..# Opt
1000: 69 6f 6e 73 20 75 73 65 64 20 74 6f 20 63 6f 6d  ions used to com
1010: 70 69 6c 65 20 74 68 65 20 69 6e 63 6c 75 64 65  pile the include
1020: 64 20 53 51 4c 69 74 65 20 73 68 65 6c 6c 2e 0a  d SQLite shell..
1030: 23 0a 73 65 74 20 53 48 45 4c 4c 5f 4f 50 54 49  #.set SHELL_OPTI
1040: 4f 4e 53 20 5b 63 6f 6e 63 61 74 20 24 53 51 4c  ONS [concat $SQL
1050: 49 54 45 5f 4f 50 54 49 4f 4e 53 20 7b 0a 20 20  ITE_OPTIONS {.  
1060: 2d 44 6d 61 69 6e 3d 73 71 6c 69 74 65 33 5f 73  -Dmain=sqlite3_s
1070: 68 65 6c 6c 0a 20 20 2d 44 53 51 4c 49 54 45 5f  hell.  -DSQLITE_
1080: 53 48 45 4c 4c 5f 49 53 5f 55 54 46 38 3d 31 0a  SHELL_IS_UTF8=1.
1090: 20 20 2d 44 53 51 4c 49 54 45 5f 4f 4d 49 54 5f    -DSQLITE_OMIT_
10a0: 4c 4f 41 44 5f 45 58 54 45 4e 53 49 4f 4e 3d 31  LOAD_EXTENSION=1
10b0: 0a 20 20 2d 44 55 53 45 5f 53 59 53 54 45 4d 5f  .  -DUSE_SYSTEM_
10c0: 53 51 4c 49 54 45 3d 24 28 55 53 45 5f 53 59 53  SQLITE=$(USE_SYS
10d0: 54 45 4d 5f 53 51 4c 49 54 45 29 0a 20 20 2d 44  TEM_SQLITE).  -D
10e0: 53 51 4c 49 54 45 5f 53 48 45 4c 4c 5f 44 42 4e  SQLITE_SHELL_DBN
10f0: 41 4d 45 5f 50 52 4f 43 3d 73 71 6c 63 6d 64 5f  AME_PROC=sqlcmd_
1100: 67 65 74 5f 64 62 6e 61 6d 65 0a 20 20 2d 44 53  get_dbname.  -DS
1110: 51 4c 49 54 45 5f 53 48 45 4c 4c 5f 49 4e 49 54  QLITE_SHELL_INIT
1120: 5f 50 52 4f 43 3d 73 71 6c 63 6d 64 5f 69 6e 69  _PROC=sqlcmd_ini
1130: 74 5f 70 72 6f 63 0a 7d 5d 0a 0a 23 20 6d 69 6e  t_proc.}]..# min
1140: 69 7a 20 28 6c 69 62 7a 20 64 72 6f 70 2d 69 6e  iz (libz drop-in
1150: 20 61 6c 74 65 72 6e 61 74 69 76 65 29 20 70 72   alternative) pr
1160: 65 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 73 2e  ecompiler flags.
1170: 0a 23 0a 73 65 74 20 4d 49 4e 49 5a 5f 4f 50 54  .#.set MINIZ_OPT
1180: 49 4f 4e 53 20 7b 0a 20 20 2d 44 4d 49 4e 49 5a  IONS {.  -DMINIZ
1190: 5f 4e 4f 5f 53 54 44 49 4f 0a 20 20 2d 44 4d 49  _NO_STDIO.  -DMI
11a0: 4e 49 5a 5f 4e 4f 5f 54 49 4d 45 0a 20 20 2d 44  NIZ_NO_TIME.  -D
11b0: 4d 49 4e 49 5a 5f 4e 4f 5f 41 52 43 48 49 56 45  MINIZ_NO_ARCHIVE
11c0: 5f 41 50 49 53 0a 7d 0a 0a 23 20 4f 70 74 69 6f  _APIS.}..# Optio
11d0: 6e 73 20 75 73 65 64 20 74 6f 20 63 6f 6d 70 69  ns used to compi
11e0: 6c 65 20 74 68 65 20 69 6e 63 6c 75 64 65 64 20  le the included 
11f0: 53 51 4c 69 74 65 20 73 68 65 6c 6c 20 6f 6e 20  SQLite shell on 
1200: 57 69 6e 64 6f 77 73 2e 0a 23 0a 73 65 74 20 53  Windows..#.set S
1210: 48 45 4c 4c 5f 57 49 4e 33 32 5f 4f 50 54 49 4f  HELL_WIN32_OPTIO
1220: 4e 53 20 24 53 48 45 4c 4c 5f 4f 50 54 49 4f 4e  NS $SHELL_OPTION
1230: 53 0a 6c 61 70 70 65 6e 64 20 53 48 45 4c 4c 5f  S.lappend SHELL_
1240: 57 49 4e 33 32 5f 4f 50 54 49 4f 4e 53 20 2d 44  WIN32_OPTIONS -D
1250: 61 63 63 65 73 73 3d 66 69 6c 65 5f 61 63 63 65  access=file_acce
1260: 73 73 0a 6c 61 70 70 65 6e 64 20 53 48 45 4c 4c  ss.lappend SHELL
1270: 5f 57 49 4e 33 32 5f 4f 50 54 49 4f 4e 53 20 2d  _WIN32_OPTIONS -
1280: 44 73 79 73 74 65 6d 3d 66 6f 73 73 69 6c 5f 73  Dsystem=fossil_s
1290: 79 73 74 65 6d 0a 6c 61 70 70 65 6e 64 20 53 48  ystem.lappend SH
12a0: 45 4c 4c 5f 57 49 4e 33 32 5f 4f 50 54 49 4f 4e  ELL_WIN32_OPTION
12b0: 53 20 2d 44 67 65 74 65 6e 76 3d 66 6f 73 73 69  S -Dgetenv=fossi
12c0: 6c 5f 67 65 74 65 6e 76 0a 6c 61 70 70 65 6e 64  l_getenv.lappend
12d0: 20 53 48 45 4c 4c 5f 57 49 4e 33 32 5f 4f 50 54   SHELL_WIN32_OPT
12e0: 49 4f 4e 53 20 2d 44 66 6f 70 65 6e 3d 66 6f 73  IONS -Dfopen=fos
12f0: 73 69 6c 5f 66 6f 70 65 6e 0a 0a 23 20 53 54 4f  sil_fopen..# STO
1300: 50 20 48 45 52 45 2e 0a 23 20 55 6e 6c 65 73 73  P HERE..# Unless
1310: 20 74 68 65 20 62 75 69 6c 64 20 70 72 6f 63 65   the build proce
1320: 64 75 72 65 73 20 63 68 61 6e 67 65 73 2c 20 79  dures changes, y
1330: 6f 75 20 73 68 6f 75 6c 64 20 6e 6f 74 20 68 61  ou should not ha
1340: 76 65 20 74 6f 20 65 64 69 74 20 61 6e 79 74 68  ve to edit anyth
1350: 69 6e 67 0a 23 20 62 65 6c 6f 77 20 74 68 69 73  ing.# below this
1360: 20 6c 69 6e 65 2e 0a 23 23 23 23 23 23 23 23 23   line..#########
1370: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1380: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1390: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
13a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
13b0: 23 23 23 23 0a 0a 23 20 4e 61 6d 65 20 6f 66 20  ####..# Name of 
13c0: 74 68 65 20 66 69 6e 61 6c 20 61 70 70 6c 69 63  the final applic
13d0: 61 74 69 6f 6e 0a 23 0a 73 65 74 20 6e 61 6d 65  ation.#.set name
13e0: 20 66 6f 73 73 69 6c 0a 0a 23 20 54 68 65 20 22   fossil..# The "
13f0: 77 72 69 74 65 6c 6e 22 20 63 6f 6d 6d 61 6e 64  writeln" command
1400: 20 73 65 6e 64 73 20 6f 75 74 70 75 74 20 74 6f   sends output to
1410: 20 74 68 65 20 74 61 72 67 65 74 20 6d 61 6b 65   the target make
1420: 66 69 6c 65 2e 0a 23 0a 70 72 6f 63 20 77 72 69  file..#.proc wri
1430: 74 65 6c 6e 20 7b 61 72 67 73 7d 20 7b 0a 20 20  teln {args} {.  
1440: 67 6c 6f 62 61 6c 20 6f 75 74 70 75 74 5f 66 69  global output_fi
1450: 6c 65 0a 20 20 69 66 20 7b 5b 6c 69 6e 64 65 78  le.  if {[lindex
1460: 20 24 61 72 67 73 20 30 5d 3d 3d 22 2d 6e 6f 6e   $args 0]=="-non
1470: 65 77 6c 69 6e 65 22 7d 20 7b 0a 20 20 20 20 70  ewline"} {.    p
1480: 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 24  uts -nonewline $
1490: 6f 75 74 70 75 74 5f 66 69 6c 65 20 5b 6c 69 6e  output_file [lin
14a0: 64 65 78 20 24 61 72 67 73 20 31 5d 0a 20 20 7d  dex $args 1].  }
14b0: 20 65 6c 73 65 20 7b 0a 20 20 20 20 70 75 74 73   else {.    puts
14c0: 20 24 6f 75 74 70 75 74 5f 66 69 6c 65 20 5b 6c   $output_file [l
14d0: 69 6e 64 65 78 20 24 61 72 67 73 20 30 5d 0a 20  index $args 0]. 
14e0: 20 7d 0a 7d 0a 0a 23 20 45 78 70 61 6e 64 20 61   }.}..# Expand a
14f0: 6e 79 20 77 69 6c 64 63 61 72 64 73 20 69 6e 20  ny wildcards in 
1500: 22 65 78 74 72 61 5f 66 69 6c 65 73 22 0a 73 65  "extra_files".se
1510: 74 20 6e 65 77 5f 65 78 74 72 61 5f 66 69 6c 65  t new_extra_file
1520: 73 20 7b 7d 0a 66 6f 72 65 61 63 68 20 66 69 6c  s {}.foreach fil
1530: 65 20 24 65 78 74 72 61 5f 66 69 6c 65 73 20 7b  e $extra_files {
1540: 0a 20 20 66 6f 72 65 61 63 68 20 78 20 5b 67 6c  .  foreach x [gl
1550: 6f 62 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e 20 24  ob -nocomplain $
1560: 66 69 6c 65 5d 20 7b 0a 20 20 20 20 6c 61 70 70  file] {.    lapp
1570: 65 6e 64 20 6e 65 77 5f 65 78 74 72 61 5f 66 69  end new_extra_fi
1580: 6c 65 73 20 24 78 0a 20 20 7d 0a 7d 0a 73 65 74  les $x.  }.}.set
1590: 20 65 78 74 72 61 5f 66 69 6c 65 73 20 24 6e 65   extra_files $ne
15a0: 77 5f 65 78 74 72 61 5f 66 69 6c 65 73 0a 0a 23  w_extra_files..#
15b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
15c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
15d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
15e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
15f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 23  #############.##
1600: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1610: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1620: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1630: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1640: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 23 23  ############.###
1650: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1660: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1670: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1680: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1690: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 53 74  ###########.# St
16a0: 61 72 74 20 62 79 20 67 65 6e 65 72 61 74 69 6e  art by generatin
16b0: 67 20 74 68 65 20 22 6d 61 69 6e 2e 6d 6b 22 20  g the "main.mk" 
16c0: 6d 61 6b 65 66 69 6c 65 20 75 73 65 64 20 66 6f  makefile used fo
16d0: 72 20 61 6c 6c 20 75 6e 69 78 20 73 79 73 74 65  r all unix syste
16e0: 6d 73 2e 0a 23 0a 70 75 74 73 20 22 62 75 69 6c  ms..#.puts "buil
16f0: 64 69 6e 67 20 6d 61 69 6e 2e 6d 6b 22 0a 73 65  ding main.mk".se
1700: 74 20 6f 75 74 70 75 74 5f 66 69 6c 65 20 5b 6f  t output_file [o
1710: 70 65 6e 20 6d 61 69 6e 2e 6d 6b 20 77 5d 0a 66  pen main.mk w].f
1720: 63 6f 6e 66 69 67 75 72 65 20 24 6f 75 74 70 75  configure $outpu
1730: 74 5f 66 69 6c 65 20 2d 74 72 61 6e 73 6c 61 74  t_file -translat
1740: 69 6f 6e 20 62 69 6e 61 72 79 0a 0a 77 72 69 74  ion binary..writ
1750: 65 6c 6e 20 7b 23 0a 23 23 23 23 23 23 23 23 23  eln {#.#########
1760: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1770: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1780: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1790: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
17a0: 23 23 23 23 23 0a 23 20 57 41 52 4e 49 4e 47 3a  #####.# WARNING:
17b0: 20 44 4f 20 4e 4f 54 20 45 44 49 54 2c 20 41 55   DO NOT EDIT, AU
17c0: 54 4f 4d 41 54 49 43 41 4c 4c 59 20 47 45 4e 45  TOMATICALLY GENE
17d0: 52 41 54 45 44 20 46 49 4c 45 20 28 53 45 45 20  RATED FILE (SEE 
17e0: 22 73 72 63 2f 6d 61 6b 65 6d 61 6b 65 2e 74 63  "src/makemake.tc
17f0: 6c 22 29 0a 23 23 23 23 23 23 23 23 23 23 23 23  l").############
1800: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1810: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1820: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1830: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1840: 23 23 0a 23 0a 23 20 54 68 69 73 20 66 69 6c 65  ##.#.# This file
1850: 20 69 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c   is automaticall
1860: 79 20 67 65 6e 65 72 61 74 65 64 2e 20 20 49 6e  y generated.  In
1870: 73 74 65 61 64 20 6f 66 20 65 64 69 74 69 6e 67  stead of editing
1880: 20 74 68 69 73 0a 23 20 66 69 6c 65 2c 20 65 64   this.# file, ed
1890: 69 74 20 22 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c  it "makemake.tcl
18a0: 22 20 74 68 65 6e 20 72 75 6e 20 22 74 63 6c 73  " then run "tcls
18b0: 68 20 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 22 0a  h makemake.tcl".
18c0: 23 20 74 6f 20 72 65 67 65 6e 65 72 61 74 65 20  # to regenerate 
18d0: 74 68 69 73 20 66 69 6c 65 2e 0a 23 0a 23 20 54  this file..#.# T
18e0: 68 69 73 20 66 69 6c 65 20 69 73 20 69 6e 63 6c  his file is incl
18f0: 75 64 65 64 20 62 79 20 70 72 69 6d 61 72 79 20  uded by primary 
1900: 4d 61 6b 65 66 69 6c 65 2e 0a 23 0a 0a 58 42 43  Makefile..#..XBC
1910: 43 20 3d 20 24 28 42 43 43 29 20 24 28 42 43 43  C = $(BCC) $(BCC
1920: 46 4c 41 47 53 29 0a 58 54 43 43 20 3d 20 24 28  FLAGS).XTCC = $(
1930: 54 43 43 29 20 2d 49 2e 20 2d 49 24 28 53 52 43  TCC) -I. -I$(SRC
1940: 44 49 52 29 20 2d 49 24 28 4f 42 4a 44 49 52 29  DIR) -I$(OBJDIR)
1950: 20 24 28 54 43 43 46 4c 41 47 53 29 0a 0a 54 45   $(TCCFLAGS)..TE
1960: 53 54 46 4c 41 47 53 20 3a 3d 20 2d 71 75 69 65  STFLAGS := -quie
1970: 74 0a 7d 0a 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e  t.}.writeln -non
1980: 65 77 6c 69 6e 65 20 22 53 52 43 20 3d 22 0a 66  ewline "SRC =".f
1990: 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20  oreach s [lsort 
19a0: 24 73 72 63 5d 20 7b 0a 20 20 77 72 69 74 65 6c  $src] {.  writel
19b0: 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c  n -nonewline " \
19c0: 5c 5c 6e 20 20 5c 24 28 53 52 43 44 49 52 29 2f  \\n  \$(SRCDIR)/
19d0: 24 73 2e 63 22 0a 7d 0a 77 72 69 74 65 6c 6e 20  $s.c".}.writeln 
19e0: 22 5c 6e 22 0a 77 72 69 74 65 6c 6e 20 2d 6e 6f  "\n".writeln -no
19f0: 6e 65 77 6c 69 6e 65 20 22 45 58 54 52 41 5f 46  newline "EXTRA_F
1a00: 49 4c 45 53 20 3d 22 0a 66 6f 72 65 61 63 68 20  ILES =".foreach 
1a10: 73 20 5b 6c 73 6f 72 74 20 24 65 78 74 72 61 5f  s [lsort $extra_
1a20: 66 69 6c 65 73 5d 20 7b 0a 20 20 77 72 69 74 65  files] {.  write
1a30: 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20  ln -nonewline " 
1a40: 5c 5c 5c 6e 20 20 5c 24 28 53 52 43 44 49 52 29  \\\n  \$(SRCDIR)
1a50: 2f 24 73 22 0a 7d 0a 77 72 69 74 65 6c 6e 20 22  /$s".}.writeln "
1a60: 5c 6e 22 0a 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e  \n".writeln -non
1a70: 65 77 6c 69 6e 65 20 22 54 52 41 4e 53 5f 53 52  ewline "TRANS_SR
1a80: 43 20 3d 22 0a 66 6f 72 65 61 63 68 20 73 20 5b  C =".foreach s [
1a90: 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20  lsort $src] {.  
1aa0: 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e 65 77 6c 69  writeln -nonewli
1ab0: 6e 65 20 22 20 5c 5c 5c 6e 20 20 5c 24 28 4f 42  ne " \\\n  \$(OB
1ac0: 4a 44 49 52 29 2f 24 7b 73 7d 5f 2e 63 22 0a 7d  JDIR)/${s}_.c".}
1ad0: 0a 77 72 69 74 65 6c 6e 20 22 5c 6e 22 0a 77 72  .writeln "\n".wr
1ae0: 69 74 65 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65  iteln -nonewline
1af0: 20 22 4f 42 4a 20 3d 22 0a 66 6f 72 65 61 63 68   "OBJ =".foreach
1b00: 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20   s [lsort $src] 
1b10: 7b 0a 20 20 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e  {.  writeln -non
1b20: 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 5c 24  ewline " \\\n \$
1b30: 28 4f 42 4a 44 49 52 29 2f 24 73 2e 6f 22 0a 7d  (OBJDIR)/$s.o".}
1b40: 0a 0a 77 72 69 74 65 6c 6e 20 5b 73 74 72 69 6e  ..writeln [strin
1b50: 67 20 6d 61 70 20 5b 6c 69 73 74 20 5c 0a 20 20  g map [list \.  
1b60: 20 20 3c 3c 3c 53 51 4c 49 54 45 5f 4f 50 54 49    <<<SQLITE_OPTI
1b70: 4f 4e 53 3e 3e 3e 20 5b 6a 6f 69 6e 20 24 53 51  ONS>>> [join $SQ
1b80: 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 20 22 20 5c  LITE_OPTIONS " \
1b90: 5c 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 20  \\n             
1ba0: 20 20 20 20 22 5d 20 5c 0a 20 20 20 20 3c 3c 3c      "] \.    <<<
1bb0: 53 48 45 4c 4c 5f 4f 50 54 49 4f 4e 53 3e 3e 3e  SHELL_OPTIONS>>>
1bc0: 20 5b 6a 6f 69 6e 20 24 53 48 45 4c 4c 5f 4f 50   [join $SHELL_OP
1bd0: 54 49 4f 4e 53 20 22 20 5c 5c 5c 6e 20 20 20 20  TIONS " \\\n    
1be0: 20 20 20 20 20 20 20 20 20 20 20 20 22 5d 20 5c              "] \
1bf0: 0a 20 20 20 20 3c 3c 3c 4d 49 4e 49 5a 5f 4f 50  .    <<<MINIZ_OP
1c00: 54 49 4f 4e 53 3e 3e 3e 20 5b 6a 6f 69 6e 20 24  TIONS>>> [join $
1c10: 4d 49 4e 49 5a 5f 4f 50 54 49 4f 4e 53 20 22 20  MINIZ_OPTIONS " 
1c20: 5c 5c 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20  \\\n            
1c30: 20 20 20 20 22 5d 5d 20 7b 0a 61 6c 6c 3a 09 24      "]] {.all:.$
1c40: 28 4f 42 4a 44 49 52 29 20 24 28 41 50 50 4e 41  (OBJDIR) $(APPNA
1c50: 4d 45 29 0a 0a 69 6e 73 74 61 6c 6c 3a 09 61 6c  ME)..install:.al
1c60: 6c 0a 09 6d 6b 64 69 72 20 2d 70 20 24 28 49 4e  l..mkdir -p $(IN
1c70: 53 54 41 4c 4c 44 49 52 29 0a 09 63 70 20 24 28  STALLDIR)..cp $(
1c80: 41 50 50 4e 41 4d 45 29 20 24 28 49 4e 53 54 41  APPNAME) $(INSTA
1c90: 4c 4c 44 49 52 29 0a 0a 63 6f 64 65 63 68 65 63  LLDIR)..codechec
1ca0: 6b 3a 09 24 28 54 52 41 4e 53 5f 53 52 43 29 20  k:.$(TRANS_SRC) 
1cb0: 24 28 4f 42 4a 44 49 52 29 2f 63 6f 64 65 63 68  $(OBJDIR)/codech
1cc0: 65 63 6b 31 0a 09 24 28 4f 42 4a 44 49 52 29 2f  eck1..$(OBJDIR)/
1cd0: 63 6f 64 65 63 68 65 63 6b 31 20 24 28 54 52 41  codecheck1 $(TRA
1ce0: 4e 53 5f 53 52 43 29 0a 0a 24 28 4f 42 4a 44 49  NS_SRC)..$(OBJDI
1cf0: 52 29 3a 0a 09 2d 6d 6b 64 69 72 20 24 28 4f 42  R):..-mkdir $(OB
1d00: 4a 44 49 52 29 0a 0a 24 28 4f 42 4a 44 49 52 29  JDIR)..$(OBJDIR)
1d10: 2f 74 72 61 6e 73 6c 61 74 65 3a 09 24 28 53 52  /translate:.$(SR
1d20: 43 44 49 52 29 2f 74 72 61 6e 73 6c 61 74 65 2e  CDIR)/translate.
1d30: 63 0a 09 24 28 58 42 43 43 29 20 2d 6f 20 24 28  c..$(XBCC) -o $(
1d40: 4f 42 4a 44 49 52 29 2f 74 72 61 6e 73 6c 61 74  OBJDIR)/translat
1d50: 65 20 24 28 53 52 43 44 49 52 29 2f 74 72 61 6e  e $(SRCDIR)/tran
1d60: 73 6c 61 74 65 2e 63 0a 0a 24 28 4f 42 4a 44 49  slate.c..$(OBJDI
1d70: 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73 3a 09  R)/makeheaders:.
1d80: 24 28 53 52 43 44 49 52 29 2f 6d 61 6b 65 68 65  $(SRCDIR)/makehe
1d90: 61 64 65 72 73 2e 63 0a 09 24 28 58 42 43 43 29  aders.c..$(XBCC)
1da0: 20 2d 6f 20 24 28 4f 42 4a 44 49 52 29 2f 6d 61   -o $(OBJDIR)/ma
1db0: 6b 65 68 65 61 64 65 72 73 20 24 28 53 52 43 44  keheaders $(SRCD
1dc0: 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e  IR)/makeheaders.
1dd0: 63 0a 0a 24 28 4f 42 4a 44 49 52 29 2f 6d 6b 69  c..$(OBJDIR)/mki
1de0: 6e 64 65 78 3a 09 24 28 53 52 43 44 49 52 29 2f  ndex:.$(SRCDIR)/
1df0: 6d 6b 69 6e 64 65 78 2e 63 0a 09 24 28 58 42 43  mkindex.c..$(XBC
1e00: 43 29 20 2d 6f 20 24 28 4f 42 4a 44 49 52 29 2f  C) -o $(OBJDIR)/
1e10: 6d 6b 69 6e 64 65 78 20 24 28 53 52 43 44 49 52  mkindex $(SRCDIR
1e20: 29 2f 6d 6b 69 6e 64 65 78 2e 63 0a 0a 24 28 4f  )/mkindex.c..$(O
1e30: 42 4a 44 49 52 29 2f 6d 6b 62 75 69 6c 74 69 6e  BJDIR)/mkbuiltin
1e40: 3a 09 24 28 53 52 43 44 49 52 29 2f 6d 6b 62 75  :.$(SRCDIR)/mkbu
1e50: 69 6c 74 69 6e 2e 63 0a 09 24 28 58 42 43 43 29  iltin.c..$(XBCC)
1e60: 20 2d 6f 20 24 28 4f 42 4a 44 49 52 29 2f 6d 6b   -o $(OBJDIR)/mk
1e70: 62 75 69 6c 74 69 6e 20 24 28 53 52 43 44 49 52  builtin $(SRCDIR
1e80: 29 2f 6d 6b 62 75 69 6c 74 69 6e 2e 63 0a 0a 24  )/mkbuiltin.c..$
1e90: 28 4f 42 4a 44 49 52 29 2f 6d 6b 76 65 72 73 69  (OBJDIR)/mkversi
1ea0: 6f 6e 3a 09 24 28 53 52 43 44 49 52 29 2f 6d 6b  on:.$(SRCDIR)/mk
1eb0: 76 65 72 73 69 6f 6e 2e 63 0a 09 24 28 58 42 43  version.c..$(XBC
1ec0: 43 29 20 2d 6f 20 24 28 4f 42 4a 44 49 52 29 2f  C) -o $(OBJDIR)/
1ed0: 6d 6b 76 65 72 73 69 6f 6e 20 24 28 53 52 43 44  mkversion $(SRCD
1ee0: 49 52 29 2f 6d 6b 76 65 72 73 69 6f 6e 2e 63 0a  IR)/mkversion.c.
1ef0: 0a 24 28 4f 42 4a 44 49 52 29 2f 63 6f 64 65 63  .$(OBJDIR)/codec
1f00: 68 65 63 6b 31 3a 09 24 28 53 52 43 44 49 52 29  heck1:.$(SRCDIR)
1f10: 2f 63 6f 64 65 63 68 65 63 6b 31 2e 63 0a 09 24  /codecheck1.c..$
1f20: 28 58 42 43 43 29 20 2d 6f 20 24 28 4f 42 4a 44  (XBCC) -o $(OBJD
1f30: 49 52 29 2f 63 6f 64 65 63 68 65 63 6b 31 20 24  IR)/codecheck1 $
1f40: 28 53 52 43 44 49 52 29 2f 63 6f 64 65 63 68 65  (SRCDIR)/codeche
1f50: 63 6b 31 2e 63 0a 0a 23 20 52 75 6e 20 74 68 65  ck1.c..# Run the
1f60: 20 74 65 73 74 20 73 75 69 74 65 2e 0a 23 20 4f   test suite..# O
1f70: 74 68 65 72 20 66 6c 61 67 73 20 74 68 61 74 20  ther flags that 
1f80: 63 61 6e 20 62 65 20 69 6e 63 6c 75 64 65 64 20  can be included 
1f90: 69 6e 20 54 45 53 54 46 4c 41 47 53 20 61 72 65  in TESTFLAGS are
1fa0: 3a 0a 23 0a 23 20 20 2d 68 61 6c 74 20 20 20 20  :.#.#  -halt    
1fb0: 20 53 74 6f 70 20 74 65 73 74 69 6e 67 20 61 66   Stop testing af
1fc0: 74 65 72 20 74 68 65 20 66 69 72 73 74 20 66 61  ter the first fa
1fd0: 69 6c 65 64 20 74 65 73 74 0a 23 20 20 2d 6b 65  iled test.#  -ke
1fe0: 65 70 20 20 20 20 20 4b 65 65 70 20 74 68 65 20  ep     Keep the 
1ff0: 74 65 6d 70 6f 72 61 72 79 20 77 6f 72 6b 73 70  temporary worksp
2000: 61 63 65 20 66 6f 72 20 64 65 62 75 67 67 69 6e  ace for debuggin
2010: 67 0a 23 20 20 2d 70 72 6f 74 20 20 20 20 20 57  g.#  -prot     W
2020: 72 69 74 65 20 61 20 64 65 74 61 69 6c 65 64 20  rite a detailed 
2030: 6c 6f 67 20 6f 66 20 74 68 65 20 74 65 73 74 73  log of the tests
2040: 20 74 6f 20 74 68 65 20 66 69 6c 65 20 2e 2f 70   to the file ./p
2050: 72 6f 74 0a 23 20 20 2d 76 65 72 62 6f 73 65 20  rot.#  -verbose 
2060: 20 49 6e 63 6c 75 64 65 20 65 76 65 6e 20 6d 6f   Include even mo
2070: 72 65 20 64 65 74 61 69 6c 73 20 69 6e 20 74 68  re details in th
2080: 65 20 6f 75 74 70 75 74 0a 23 20 20 2d 71 75 69  e output.#  -qui
2090: 65 74 20 20 20 20 48 69 64 65 20 6d 6f 73 74 20  et    Hide most 
20a0: 6f 75 74 70 75 74 20 66 72 6f 6d 20 74 68 65 20  output from the 
20b0: 74 65 72 6d 69 6e 61 6c 0a 23 20 20 2d 73 74 72  terminal.#  -str
20c0: 69 63 74 20 20 20 54 72 65 61 74 20 6b 6e 6f 77  ict   Treat know
20d0: 6e 20 62 75 67 73 20 61 73 20 66 61 69 6c 75 72  n bugs as failur
20e0: 65 73 0a 23 0a 23 20 54 45 53 54 46 4c 41 47 53  es.#.# TESTFLAGS
20f0: 20 63 61 6e 20 61 6c 73 6f 20 69 6e 63 6c 75 64   can also includ
2100: 65 20 6e 61 6d 65 73 20 6f 66 20 73 70 65 63 69  e names of speci
2110: 66 69 63 20 74 65 73 74 20 66 69 6c 65 73 20 74  fic test files t
2120: 6f 20 6c 69 6d 69 74 0a 23 20 74 68 65 20 72 75  o limit.# the ru
2130: 6e 20 74 6f 20 6a 75 73 74 20 74 68 6f 73 65 20  n to just those 
2140: 74 65 73 74 20 63 61 73 65 73 2e 0a 23 0a 74 65  test cases..#.te
2150: 73 74 3a 09 24 28 4f 42 4a 44 49 52 29 20 24 28  st:.$(OBJDIR) $(
2160: 41 50 50 4e 41 4d 45 29 0a 09 24 28 54 43 4c 53  APPNAME)..$(TCLS
2170: 48 29 20 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f  H) $(SRCDIR)/../
2180: 74 65 73 74 2f 74 65 73 74 65 72 2e 74 63 6c 20  test/tester.tcl 
2190: 24 28 41 50 50 4e 41 4d 45 29 20 24 28 54 45 53  $(APPNAME) $(TES
21a0: 54 46 4c 41 47 53 29 0a 0a 24 28 4f 42 4a 44 49  TFLAGS)..$(OBJDI
21b0: 52 29 2f 56 45 52 53 49 4f 4e 2e 68 3a 09 24 28  R)/VERSION.h:.$(
21c0: 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66  SRCDIR)/../manif
21d0: 65 73 74 2e 75 75 69 64 20 24 28 53 52 43 44 49  est.uuid $(SRCDI
21e0: 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 20 24  R)/../manifest $
21f0: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 56 45 52 53  (SRCDIR)/../VERS
2200: 49 4f 4e 20 24 28 4f 42 4a 44 49 52 29 2f 6d 6b  ION $(OBJDIR)/mk
2210: 76 65 72 73 69 6f 6e 20 24 28 4f 42 4a 44 49 52  version $(OBJDIR
2220: 29 2f 70 68 6f 6e 79 2e 68 0a 09 24 28 4f 42 4a  )/phony.h..$(OBJ
2230: 44 49 52 29 2f 6d 6b 76 65 72 73 69 6f 6e 20 24  DIR)/mkversion $
2240: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69  (SRCDIR)/../mani
2250: 66 65 73 74 2e 75 75 69 64 20 5c 0a 09 09 24 28  fest.uuid \...$(
2260: 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66  SRCDIR)/../manif
2270: 65 73 74 20 5c 0a 09 09 24 28 53 52 43 44 49 52  est \...$(SRCDIR
2280: 29 2f 2e 2e 2f 56 45 52 53 49 4f 4e 20 3e 24 28  )/../VERSION >$(
2290: 4f 42 4a 44 49 52 29 2f 56 45 52 53 49 4f 4e 2e  OBJDIR)/VERSION.
22a0: 68 0a 0a 24 28 4f 42 4a 44 49 52 29 2f 70 68 6f  h..$(OBJDIR)/pho
22b0: 6e 79 2e 68 3a 0a 09 23 20 46 6f 72 63 65 20 72  ny.h:..# Force r
22c0: 65 62 75 69 6c 64 20 6f 66 20 56 45 52 53 49 4f  ebuild of VERSIO
22d0: 4e 2e 68 20 65 76 65 72 79 20 74 69 6d 65 20 77  N.h every time w
22e0: 65 20 72 75 6e 20 22 6d 61 6b 65 22 0a 0a 23 20  e run "make"..# 
22f0: 53 65 74 75 70 20 74 68 65 20 6f 70 74 69 6f 6e  Setup the option
2300: 73 20 75 73 65 64 20 74 6f 20 63 6f 6d 70 69 6c  s used to compil
2310: 65 20 74 68 65 20 69 6e 63 6c 75 64 65 64 20 53  e the included S
2320: 51 4c 69 74 65 20 6c 69 62 72 61 72 79 2e 0a 53  QLite library..S
2330: 51 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 20 3d 20  QLITE_OPTIONS = 
2340: 3c 3c 3c 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e  <<<SQLITE_OPTION
2350: 53 3e 3e 3e 0a 0a 23 20 53 65 74 75 70 20 74 68  S>>>..# Setup th
2360: 65 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 74  e options used t
2370: 6f 20 63 6f 6d 70 69 6c 65 20 74 68 65 20 69 6e  o compile the in
2380: 63 6c 75 64 65 64 20 53 51 4c 69 74 65 20 73 68  cluded SQLite sh
2390: 65 6c 6c 2e 0a 53 48 45 4c 4c 5f 4f 50 54 49 4f  ell..SHELL_OPTIO
23a0: 4e 53 20 3d 20 3c 3c 3c 53 48 45 4c 4c 5f 4f 50  NS = <<<SHELL_OP
23b0: 54 49 4f 4e 53 3e 3e 3e 0a 0a 23 20 53 65 74 75  TIONS>>>..# Setu
23c0: 70 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 75 73  p the options us
23d0: 65 64 20 74 6f 20 63 6f 6d 70 69 6c 65 20 74 68  ed to compile th
23e0: 65 20 69 6e 63 6c 75 64 65 64 20 6d 69 6e 69 7a  e included miniz
23f0: 20 6c 69 62 72 61 72 79 2e 0a 4d 49 4e 49 5a 5f   library..MINIZ_
2400: 4f 50 54 49 4f 4e 53 20 3d 20 3c 3c 3c 4d 49 4e  OPTIONS = <<<MIN
2410: 49 5a 5f 4f 50 54 49 4f 4e 53 3e 3e 3e 0a 0a 23  IZ_OPTIONS>>>..#
2420: 20 54 68 65 20 55 53 45 5f 53 59 53 54 45 4d 5f   The USE_SYSTEM_
2430: 53 51 4c 49 54 45 20 76 61 72 69 61 62 6c 65 20  SQLITE variable 
2440: 6d 61 79 20 62 65 20 75 6e 64 65 66 69 6e 65 64  may be undefined
2450: 2c 20 73 65 74 20 74 6f 20 30 2c 20 6f 72 20 73  , set to 0, or s
2460: 65 74 0a 23 20 74 6f 20 31 2e 20 49 66 20 69 74  et.# to 1. If it
2470: 20 69 73 20 73 65 74 20 74 6f 20 31 2c 20 74 68   is set to 1, th
2480: 65 6e 20 74 68 65 72 65 20 69 73 20 6e 6f 20 6e  en there is no n
2490: 65 65 64 20 74 6f 20 62 75 69 6c 64 20 6f 72 20  eed to build or 
24a0: 6c 69 6e 6b 0a 23 20 74 68 65 20 73 71 6c 69 74  link.# the sqlit
24b0: 65 33 2e 6f 20 6f 62 6a 65 63 74 2e 20 49 6e 73  e3.o object. Ins
24c0: 74 65 61 64 2c 20 74 68 65 20 73 79 73 74 65 6d  tead, the system
24d0: 20 53 51 4c 69 74 65 20 77 69 6c 6c 20 62 65 20   SQLite will be 
24e0: 6c 69 6e 6b 65 64 0a 23 20 75 73 69 6e 67 20 2d  linked.# using -
24f0: 6c 73 71 6c 69 74 65 33 2e 0a 53 51 4c 49 54 45  lsqlite3..SQLITE
2500: 33 5f 4f 42 4a 2e 30 20 3d 20 24 28 4f 42 4a 44  3_OBJ.0 = $(OBJD
2510: 49 52 29 2f 73 71 6c 69 74 65 33 2e 6f 0a 53 51  IR)/sqlite3.o.SQ
2520: 4c 49 54 45 33 5f 4f 42 4a 2e 31 20 3d 0a 53 51  LITE3_OBJ.1 =.SQ
2530: 4c 49 54 45 33 5f 4f 42 4a 2e 20 20 3d 20 24 28  LITE3_OBJ.  = $(
2540: 53 51 4c 49 54 45 33 5f 4f 42 4a 2e 30 29 0a 0a  SQLITE3_OBJ.0)..
2550: 23 20 54 68 65 20 46 4f 53 53 49 4c 5f 45 4e 41  # The FOSSIL_ENA
2560: 42 4c 45 5f 4d 49 4e 49 5a 20 76 61 72 69 61 62  BLE_MINIZ variab
2570: 6c 65 20 6d 61 79 20 62 65 20 75 6e 64 65 66 69  le may be undefi
2580: 6e 65 64 2c 20 73 65 74 20 74 6f 20 30 2c 20 6f  ned, set to 0, o
2590: 72 0a 23 20 73 65 74 20 74 6f 20 31 2e 20 20 49  r.# set to 1.  I
25a0: 66 20 69 74 20 69 73 20 73 65 74 20 74 6f 20 31  f it is set to 1
25b0: 2c 20 74 68 65 20 6d 69 6e 69 7a 20 6c 69 62 72  , the miniz libr
25c0: 61 72 79 20 69 6e 63 6c 75 64 65 64 20 69 6e 20  ary included in 
25d0: 74 68 65 0a 23 20 73 6f 75 72 63 65 20 74 72 65  the.# source tre
25e0: 65 20 73 68 6f 75 6c 64 20 62 65 20 75 73 65 64  e should be used
25f0: 3b 20 6f 74 68 65 72 77 69 73 65 2c 20 69 74 20  ; otherwise, it 
2600: 73 68 6f 75 6c 64 20 6e 6f 74 2e 0a 4d 49 4e 49  should not..MINI
2610: 5a 5f 4f 42 4a 2e 30 20 3d 0a 4d 49 4e 49 5a 5f  Z_OBJ.0 =.MINIZ_
2620: 4f 42 4a 2e 31 20 3d 20 24 28 4f 42 4a 44 49 52  OBJ.1 = $(OBJDIR
2630: 29 2f 6d 69 6e 69 7a 2e 6f 0a 4d 49 4e 49 5a 5f  )/miniz.o.MINIZ_
2640: 4f 42 4a 2e 20 20 3d 20 24 28 4d 49 4e 49 5a 5f  OBJ.  = $(MINIZ_
2650: 4f 42 4a 2e 30 29 0a 0a 23 20 54 68 65 20 55 53  OBJ.0)..# The US
2660: 45 5f 4c 49 4e 45 4e 4f 49 53 45 20 76 61 72 69  E_LINENOISE vari
2670: 61 62 6c 65 20 6d 61 79 20 62 65 20 75 6e 64 65  able may be unde
2680: 66 69 6e 65 64 2c 20 73 65 74 20 74 6f 20 30 2c  fined, set to 0,
2690: 20 6f 72 20 73 65 74 0a 23 20 74 6f 20 31 2e 20   or set.# to 1. 
26a0: 49 66 20 69 74 20 69 73 20 73 65 74 20 74 6f 20  If it is set to 
26b0: 30 2c 20 74 68 65 6e 20 74 68 65 72 65 20 69 73  0, then there is
26c0: 20 6e 6f 20 6e 65 65 64 20 74 6f 20 62 75 69 6c   no need to buil
26d0: 64 20 6f 72 20 6c 69 6e 6b 0a 23 20 74 68 65 20  d or link.# the 
26e0: 6c 69 6e 65 6e 6f 69 73 65 2e 6f 20 6f 62 6a 65  linenoise.o obje
26f0: 63 74 2e 0a 4c 49 4e 45 4e 4f 49 53 45 5f 44 45  ct..LINENOISE_DE
2700: 46 2e 30 20 3d 0a 4c 49 4e 45 4e 4f 49 53 45 5f  F.0 =.LINENOISE_
2710: 44 45 46 2e 31 20 3d 20 2d 44 48 41 56 45 5f 4c  DEF.1 = -DHAVE_L
2720: 49 4e 45 4e 4f 49 53 45 0a 4c 49 4e 45 4e 4f 49  INENOISE.LINENOI
2730: 53 45 5f 44 45 46 2e 20 20 3d 20 24 28 4c 49 4e  SE_DEF.  = $(LIN
2740: 45 4e 4f 49 53 45 5f 44 45 46 2e 30 29 0a 4c 49  ENOISE_DEF.0).LI
2750: 4e 45 4e 4f 49 53 45 5f 4f 42 4a 2e 30 20 3d 0a  NENOISE_OBJ.0 =.
2760: 4c 49 4e 45 4e 4f 49 53 45 5f 4f 42 4a 2e 31 20  LINENOISE_OBJ.1 
2770: 3d 20 24 28 4f 42 4a 44 49 52 29 2f 6c 69 6e 65  = $(OBJDIR)/line
2780: 6e 6f 69 73 65 2e 6f 0a 4c 49 4e 45 4e 4f 49 53  noise.o.LINENOIS
2790: 45 5f 4f 42 4a 2e 20 20 3d 20 24 28 4c 49 4e 45  E_OBJ.  = $(LINE
27a0: 4e 4f 49 53 45 5f 4f 42 4a 2e 30 29 0a 0a 23 20  NOISE_OBJ.0)..# 
27b0: 54 68 65 20 55 53 45 5f 53 45 45 20 76 61 72 69  The USE_SEE vari
27c0: 61 62 6c 65 20 6d 61 79 20 62 65 20 75 6e 64 65  able may be unde
27d0: 66 69 6e 65 64 2c 20 30 20 6f 72 20 31 2e 20 20  fined, 0 or 1.  
27e0: 49 66 20 75 6e 64 65 66 69 6e 65 64 20 6f 72 0a  If undefined or.
27f0: 23 20 30 2c 20 6f 72 64 69 6e 61 72 79 20 53 51  # 0, ordinary SQ
2800: 4c 69 74 65 20 69 73 20 75 73 65 64 2e 20 20 49  Lite is used.  I
2810: 66 20 31 2c 20 74 68 65 6e 20 73 71 6c 69 74 65  f 1, then sqlite
2820: 33 2d 73 65 65 2e 63 20 28 6e 6f 74 20 70 61 72  3-see.c (not par
2830: 74 20 6f 66 0a 23 20 74 68 65 20 73 6f 75 72 63  t of.# the sourc
2840: 65 20 74 72 65 65 29 20 69 73 20 75 73 65 64 20  e tree) is used 
2850: 61 6e 64 20 65 78 74 72 61 20 66 6c 61 67 73 20  and extra flags 
2860: 61 72 65 20 70 72 6f 76 69 64 65 64 20 74 6f 20  are provided to 
2870: 65 6e 61 62 6c 65 0a 23 20 74 68 65 20 53 51 4c  enable.# the SQL
2880: 69 74 65 20 45 6e 63 72 79 70 74 69 6f 6e 20 45  ite Encryption E
2890: 78 74 65 6e 73 69 6f 6e 2e 0a 53 51 4c 49 54 45  xtension..SQLITE
28a0: 33 5f 53 52 43 2e 30 20 3d 20 73 71 6c 69 74 65  3_SRC.0 = sqlite
28b0: 33 2e 63 0a 53 51 4c 49 54 45 33 5f 53 52 43 2e  3.c.SQLITE3_SRC.
28c0: 31 20 3d 20 73 71 6c 69 74 65 33 2d 73 65 65 2e  1 = sqlite3-see.
28d0: 63 0a 53 51 4c 49 54 45 33 5f 53 52 43 2e 20 3d  c.SQLITE3_SRC. =
28e0: 20 73 71 6c 69 74 65 33 2e 63 0a 53 51 4c 49 54   sqlite3.c.SQLIT
28f0: 45 33 5f 53 52 43 20 3d 20 24 28 53 52 43 44 49  E3_SRC = $(SRCDI
2900: 52 29 2f 24 28 53 51 4c 49 54 45 33 5f 53 52 43  R)/$(SQLITE3_SRC
2910: 2e 24 28 55 53 45 5f 53 45 45 29 29 0a 53 51 4c  .$(USE_SEE)).SQL
2920: 49 54 45 33 5f 53 48 45 4c 4c 5f 53 52 43 2e 30  ITE3_SHELL_SRC.0
2930: 20 3d 20 73 68 65 6c 6c 2e 63 0a 53 51 4c 49 54   = shell.c.SQLIT
2940: 45 33 5f 53 48 45 4c 4c 5f 53 52 43 2e 31 20 3d  E3_SHELL_SRC.1 =
2950: 20 73 68 65 6c 6c 2d 73 65 65 2e 63 0a 53 51 4c   shell-see.c.SQL
2960: 49 54 45 33 5f 53 48 45 4c 4c 5f 53 52 43 2e 20  ITE3_SHELL_SRC. 
2970: 3d 20 73 68 65 6c 6c 2e 63 0a 53 51 4c 49 54 45  = shell.c.SQLITE
2980: 33 5f 53 48 45 4c 4c 5f 53 52 43 20 3d 20 24 28  3_SHELL_SRC = $(
2990: 53 52 43 44 49 52 29 2f 24 28 53 51 4c 49 54 45  SRCDIR)/$(SQLITE
29a0: 33 5f 53 48 45 4c 4c 5f 53 52 43 2e 24 28 55 53  3_SHELL_SRC.$(US
29b0: 45 5f 53 45 45 29 29 0a 53 45 45 5f 46 4c 41 47  E_SEE)).SEE_FLAG
29c0: 53 2e 30 20 3d 0a 53 45 45 5f 46 4c 41 47 53 2e  S.0 =.SEE_FLAGS.
29d0: 31 20 3d 20 2d 44 53 51 4c 49 54 45 5f 48 41 53  1 = -DSQLITE_HAS
29e0: 5f 43 4f 44 45 43 20 2d 44 53 51 4c 49 54 45 5f  _CODEC -DSQLITE_
29f0: 53 48 45 4c 4c 5f 44 42 4b 45 59 5f 50 52 4f 43  SHELL_DBKEY_PROC
2a00: 3d 66 6f 73 73 69 6c 5f 6b 65 79 0a 53 45 45 5f  =fossil_key.SEE_
2a10: 46 4c 41 47 53 2e 20 3d 0a 53 45 45 5f 46 4c 41  FLAGS. =.SEE_FLA
2a20: 47 53 20 3d 20 24 28 53 45 45 5f 46 4c 41 47 53  GS = $(SEE_FLAGS
2a30: 2e 24 28 55 53 45 5f 53 45 45 29 29 0a 7d 5d 0a  .$(USE_SEE)).}].
2a40: 0a 77 72 69 74 65 6c 6e 20 5b 73 74 72 69 6e 67  .writeln [string
2a50: 20 6d 61 70 20 5b 6c 69 73 74 20 3c 3c 3c 4e 45   map [list <<<NE
2a60: 58 54 5f 4c 49 4e 45 3e 3e 3e 20 5c 5c 5d 20 7b  XT_LINE>>> \\] {
2a70: 0a 45 58 54 52 41 4f 42 4a 20 3d 20 3c 3c 3c 4e  .EXTRAOBJ = <<<N
2a80: 45 58 54 5f 4c 49 4e 45 3e 3e 3e 0a 20 24 28 53  EXT_LINE>>>. $(S
2a90: 51 4c 49 54 45 33 5f 4f 42 4a 2e 24 28 55 53 45  QLITE3_OBJ.$(USE
2aa0: 5f 53 59 53 54 45 4d 5f 53 51 4c 49 54 45 29 29  _SYSTEM_SQLITE))
2ab0: 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e 45 3e 3e 3e   <<<NEXT_LINE>>>
2ac0: 0a 20 24 28 4d 49 4e 49 5a 5f 4f 42 4a 2e 24 28  . $(MINIZ_OBJ.$(
2ad0: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49  FOSSIL_ENABLE_MI
2ae0: 4e 49 5a 29 29 20 3c 3c 3c 4e 45 58 54 5f 4c 49  NIZ)) <<<NEXT_LI
2af0: 4e 45 3e 3e 3e 0a 20 24 28 4c 49 4e 45 4e 4f 49  NE>>>. $(LINENOI
2b00: 53 45 5f 4f 42 4a 2e 24 28 55 53 45 5f 4c 49 4e  SE_OBJ.$(USE_LIN
2b10: 45 4e 4f 49 53 45 29 29 20 3c 3c 3c 4e 45 58 54  ENOISE)) <<<NEXT
2b20: 5f 4c 49 4e 45 3e 3e 3e 0a 20 24 28 4f 42 4a 44  _LINE>>>. $(OBJD
2b30: 49 52 29 2f 73 68 65 6c 6c 2e 6f 20 3c 3c 3c 4e  IR)/shell.o <<<N
2b40: 45 58 54 5f 4c 49 4e 45 3e 3e 3e 0a 20 24 28 4f  EXT_LINE>>>. $(O
2b50: 42 4a 44 49 52 29 2f 74 68 2e 6f 20 3c 3c 3c 4e  BJDIR)/th.o <<<N
2b60: 45 58 54 5f 4c 49 4e 45 3e 3e 3e 0a 20 24 28 4f  EXT_LINE>>>. $(O
2b70: 42 4a 44 49 52 29 2f 74 68 5f 6c 61 6e 67 2e 6f  BJDIR)/th_lang.o
2b80: 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e 45 3e 3e 3e   <<<NEXT_LINE>>>
2b90: 0a 20 24 28 4f 42 4a 44 49 52 29 2f 74 68 5f 74  . $(OBJDIR)/th_t
2ba0: 63 6c 2e 6f 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e  cl.o <<<NEXT_LIN
2bb0: 45 3e 3e 3e 0a 20 24 28 4f 42 4a 44 49 52 29 2f  E>>>. $(OBJDIR)/
2bc0: 63 73 6f 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f  cson_amalgamatio
2bd0: 6e 2e 6f 0a 7d 5d 0a 0a 77 72 69 74 65 6c 6e 20  n.o.}]..writeln 
2be0: 7b 0a 24 28 41 50 50 4e 41 4d 45 29 3a 09 24 28  {.$(APPNAME):.$(
2bf0: 4f 42 4a 44 49 52 29 2f 68 65 61 64 65 72 73 20  OBJDIR)/headers 
2c00: 24 28 4f 42 4a 44 49 52 29 2f 63 6f 64 65 63 68  $(OBJDIR)/codech
2c10: 65 63 6b 31 20 24 28 45 58 54 52 41 4f 42 4a 29  eck1 $(EXTRAOBJ)
2c20: 20 24 28 4f 42 4a 29 0a 09 24 28 4f 42 4a 44 49   $(OBJ)..$(OBJDI
2c30: 52 29 2f 63 6f 64 65 63 68 65 63 6b 31 20 24 28  R)/codecheck1 $(
2c40: 54 52 41 4e 53 5f 53 52 43 29 0a 09 24 28 54 43  TRANS_SRC)..$(TC
2c50: 43 29 20 24 28 54 43 43 46 4c 41 47 53 29 20 2d  C) $(TCCFLAGS) -
2c60: 6f 20 24 28 41 50 50 4e 41 4d 45 29 20 24 28 45  o $(APPNAME) $(E
2c70: 58 54 52 41 4f 42 4a 29 20 24 28 4f 42 4a 29 20  XTRAOBJ) $(OBJ) 
2c80: 24 28 4c 49 42 29 0a 0a 23 20 54 68 69 73 20 72  $(LIB)..# This r
2c90: 75 6c 65 20 70 72 65 76 65 6e 74 73 20 6d 61 6b  ule prevents mak
2ca0: 65 20 66 72 6f 6d 20 75 73 69 6e 67 20 69 74 73  e from using its
2cb0: 20 64 65 66 61 75 6c 74 20 72 75 6c 65 73 20 74   default rules t
2cc0: 6f 20 74 72 79 20 62 75 69 6c 64 0a 23 20 61 6e  o try build.# an
2cd0: 20 65 78 65 63 75 74 61 62 6c 65 20 6e 61 6d 65   executable name
2ce0: 64 20 22 6d 61 6e 69 66 65 73 74 22 20 6f 75 74  d "manifest" out
2cf0: 20 6f 66 20 74 68 65 20 66 69 6c 65 20 6e 61 6d   of the file nam
2d00: 65 64 20 22 6d 61 6e 69 66 65 73 74 2e 63 22 0a  ed "manifest.c".
2d10: 23 0a 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d  #.$(SRCDIR)/../m
2d20: 61 6e 69 66 65 73 74 3a 0a 09 23 20 6e 6f 6f 70  anifest:..# noop
2d30: 0a 0a 63 6c 65 61 6e 3a 0a 09 2d 72 6d 20 2d 72  ..clean:..-rm -r
2d40: 66 20 24 28 4f 42 4a 44 49 52 29 2f 2a 20 24 28  f $(OBJDIR)/* $(
2d50: 41 50 50 4e 41 4d 45 29 0a 0a 7d 0a 0a 73 65 74  APPNAME)..}..set
2d60: 20 6d 68 61 72 67 73 20 7b 7d 0a 66 6f 72 65 61   mhargs {}.forea
2d70: 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63  ch s [lsort $src
2d80: 5d 20 7b 0a 20 20 61 70 70 65 6e 64 20 6d 68 61  ] {.  append mha
2d90: 72 67 73 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f  rgs "\$(OBJDIR)/
2da0: 24 7b 73 7d 5f 2e 63 3a 5c 24 28 4f 42 4a 44 49  ${s}_.c:\$(OBJDI
2db0: 52 29 2f 24 73 2e 68 20 3c 3c 3c 4e 45 58 54 5f  R)/$s.h <<<NEXT_
2dc0: 4c 49 4e 45 3e 3e 3e 22 0a 20 20 73 65 74 20 65  LINE>>>".  set e
2dd0: 78 74 72 61 5f 68 28 24 73 29 20 7b 20 7d 0a 7d  xtra_h($s) { }.}
2de0: 0a 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22  .append mhargs "
2df0: 5c 24 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74  \$(SRCDIR)/sqlit
2e00: 65 33 2e 68 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e  e3.h <<<NEXT_LIN
2e10: 45 3e 3e 3e 22 0a 61 70 70 65 6e 64 20 6d 68 61  E>>>".append mha
2e20: 72 67 73 20 22 5c 24 28 53 52 43 44 49 52 29 2f  rgs "\$(SRCDIR)/
2e30: 74 68 2e 68 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e  th.h <<<NEXT_LIN
2e40: 45 3e 3e 3e 22 0a 23 61 70 70 65 6e 64 20 6d 68  E>>>".#append mh
2e50: 61 72 67 73 20 22 5c 24 28 53 52 43 44 49 52 29  args "\$(SRCDIR)
2e60: 2f 63 73 6f 6e 5f 61 6d 61 6c 67 61 6d 61 74 69  /cson_amalgamati
2e70: 6f 6e 2e 68 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e  on.h <<<NEXT_LIN
2e80: 45 3e 3e 3e 22 0a 61 70 70 65 6e 64 20 6d 68 61  E>>>".append mha
2e90: 72 67 73 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f  rgs "\$(OBJDIR)/
2ea0: 56 45 52 53 49 4f 4e 2e 68 20 22 0a 73 65 74 20  VERSION.h ".set 
2eb0: 6d 68 61 72 67 73 20 5b 73 74 72 69 6e 67 20 6d  mhargs [string m
2ec0: 61 70 20 5b 6c 69 73 74 20 3c 3c 3c 4e 45 58 54  ap [list <<<NEXT
2ed0: 5f 4c 49 4e 45 3e 3e 3e 20 5c 5c 5c 6e 5c 74 5d  _LINE>>> \\\n\t]
2ee0: 20 24 6d 68 61 72 67 73 5d 0a 77 72 69 74 65 6c   $mhargs].writel
2ef0: 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f 70 61  n "\$(OBJDIR)/pa
2f00: 67 65 5f 69 6e 64 65 78 2e 68 3a 20 5c 24 28 54  ge_index.h: \$(T
2f10: 52 41 4e 53 5f 53 52 43 29 20 5c 24 28 4f 42 4a  RANS_SRC) \$(OBJ
2f20: 44 49 52 29 2f 6d 6b 69 6e 64 65 78 22 0a 77 72  DIR)/mkindex".wr
2f30: 69 74 65 6c 6e 20 22 5c 74 5c 24 28 4f 42 4a 44  iteln "\t\$(OBJD
2f40: 49 52 29 2f 6d 6b 69 6e 64 65 78 20 5c 24 28 54  IR)/mkindex \$(T
2f50: 52 41 4e 53 5f 53 52 43 29 20 3e 5c 24 40 5c 6e  RANS_SRC) >\$@\n
2f60: 22 0a 0a 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f  "..writeln "\$(O
2f70: 42 4a 44 49 52 29 2f 62 75 69 6c 74 69 6e 5f 64  BJDIR)/builtin_d
2f80: 61 74 61 2e 68 3a 20 5c 24 28 4f 42 4a 44 49 52  ata.h: \$(OBJDIR
2f90: 29 2f 6d 6b 62 75 69 6c 74 69 6e 20 5c 24 28 45  )/mkbuiltin \$(E
2fa0: 58 54 52 41 5f 46 49 4c 45 53 29 22 0a 77 72 69  XTRA_FILES)".wri
2fb0: 74 65 6c 6e 20 22 5c 74 5c 24 28 4f 42 4a 44 49  teln "\t\$(OBJDI
2fc0: 52 29 2f 6d 6b 62 75 69 6c 74 69 6e 20 2d 2d 70  R)/mkbuiltin --p
2fd0: 72 65 66 69 78 20 5c 24 28 53 52 43 44 49 52 29  refix \$(SRCDIR)
2fe0: 2f 20 5c 24 28 45 58 54 52 41 5f 46 49 4c 45 53  / \$(EXTRA_FILES
2ff0: 29 20 3e 5c 24 40 5c 6e 22 0a 0a 77 72 69 74 65  ) >\$@\n"..write
3000: 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f 68  ln "\$(OBJDIR)/h
3010: 65 61 64 65 72 73 3a 5c 74 5c 24 28 4f 42 4a 44  eaders:\t\$(OBJD
3020: 49 52 29 2f 70 61 67 65 5f 69 6e 64 65 78 2e 68  IR)/page_index.h
3030: 20 5c 24 28 4f 42 4a 44 49 52 29 2f 62 75 69 6c   \$(OBJDIR)/buil
3040: 74 69 6e 5f 64 61 74 61 2e 68 20 5c 24 28 4f 42  tin_data.h \$(OB
3050: 4a 44 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72  JDIR)/makeheader
3060: 73 20 5c 24 28 4f 42 4a 44 49 52 29 2f 56 45 52  s \$(OBJDIR)/VER
3070: 53 49 4f 4e 2e 68 22 0a 77 72 69 74 65 6c 6e 20  SION.h".writeln 
3080: 22 5c 74 5c 24 28 4f 42 4a 44 49 52 29 2f 6d 61  "\t\$(OBJDIR)/ma
3090: 6b 65 68 65 61 64 65 72 73 20 24 6d 68 61 72 67  keheaders $mharg
30a0: 73 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74 74 6f  s".writeln "\tto
30b0: 75 63 68 20 5c 24 28 4f 42 4a 44 49 52 29 2f 68  uch \$(OBJDIR)/h
30c0: 65 61 64 65 72 73 22 0a 77 72 69 74 65 6c 6e 20  eaders".writeln 
30d0: 22 5c 24 28 4f 42 4a 44 49 52 29 2f 68 65 61 64  "\$(OBJDIR)/head
30e0: 65 72 73 3a 20 4d 61 6b 65 66 69 6c 65 22 0a 77  ers: Makefile".w
30f0: 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49  riteln "\$(OBJDI
3100: 52 29 2f 6a 73 6f 6e 2e 6f 20 5c 24 28 4f 42 4a  R)/json.o \$(OBJ
3110: 44 49 52 29 2f 6a 73 6f 6e 5f 61 72 74 69 66 61  DIR)/json_artifa
3120: 63 74 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f  ct.o \$(OBJDIR)/
3130: 6a 73 6f 6e 5f 62 72 61 6e 63 68 2e 6f 20 5c 24  json_branch.o \$
3140: 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 63 6f  (OBJDIR)/json_co
3150: 6e 66 69 67 2e 6f 20 5c 24 28 4f 42 4a 44 49 52  nfig.o \$(OBJDIR
3160: 29 2f 6a 73 6f 6e 5f 64 69 66 66 2e 6f 20 5c 24  )/json_diff.o \$
3170: 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 64 69  (OBJDIR)/json_di
3180: 72 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f 6a  r.o \$(OBJDIR)/j
3190: 73 6f 6e 5f 66 69 6e 66 6f 2e 6f 20 5c 24 28 4f  son_finfo.o \$(O
31a0: 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 6c 6f 67 69  BJDIR)/json_logi
31b0: 6e 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f 6a  n.o \$(OBJDIR)/j
31c0: 73 6f 6e 5f 71 75 65 72 79 2e 6f 20 5c 24 28 4f  son_query.o \$(O
31d0: 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 72 65 70 6f  BJDIR)/json_repo
31e0: 72 74 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f  rt.o \$(OBJDIR)/
31f0: 6a 73 6f 6e 5f 73 74 61 74 75 73 2e 6f 20 5c 24  json_status.o \$
3200: 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 74 61  (OBJDIR)/json_ta
3210: 67 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f 6a  g.o \$(OBJDIR)/j
3220: 73 6f 6e 5f 74 69 6d 65 6c 69 6e 65 2e 6f 20 5c  son_timeline.o \
3230: 24 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 75  $(OBJDIR)/json_u
3240: 73 65 72 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29  ser.o \$(OBJDIR)
3250: 2f 6a 73 6f 6e 5f 77 69 6b 69 2e 6f 20 3a 20 5c  /json_wiki.o : \
3260: 24 28 53 52 43 44 49 52 29 2f 6a 73 6f 6e 5f 64  $(SRCDIR)/json_d
3270: 65 74 61 69 6c 2e 68 22 0a 0a 77 72 69 74 65 6c  etail.h"..writel
3280: 6e 20 22 4d 61 6b 65 66 69 6c 65 3a 22 0a 73 65  n "Makefile:".se
3290: 74 20 65 78 74 72 61 5f 68 28 64 69 73 70 61 74  t extra_h(dispat
32a0: 63 68 29 20 22 20 5c 24 28 4f 42 4a 44 49 52 29  ch) " \$(OBJDIR)
32b0: 2f 70 61 67 65 5f 69 6e 64 65 78 2e 68 20 22 0a  /page_index.h ".
32c0: 73 65 74 20 65 78 74 72 61 5f 68 28 62 75 69 6c  set extra_h(buil
32d0: 74 69 6e 29 20 22 20 5c 24 28 4f 42 4a 44 49 52  tin) " \$(OBJDIR
32e0: 29 2f 62 75 69 6c 74 69 6e 5f 64 61 74 61 2e 68  )/builtin_data.h
32f0: 20 22 0a 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c   "..foreach s [l
3300: 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 77  sort $src] {.  w
3310: 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49  riteln "\$(OBJDI
3320: 52 29 2f 24 7b 73 7d 5f 2e 63 3a 5c 74 5c 24 28  R)/${s}_.c:\t\$(
3330: 53 52 43 44 49 52 29 2f 24 73 2e 63 20 5c 24 28  SRCDIR)/$s.c \$(
3340: 4f 42 4a 44 49 52 29 2f 74 72 61 6e 73 6c 61 74  OBJDIR)/translat
3350: 65 22 0a 20 20 77 72 69 74 65 6c 6e 20 22 5c 74  e".  writeln "\t
3360: 5c 24 28 4f 42 4a 44 49 52 29 2f 74 72 61 6e 73  \$(OBJDIR)/trans
3370: 6c 61 74 65 20 5c 24 28 53 52 43 44 49 52 29 2f  late \$(SRCDIR)/
3380: 24 73 2e 63 20 3e 5c 24 40 5c 6e 22 0a 20 20 77  $s.c >\$@\n".  w
3390: 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49  riteln "\$(OBJDI
33a0: 52 29 2f 24 73 2e 6f 3a 5c 74 5c 24 28 4f 42 4a  R)/$s.o:\t\$(OBJ
33b0: 44 49 52 29 2f 24 7b 73 7d 5f 2e 63 20 5c 24 28  DIR)/${s}_.c \$(
33c0: 4f 42 4a 44 49 52 29 2f 24 73 2e 68 24 65 78 74  OBJDIR)/$s.h$ext
33d0: 72 61 5f 68 28 24 73 29 5c 24 28 53 52 43 44 49  ra_h($s)\$(SRCDI
33e0: 52 29 2f 63 6f 6e 66 69 67 2e 68 22 0a 20 20 77  R)/config.h".  w
33f0: 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 58 54 43  riteln "\t\$(XTC
3400: 43 29 20 2d 6f 20 5c 24 28 4f 42 4a 44 49 52 29  C) -o \$(OBJDIR)
3410: 2f 24 73 2e 6f 20 2d 63 20 5c 24 28 4f 42 4a 44  /$s.o -c \$(OBJD
3420: 49 52 29 2f 24 7b 73 7d 5f 2e 63 5c 6e 22 0a 20  IR)/${s}_.c\n". 
3430: 20 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a   writeln "\$(OBJ
3440: 44 49 52 29 2f 24 73 2e 68 3a 5c 74 5c 24 28 4f  DIR)/$s.h:\t\$(O
3450: 42 4a 44 49 52 29 2f 68 65 61 64 65 72 73 5c 6e  BJDIR)/headers\n
3460: 22 0a 7d 0a 0a 77 72 69 74 65 6c 6e 20 22 5c 24  ".}..writeln "\$
3470: 28 4f 42 4a 44 49 52 29 2f 73 71 6c 69 74 65 33  (OBJDIR)/sqlite3
3480: 2e 6f 3a 5c 74 5c 24 28 53 51 4c 49 54 45 33 5f  .o:\t\$(SQLITE3_
3490: 53 52 43 29 22 0a 77 72 69 74 65 6c 6e 20 22 5c  SRC)".writeln "\
34a0: 74 5c 24 28 58 54 43 43 29 20 5c 24 28 53 51 4c  t\$(XTCC) \$(SQL
34b0: 49 54 45 5f 4f 50 54 49 4f 4e 53 29 20 5c 24 28  ITE_OPTIONS) \$(
34c0: 53 51 4c 49 54 45 5f 43 46 4c 41 47 53 29 20 5c  SQLITE_CFLAGS) \
34d0: 24 28 53 45 45 5f 46 4c 41 47 53 29 20 5c 5c 22  $(SEE_FLAGS) \\"
34e0: 0a 77 72 69 74 65 6c 6e 20 22 5c 74 5c 74 2d 63  .writeln "\t\t-c
34f0: 20 5c 24 28 53 51 4c 49 54 45 33 5f 53 52 43 29   \$(SQLITE3_SRC)
3500: 20 2d 6f 20 5c 24 40 22 0a 0a 77 72 69 74 65 6c   -o \$@"..writel
3510: 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f 73 68  n "\$(OBJDIR)/sh
3520: 65 6c 6c 2e 6f 3a 5c 74 5c 24 28 53 51 4c 49 54  ell.o:\t\$(SQLIT
3530: 45 33 5f 53 48 45 4c 4c 5f 53 52 43 29 20 5c 24  E3_SHELL_SRC) \$
3540: 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33  (SRCDIR)/sqlite3
3550: 2e 68 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74 5c  .h".writeln "\t\
3560: 24 28 58 54 43 43 29 20 5c 24 28 53 48 45 4c 4c  $(XTCC) \$(SHELL
3570: 5f 4f 50 54 49 4f 4e 53 29 20 5c 24 28 53 48 45  _OPTIONS) \$(SHE
3580: 4c 4c 5f 43 46 4c 41 47 53 29 20 5c 24 28 53 45  LL_CFLAGS) \$(SE
3590: 45 5f 46 4c 41 47 53 29 20 5c 24 28 4c 49 4e 45  E_FLAGS) \$(LINE
35a0: 4e 4f 49 53 45 5f 44 45 46 2e 5c 24 28 55 53 45  NOISE_DEF.\$(USE
35b0: 5f 4c 49 4e 45 4e 4f 49 53 45 29 29 20 2d 63 20  _LINENOISE)) -c 
35c0: 5c 24 28 53 51 4c 49 54 45 33 5f 53 48 45 4c 4c  \$(SQLITE3_SHELL
35d0: 5f 53 52 43 29 20 2d 6f 20 5c 24 40 5c 6e 22 0a  _SRC) -o \$@\n".
35e0: 0a 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a  .writeln "\$(OBJ
35f0: 44 49 52 29 2f 6c 69 6e 65 6e 6f 69 73 65 2e 6f  DIR)/linenoise.o
3600: 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 6c 69  :\t\$(SRCDIR)/li
3610: 6e 65 6e 6f 69 73 65 2e 63 20 5c 24 28 53 52 43  nenoise.c \$(SRC
3620: 44 49 52 29 2f 6c 69 6e 65 6e 6f 69 73 65 2e 68  DIR)/linenoise.h
3630: 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28  ".writeln "\t\$(
3640: 58 54 43 43 29 20 2d 63 20 5c 24 28 53 52 43 44  XTCC) -c \$(SRCD
3650: 49 52 29 2f 6c 69 6e 65 6e 6f 69 73 65 2e 63 20  IR)/linenoise.c 
3660: 2d 6f 20 5c 24 40 5c 6e 22 0a 0a 77 72 69 74 65  -o \$@\n"..write
3670: 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f 74  ln "\$(OBJDIR)/t
3680: 68 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49 52 29  h.o:\t\$(SRCDIR)
3690: 2f 74 68 2e 63 22 0a 77 72 69 74 65 6c 6e 20 22  /th.c".writeln "
36a0: 5c 74 5c 24 28 58 54 43 43 29 20 2d 63 20 5c 24  \t\$(XTCC) -c \$
36b0: 28 53 52 43 44 49 52 29 2f 74 68 2e 63 20 2d 6f  (SRCDIR)/th.c -o
36c0: 20 5c 24 40 5c 6e 22 0a 0a 77 72 69 74 65 6c 6e   \$@\n"..writeln
36d0: 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f 74 68 5f   "\$(OBJDIR)/th_
36e0: 6c 61 6e 67 2e 6f 3a 5c 74 5c 24 28 53 52 43 44  lang.o:\t\$(SRCD
36f0: 49 52 29 2f 74 68 5f 6c 61 6e 67 2e 63 22 0a 77  IR)/th_lang.c".w
3700: 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 58 54 43  riteln "\t\$(XTC
3710: 43 29 20 2d 63 20 5c 24 28 53 52 43 44 49 52 29  C) -c \$(SRCDIR)
3720: 2f 74 68 5f 6c 61 6e 67 2e 63 20 2d 6f 20 5c 24  /th_lang.c -o \$
3730: 40 5c 6e 22 0a 0a 77 72 69 74 65 6c 6e 20 22 5c  @\n"..writeln "\
3740: 24 28 4f 42 4a 44 49 52 29 2f 74 68 5f 74 63 6c  $(OBJDIR)/th_tcl
3750: 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f  .o:\t\$(SRCDIR)/
3760: 74 68 5f 74 63 6c 2e 63 22 0a 77 72 69 74 65 6c  th_tcl.c".writel
3770: 6e 20 22 5c 74 5c 24 28 58 54 43 43 29 20 2d 63  n "\t\$(XTCC) -c
3780: 20 5c 24 28 53 52 43 44 49 52 29 2f 74 68 5f 74   \$(SRCDIR)/th_t
3790: 63 6c 2e 63 20 2d 6f 20 5c 24 40 5c 6e 22 0a 0a  cl.c -o \$@\n"..
37a0: 77 72 69 74 65 6c 6e 20 7b 0a 24 28 4f 42 4a 44  writeln {.$(OBJD
37b0: 49 52 29 2f 6d 69 6e 69 7a 2e 6f 3a 09 24 28 53  IR)/miniz.o:.$(S
37c0: 52 43 44 49 52 29 2f 6d 69 6e 69 7a 2e 63 0a 09  RCDIR)/miniz.c..
37d0: 24 28 58 54 43 43 29 20 24 28 4d 49 4e 49 5a 5f  $(XTCC) $(MINIZ_
37e0: 4f 50 54 49 4f 4e 53 29 20 2d 63 20 24 28 53 52  OPTIONS) -c $(SR
37f0: 43 44 49 52 29 2f 6d 69 6e 69 7a 2e 63 20 2d 6f  CDIR)/miniz.c -o
3800: 20 24 40 0a 0a 24 28 4f 42 4a 44 49 52 29 2f 63   $@..$(OBJDIR)/c
3810: 73 6f 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f 6e  son_amalgamation
3820: 2e 6f 3a 20 24 28 53 52 43 44 49 52 29 2f 63 73  .o: $(SRCDIR)/cs
3830: 6f 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f 6e 2e  on_amalgamation.
3840: 63 0a 09 24 28 58 54 43 43 29 20 2d 63 20 24 28  c..$(XTCC) -c $(
3850: 53 52 43 44 49 52 29 2f 63 73 6f 6e 5f 61 6d 61  SRCDIR)/cson_ama
3860: 6c 67 61 6d 61 74 69 6f 6e 2e 63 20 2d 6f 20 24  lgamation.c -o $
3870: 40 0a 0a 23 0a 23 20 54 68 65 20 6c 69 73 74 20  @..#.# The list 
3880: 6f 66 20 61 6c 6c 20 74 68 65 20 74 61 72 67 65  of all the targe
3890: 74 73 20 74 68 61 74 20 64 6f 20 6e 6f 74 20 63  ts that do not c
38a0: 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 72 65 61  orrespond to rea
38b0: 6c 20 66 69 6c 65 73 2e 20 54 68 69 73 20 73 74  l files. This st
38c0: 6f 70 73 0a 23 20 27 6d 61 6b 65 27 20 66 72 6f  ops.# 'make' fro
38d0: 6d 20 67 65 74 74 69 6e 67 20 63 6f 6e 66 75 73  m getting confus
38e0: 65 64 20 77 68 65 6e 20 73 6f 6d 65 6f 6e 65 20  ed when someone 
38f0: 6d 61 6b 65 73 20 61 6e 20 65 72 72 6f 72 20 69  makes an error i
3900: 6e 20 61 20 72 75 6c 65 2e 0a 23 0a 0a 2e 50 48  n a rule..#...PH
3910: 4f 4e 59 3a 20 61 6c 6c 20 69 6e 73 74 61 6c 6c  ONY: all install
3920: 20 74 65 73 74 20 63 6c 65 61 6e 0a 7d 0a 0a 63   test clean.}..c
3930: 6c 6f 73 65 20 24 6f 75 74 70 75 74 5f 66 69 6c  lose $output_fil
3940: 65 0a 23 0a 23 20 45 6e 64 20 6f 66 20 74 68 65  e.#.# End of the
3950: 20 6d 61 69 6e 2e 6d 6b 20 6f 75 74 70 75 74 0a   main.mk output.
3960: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3970: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3980: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3990: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
39a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23  ##############.#
39b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
39c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
39d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
39e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
39f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 23  #############.##
3a00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3a10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3a20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3a30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3a40: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 42  ############.# B
3a50: 65 67 69 6e 20 77 69 6e 2f 4d 61 6b 65 66 69 6c  egin win/Makefil
3a60: 65 2e 6d 69 6e 67 77 20 6f 75 74 70 75 74 0a 23  e.mingw output.#
3a70: 0a 70 75 74 73 20 22 62 75 69 6c 64 69 6e 67 20  .puts "building 
3a80: 2e 2e 2f 77 69 6e 2f 4d 61 6b 65 66 69 6c 65 2e  ../win/Makefile.
3a90: 6d 69 6e 67 77 22 0a 73 65 74 20 6f 75 74 70 75  mingw".set outpu
3aa0: 74 5f 66 69 6c 65 20 5b 6f 70 65 6e 20 2e 2e 2f  t_file [open ../
3ab0: 77 69 6e 2f 4d 61 6b 65 66 69 6c 65 2e 6d 69 6e  win/Makefile.min
3ac0: 67 77 20 77 5d 0a 66 63 6f 6e 66 69 67 75 72 65  gw w].fconfigure
3ad0: 20 24 6f 75 74 70 75 74 5f 66 69 6c 65 20 2d 74   $output_file -t
3ae0: 72 61 6e 73 6c 61 74 69 6f 6e 20 62 69 6e 61 72  ranslation binar
3af0: 79 0a 0a 77 72 69 74 65 6c 6e 20 7b 23 21 2f 75  y..writeln {#!/u
3b00: 73 72 2f 62 69 6e 2f 6d 61 6b 65 0a 23 0a 23 23  sr/bin/make.#.##
3b10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3b20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3b30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3b40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3b50: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 57  ############.# W
3b60: 41 52 4e 49 4e 47 3a 20 44 4f 20 4e 4f 54 20 45  ARNING: DO NOT E
3b70: 44 49 54 2c 20 41 55 54 4f 4d 41 54 49 43 41 4c  DIT, AUTOMATICAL
3b80: 4c 59 20 47 45 4e 45 52 41 54 45 44 20 46 49 4c  LY GENERATED FIL
3b90: 45 20 28 53 45 45 20 22 73 72 63 2f 6d 61 6b 65  E (SEE "src/make
3ba0: 6d 61 6b 65 2e 74 63 6c 22 29 0a 23 23 23 23 23  make.tcl").#####
3bb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3bc0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3bd0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3be0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
3bf0: 23 23 23 23 23 23 23 23 23 0a 23 0a 23 20 54 68  #########.#.# Th
3c00: 69 73 20 66 69 6c 65 20 69 73 20 61 75 74 6f 6d  is file is autom
3c10: 61 74 69 63 61 6c 6c 79 20 67 65 6e 65 72 61 74  atically generat
3c20: 65 64 2e 20 20 49 6e 73 74 65 61 64 20 6f 66 20  ed.  Instead of 
3c30: 65 64 69 74 69 6e 67 20 74 68 69 73 0a 23 20 66  editing this.# f
3c40: 69 6c 65 2c 20 65 64 69 74 20 22 6d 61 6b 65 6d  ile, edit "makem
3c50: 61 6b 65 2e 74 63 6c 22 20 74 68 65 6e 20 72 75  ake.tcl" then ru
3c60: 6e 20 22 74 63 6c 73 68 20 6d 61 6b 65 6d 61 6b  n "tclsh makemak
3c70: 65 2e 74 63 6c 22 0a 23 20 74 6f 20 72 65 67 65  e.tcl".# to rege
3c80: 6e 65 72 61 74 65 20 74 68 69 73 20 66 69 6c 65  nerate this file
3c90: 2e 0a 23 0a 23 20 54 68 69 73 20 69 73 20 61 20  ..#.# This is a 
3ca0: 6d 61 6b 65 66 69 6c 65 20 66 6f 72 20 75 73 65  makefile for use
3cb0: 20 6f 6e 20 43 79 67 77 69 6e 2f 44 61 72 77 69   on Cygwin/Darwi
3cc0: 6e 2f 46 72 65 65 42 53 44 2f 4c 69 6e 75 78 2f  n/FreeBSD/Linux/
3cd0: 57 69 6e 64 6f 77 73 20 75 73 69 6e 67 0a 23 20  Windows using.# 
3ce0: 4d 69 6e 47 57 20 6f 72 20 4d 69 6e 47 57 2d 77  MinGW or MinGW-w
3cf0: 36 34 2e 0a 23 0a 23 20 53 6f 6d 65 20 6f 66 20  64..#.# Some of 
3d00: 74 68 65 20 73 70 65 63 69 61 6c 20 6f 70 74 69  the special opti
3d10: 6f 6e 73 20 77 68 69 63 68 20 63 61 6e 20 62 65  ons which can be
3d20: 20 70 61 73 73 65 64 20 74 6f 20 6d 61 6b 65 0a   passed to make.
3d30: 23 20 20 20 55 53 45 5f 57 49 4e 44 4f 57 53 3d  #   USE_WINDOWS=
3d40: 31 20 20 20 20 69 66 20 62 75 69 6c 64 69 6e 67  1    if building
3d50: 20 75 6e 64 65 72 20 61 20 77 69 6e 64 6f 77 73   under a windows
3d60: 20 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 0a   command prompt.
3d70: 23 20 20 20 58 36 34 3d 31 20 20 20 20 20 20 20  #   X64=1       
3d80: 20 20 20 20 20 69 66 20 75 73 69 6e 67 20 61 6e       if using an
3d90: 20 75 6e 70 72 65 66 69 78 65 64 20 36 34 2d 62   unprefixed 64-b
3da0: 69 74 20 6d 69 6e 67 77 20 63 6f 6d 70 69 6c 65  it mingw compile
3db0: 72 0a 23 0a 0a 23 23 23 23 20 53 65 6c 65 63 74  r.#..#### Select
3dc0: 20 6f 6e 65 20 6f 66 20 4d 69 6e 47 57 2c 20 4d   one of MinGW, M
3dd0: 69 6e 47 57 2d 77 36 34 20 28 33 32 2d 62 69 74  inGW-w64 (32-bit
3de0: 29 20 6f 72 20 4d 69 6e 47 57 2d 77 36 34 20 28  ) or MinGW-w64 (
3df0: 36 34 2d 62 69 74 29 20 63 6f 6d 70 69 6c 65 72  64-bit) compiler
3e00: 73 2e 0a 23 20 20 20 20 42 79 20 64 65 66 61 75  s..#    By defau
3e10: 6c 74 2c 20 74 68 69 73 20 69 73 20 61 6e 20 65  lt, this is an e
3e20: 6d 70 74 79 20 73 74 72 69 6e 67 20 28 69 2e 65  mpty string (i.e
3e30: 2e 20 75 73 65 20 74 68 65 20 6e 61 74 69 76 65  . use the native
3e40: 20 63 6f 6d 70 69 6c 65 72 29 2e 0a 23 0a 50 52   compiler)..#.PR
3e50: 45 46 49 58 20 3d 0a 23 20 50 52 45 46 49 58 20  EFIX =.# PREFIX 
3e60: 3d 20 6d 69 6e 67 77 33 32 2d 0a 23 20 50 52 45  = mingw32-.# PRE
3e70: 46 49 58 20 3d 20 69 36 38 36 2d 70 63 2d 6d 69  FIX = i686-pc-mi
3e80: 6e 67 77 33 32 2d 0a 23 20 50 52 45 46 49 58 20  ngw32-.# PREFIX 
3e90: 3d 20 69 36 38 36 2d 77 36 34 2d 6d 69 6e 67 77  = i686-w64-mingw
3ea0: 33 32 2d 0a 23 20 50 52 45 46 49 58 20 3d 20 78  32-.# PREFIX = x
3eb0: 38 36 5f 36 34 2d 77 36 34 2d 6d 69 6e 67 77 33  86_64-w64-mingw3
3ec0: 32 2d 0a 0a 23 23 23 23 20 54 68 65 20 74 6f 70  2-..#### The top
3ed0: 6c 65 76 65 6c 20 64 69 72 65 63 74 6f 72 79 20  level directory 
3ee0: 6f 66 20 74 68 65 20 73 6f 75 72 63 65 20 74 72  of the source tr
3ef0: 65 65 2e 20 20 46 6f 73 73 69 6c 20 63 61 6e 20  ee.  Fossil can 
3f00: 62 65 20 62 75 69 6c 74 0a 23 20 20 20 20 69 6e  be built.#    in
3f10: 20 61 20 64 69 72 65 63 74 6f 72 79 20 74 68 61   a directory tha
3f20: 74 20 69 73 20 73 65 70 61 72 61 74 65 20 66 72  t is separate fr
3f30: 6f 6d 20 74 68 65 20 73 6f 75 72 63 65 20 74 72  om the source tr
3f40: 65 65 2e 20 20 4a 75 73 74 20 63 68 61 6e 67 65  ee.  Just change
3f50: 0a 23 20 20 20 20 74 68 65 20 66 6f 6c 6c 6f 77  .#    the follow
3f60: 69 6e 67 20 74 6f 20 70 6f 69 6e 74 20 66 72 6f  ing to point fro
3f70: 6d 20 74 68 65 20 62 75 69 6c 64 20 64 69 72 65  m the build dire
3f80: 63 74 6f 72 79 20 74 6f 20 74 68 65 20 73 72 63  ctory to the src
3f90: 2f 20 66 6f 6c 64 65 72 2e 0a 23 0a 53 52 43 44  / folder..#.SRCD
3fa0: 49 52 20 3d 20 73 72 63 0a 0a 23 23 23 23 20 54  IR = src..#### T
3fb0: 68 65 20 64 69 72 65 63 74 6f 72 79 20 69 6e 74  he directory int
3fc0: 6f 20 77 68 69 63 68 20 6f 62 6a 65 63 74 20 63  o which object c
3fd0: 6f 64 65 20 66 69 6c 65 73 20 73 68 6f 75 6c 64  ode files should
3fe0: 20 62 65 20 77 72 69 74 74 65 6e 2e 0a 23 0a 4f   be written..#.O
3ff0: 42 4a 44 49 52 20 3d 20 77 62 6c 64 0a 0a 23 23  BJDIR = wbld..##
4000: 23 23 20 43 20 63 6f 6d 70 69 6c 65 72 20 66 6f  ## C compiler fo
4010: 72 20 75 73 65 20 69 6e 20 62 75 69 6c 64 69 6e  r use in buildin
4020: 67 20 65 78 65 63 75 74 61 62 6c 65 73 20 74 68  g executables th
4030: 61 74 20 77 69 6c 6c 20 72 75 6e 20 6f 6e 0a 23  at will run on.#
4040: 20 20 20 20 74 68 65 20 70 6c 61 74 66 6f 72 6d      the platform
4050: 20 74 68 61 74 20 69 73 20 64 6f 69 6e 67 20 74   that is doing t
4060: 68 65 20 62 75 69 6c 64 2e 20 20 54 68 69 73 20  he build.  This 
4070: 69 73 20 75 73 65 64 20 74 6f 20 63 6f 6d 70 69  is used to compi
4080: 6c 65 0a 23 20 20 20 20 63 6f 64 65 2d 67 65 6e  le.#    code-gen
4090: 65 72 61 74 6f 72 20 70 72 6f 67 72 61 6d 73 20  erator programs 
40a0: 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 62  as part of the b
40b0: 75 69 6c 64 20 70 72 6f 63 65 73 73 2e 20 20 53  uild process.  S
40c0: 65 65 20 54 43 43 0a 23 20 20 20 20 61 6e 64 20  ee TCC.#    and 
40d0: 54 43 43 45 58 45 20 62 65 6c 6f 77 20 66 6f 72  TCCEXE below for
40e0: 20 74 68 65 20 43 20 63 6f 6d 70 69 6c 65 72 20   the C compiler 
40f0: 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 74 68 65  for building the
4100: 20 66 69 6e 69 73 68 65 64 0a 23 20 20 20 20 62   finished.#    b
4110: 69 6e 61 72 79 2e 0a 23 0a 42 43 43 45 58 45 20  inary..#.BCCEXE 
4120: 3d 20 67 63 63 0a 0a 23 23 23 23 20 43 20 43 6f  = gcc..#### C Co
4130: 6d 70 69 6c 65 72 20 61 6e 64 20 6f 70 74 69 6f  mpiler and optio
4140: 6e 73 20 66 6f 72 20 75 73 65 20 69 6e 20 62 75  ns for use in bu
4150: 69 6c 64 69 6e 67 20 65 78 65 63 75 74 61 62 6c  ilding executabl
4160: 65 73 20 74 68 61 74 0a 23 20 20 20 20 77 69 6c  es that.#    wil
4170: 6c 20 72 75 6e 20 6f 6e 20 74 68 65 20 70 6c 61  l run on the pla
4180: 74 66 6f 72 6d 20 74 68 61 74 20 69 73 20 64 6f  tform that is do
4190: 69 6e 67 20 74 68 65 20 62 75 69 6c 64 2e 20 20  ing the build.  
41a0: 54 68 69 73 20 69 73 20 75 73 65 64 0a 23 20 20  This is used.#  
41b0: 20 20 74 6f 20 63 6f 6d 70 69 6c 65 20 63 6f 64    to compile cod
41c0: 65 2d 67 65 6e 65 72 61 74 6f 72 20 70 72 6f 67  e-generator prog
41d0: 72 61 6d 73 20 61 73 20 70 61 72 74 20 6f 66 20  rams as part of 
41e0: 74 68 65 20 62 75 69 6c 64 20 70 72 6f 63 65 73  the build proces
41f0: 73 2e 0a 23 20 20 20 20 53 65 65 20 54 43 43 20  s..#    See TCC 
4200: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 43 20  below for the C 
4210: 63 6f 6d 70 69 6c 65 72 20 66 6f 72 20 62 75 69  compiler for bui
4220: 6c 64 69 6e 67 20 74 68 65 20 66 69 6e 69 73 68  lding the finish
4230: 65 64 20 62 69 6e 61 72 79 2e 0a 23 0a 42 43 43  ed binary..#.BCC
4240: 20 3d 20 24 28 42 43 43 45 58 45 29 0a 0a 23 23   = $(BCCEXE)..##
4250: 23 23 20 45 6e 61 62 6c 65 20 63 6f 6d 70 69 6c  ## Enable compil
4260: 69 6e 67 20 77 69 74 68 20 64 65 62 75 67 20 73  ing with debug s
4270: 79 6d 62 6f 6c 73 20 28 6d 75 63 68 20 6c 61 72  ymbols (much lar
4280: 67 65 72 20 62 69 6e 61 72 79 29 0a 23 0a 23 20  ger binary).#.# 
4290: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 53 59  FOSSIL_ENABLE_SY
42a0: 4d 42 4f 4c 53 20 3d 20 31 0a 0a 23 23 23 23 20  MBOLS = 1..#### 
42b0: 45 6e 61 62 6c 65 20 4a 53 4f 4e 20 28 68 74 74  Enable JSON (htt
42c0: 70 3a 2f 2f 77 77 77 2e 6a 73 6f 6e 2e 6f 72 67  p://www.json.org
42d0: 29 20 73 75 70 70 6f 72 74 20 75 73 69 6e 67 20  ) support using 
42e0: 22 63 73 6f 6e 22 0a 23 0a 23 20 46 4f 53 53 49  "cson".#.# FOSSI
42f0: 4c 5f 45 4e 41 42 4c 45 5f 4a 53 4f 4e 20 3d 20  L_ENABLE_JSON = 
4300: 31 0a 0a 23 23 23 23 20 45 6e 61 62 6c 65 20 48  1..#### Enable H
4310: 54 54 50 53 20 73 75 70 70 6f 72 74 20 76 69 61  TTPS support via
4320: 20 4f 70 65 6e 53 53 4c 20 28 6c 69 6e 6b 73 20   OpenSSL (links 
4330: 74 6f 20 6c 69 62 73 73 6c 20 61 6e 64 20 6c 69  to libssl and li
4340: 62 63 72 79 70 74 6f 29 0a 23 0a 23 20 46 4f 53  bcrypto).#.# FOS
4350: 53 49 4c 5f 45 4e 41 42 4c 45 5f 53 53 4c 20 3d  SIL_ENABLE_SSL =
4360: 20 31 0a 0a 23 23 23 23 20 41 75 74 6f 6d 61 74   1..#### Automat
4370: 69 63 61 6c 6c 79 20 62 75 69 6c 64 20 4f 70 65  ically build Ope
4380: 6e 53 53 4c 20 77 68 65 6e 20 62 75 69 6c 64 69  nSSL when buildi
4390: 6e 67 20 46 6f 73 73 69 6c 20 28 63 61 75 73 65  ng Fossil (cause
43a0: 73 20 72 65 62 75 69 6c 64 0a 23 20 20 20 20 69  s rebuild.#    i
43b0: 73 73 75 65 73 20 77 68 65 6e 20 62 75 69 6c 64  ssues when build
43c0: 69 6e 67 20 69 6e 63 72 65 6d 65 6e 74 61 6c 6c  ing incrementall
43d0: 79 29 2e 0a 23 0a 23 20 46 4f 53 53 49 4c 5f 42  y)..#.# FOSSIL_B
43e0: 55 49 4c 44 5f 53 53 4c 20 3d 20 31 0a 0a 23 23  UILD_SSL = 1..##
43f0: 23 23 20 45 6e 61 62 6c 65 20 72 65 6c 61 74 69  ## Enable relati
4400: 76 65 20 70 61 74 68 73 20 69 6e 20 65 78 74 65  ve paths in exte
4410: 72 6e 61 6c 20 64 69 66 66 2f 67 64 69 66 66 0a  rnal diff/gdiff.
4420: 23 0a 23 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  #.# FOSSIL_ENABL
4430: 45 5f 45 58 45 43 5f 52 45 4c 5f 50 41 54 48 53  E_EXEC_REL_PATHS
4440: 20 3d 20 31 0a 0a 23 23 23 23 20 45 6e 61 62 6c   = 1..#### Enabl
4450: 65 20 54 48 31 20 73 63 72 69 70 74 73 20 69 6e  e TH1 scripts in
4460: 20 65 6d 62 65 64 64 65 64 20 64 6f 63 75 6d 65   embedded docume
4470: 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 0a 23 0a  ntation files.#.
4480: 23 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f  # FOSSIL_ENABLE_
4490: 54 48 31 5f 44 4f 43 53 20 3d 20 31 0a 0a 23 23  TH1_DOCS = 1..##
44a0: 23 23 20 45 6e 61 62 6c 65 20 68 6f 6f 6b 73 20  ## Enable hooks 
44b0: 66 6f 72 20 63 6f 6d 6d 61 6e 64 73 20 61 6e 64  for commands and
44c0: 20 77 65 62 20 70 61 67 65 73 20 76 69 61 20 54   web pages via T
44d0: 48 31 0a 23 0a 23 20 46 4f 53 53 49 4c 5f 45 4e  H1.#.# FOSSIL_EN
44e0: 41 42 4c 45 5f 54 48 31 5f 48 4f 4f 4b 53 20 3d  ABLE_TH1_HOOKS =
44f0: 20 31 0a 0a 23 23 23 23 20 45 6e 61 62 6c 65 20   1..#### Enable 
4500: 73 63 72 69 70 74 69 6e 67 20 73 75 70 70 6f 72  scripting suppor
4510: 74 20 76 69 61 20 54 63 6c 2f 54 6b 0a 23 0a 23  t via Tcl/Tk.#.#
4520: 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54   FOSSIL_ENABLE_T
4530: 43 4c 20 3d 20 31 0a 0a 23 23 23 23 20 4c 6f 61  CL = 1..#### Loa
4540: 64 20 54 63 6c 20 75 73 69 6e 67 20 74 68 65 20  d Tcl using the 
4550: 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 6d 65  stubs library me
4560: 63 68 61 6e 69 73 6d 0a 23 0a 23 20 46 4f 53 53  chanism.#.# FOSS
4570: 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 5f 53 54  IL_ENABLE_TCL_ST
4580: 55 42 53 20 3d 20 31 0a 0a 23 23 23 23 20 4c 6f  UBS = 1..#### Lo
4590: 61 64 20 54 63 6c 20 75 73 69 6e 67 20 74 68 65  ad Tcl using the
45a0: 20 70 72 69 76 61 74 65 20 73 74 75 62 73 20 6d   private stubs m
45b0: 65 63 68 61 6e 69 73 6d 0a 23 0a 23 20 46 4f 53  echanism.#.# FOS
45c0: 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 5f 50  SIL_ENABLE_TCL_P
45d0: 52 49 56 41 54 45 5f 53 54 55 42 53 20 3d 20 31  RIVATE_STUBS = 1
45e0: 0a 0a 23 23 23 23 20 55 73 65 20 27 73 79 73 74  ..#### Use 'syst
45f0: 65 6d 27 20 53 51 4c 69 74 65 0a 23 0a 23 20 55  em' SQLite.#.# U
4600: 53 45 5f 53 59 53 54 45 4d 5f 53 51 4c 49 54 45  SE_SYSTEM_SQLITE
4610: 20 3d 20 31 0a 0a 23 23 23 23 20 55 73 65 20 50   = 1..#### Use P
4620: 4f 53 49 58 20 6d 65 6d 6f 72 79 20 41 50 49 73  OSIX memory APIs
4630: 20 66 72 6f 6d 20 22 73 79 73 2f 6d 6d 61 6e 2e   from "sys/mman.
4640: 68 22 0a 23 0a 23 20 55 53 45 5f 4d 4d 41 4e 5f  h".#.# USE_MMAN_
4650: 48 20 3d 20 31 0a 0a 23 23 23 23 20 55 73 65 20  H = 1..#### Use 
4660: 74 68 65 20 53 51 4c 69 74 65 20 45 6e 63 72 79  the SQLite Encry
4670: 70 74 69 6f 6e 20 45 78 74 65 6e 73 69 6f 6e 0a  ption Extension.
4680: 23 0a 23 20 55 53 45 5f 53 45 45 20 3d 20 31 0a  #.# USE_SEE = 1.
4690: 0a 23 23 23 23 20 55 73 65 20 74 68 65 20 6d 69  .#### Use the mi
46a0: 6e 69 7a 20 63 6f 6d 70 72 65 73 73 69 6f 6e 20  niz compression 
46b0: 6c 69 62 72 61 72 79 0a 23 0a 23 20 46 4f 53 53  library.#.# FOSS
46c0: 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a 20  IL_ENABLE_MINIZ 
46d0: 3d 20 31 0a 0a 23 23 23 23 20 55 73 65 20 74 68  = 1..#### Use th
46e0: 65 20 54 63 6c 20 73 6f 75 72 63 65 20 64 69 72  e Tcl source dir
46f0: 65 63 74 6f 72 79 20 69 6e 73 74 65 61 64 20 6f  ectory instead o
4700: 66 20 74 68 65 20 69 6e 73 74 61 6c 6c 20 64 69  f the install di
4710: 72 65 63 74 6f 72 79 3f 0a 23 20 20 20 20 54 68  rectory?.#    Th
4720: 69 73 20 69 73 20 75 73 65 66 75 6c 20 77 68 65  is is useful whe
4730: 6e 20 54 63 6c 20 68 61 73 20 62 65 65 6e 20 63  n Tcl has been c
4740: 6f 6d 70 69 6c 65 64 20 73 74 61 74 69 63 61 6c  ompiled statical
4750: 6c 79 20 77 69 74 68 20 4d 69 6e 47 57 2e 0a 23  ly with MinGW..#
4760: 0a 46 4f 53 53 49 4c 5f 54 43 4c 5f 53 4f 55 52  .FOSSIL_TCL_SOUR
4770: 43 45 20 3d 20 31 0a 0a 23 23 23 23 20 43 68 65  CE = 1..#### Che
4780: 63 6b 20 69 66 20 74 68 65 20 77 6f 72 6b 61 72  ck if the workar
4790: 6f 75 6e 64 20 66 6f 72 20 74 68 65 20 4d 69 6e  ound for the Min
47a0: 47 57 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20  GW command line 
47b0: 68 61 6e 64 6c 69 6e 67 20 6e 65 65 64 73 20 74  handling needs t
47c0: 6f 0a 23 20 20 20 20 62 65 20 65 6e 61 62 6c 65  o.#    be enable
47d0: 64 20 62 79 20 64 65 66 61 75 6c 74 2e 20 20 54  d by default.  T
47e0: 68 69 73 20 63 68 65 63 6b 20 6d 61 79 20 62 65  his check may be
47f0: 20 73 6f 6d 65 77 68 61 74 20 66 72 61 67 69 6c   somewhat fragil
4800: 65 20 64 75 65 20 74 6f 20 74 68 65 0a 23 20 20  e due to the.#  
4810: 20 20 75 73 65 20 6f 66 20 22 66 69 6e 64 73 74    use of "findst
4820: 72 69 6e 67 22 2e 0a 23 0a 69 66 6e 64 65 66 20  ring"..#.ifndef 
4830: 4d 49 4e 47 57 5f 49 53 5f 33 32 42 49 54 5f 4f  MINGW_IS_32BIT_O
4840: 4e 4c 59 0a 69 66 65 71 20 28 2c 24 28 66 69 6e  NLY.ifeq (,$(fin
4850: 64 73 74 72 69 6e 67 20 77 36 34 2d 6d 69 6e 67  dstring w64-ming
4860: 77 33 32 2c 24 28 50 52 45 46 49 58 29 29 29 0a  w32,$(PREFIX))).
4870: 4d 49 4e 47 57 5f 49 53 5f 33 32 42 49 54 5f 4f  MINGW_IS_32BIT_O
4880: 4e 4c 59 20 3d 20 31 0a 65 6e 64 69 66 0a 65 6e  NLY = 1.endif.en
4890: 64 69 66 0a 0a 23 23 23 23 20 54 68 65 20 64 69  dif..#### The di
48a0: 72 65 63 74 6f 72 69 65 73 20 77 68 65 72 65 20  rectories where 
48b0: 74 68 65 20 7a 6c 69 62 20 69 6e 63 6c 75 64 65  the zlib include
48c0: 20 61 6e 64 20 6c 69 62 72 61 72 79 20 66 69 6c   and library fil
48d0: 65 73 20 61 72 65 20 6c 6f 63 61 74 65 64 2e 0a  es are located..
48e0: 23 0a 5a 49 4e 43 44 49 52 20 3d 20 24 28 53 52  #.ZINCDIR = $(SR
48f0: 43 44 49 52 29 2f 2e 2e 2f 63 6f 6d 70 61 74 2f  CDIR)/../compat/
4900: 7a 6c 69 62 0a 5a 4c 49 42 44 49 52 20 3d 20 24  zlib.ZLIBDIR = $
4910: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 63 6f 6d 70  (SRCDIR)/../comp
4920: 61 74 2f 7a 6c 69 62 0a 0a 23 23 23 23 20 4d 61  at/zlib..#### Ma
4930: 6b 65 20 61 6e 20 61 74 74 65 6d 70 74 20 74 6f  ke an attempt to
4940: 20 64 65 74 65 63 74 20 69 66 20 46 6f 73 73 69   detect if Fossi
4950: 6c 20 69 73 20 62 65 69 6e 67 20 62 75 69 6c 74  l is being built
4960: 20 66 6f 72 20 74 68 65 20 78 36 34 20 70 72 6f   for the x64 pro
4970: 63 65 73 73 6f 72 0a 23 20 20 20 20 61 72 63 68  cessor.#    arch
4980: 69 74 65 63 74 75 72 65 2e 20 20 54 68 69 73 20  itecture.  This 
4990: 63 68 65 63 6b 20 6d 61 79 20 62 65 20 73 6f 6d  check may be som
49a0: 65 77 68 61 74 20 66 72 61 67 69 6c 65 20 64 75  ewhat fragile du
49b0: 65 20 74 6f 20 22 66 69 6e 64 73 74 72 69 6e 67  e to "findstring
49c0: 22 2e 0a 23 0a 69 66 6e 64 65 66 20 58 36 34 0a  "..#.ifndef X64.
49d0: 69 66 6e 65 71 20 28 2c 24 28 66 69 6e 64 73 74  ifneq (,$(findst
49e0: 72 69 6e 67 20 78 38 36 5f 36 34 2d 77 36 34 2d  ring x86_64-w64-
49f0: 6d 69 6e 67 77 33 32 2c 24 28 50 52 45 46 49 58  mingw32,$(PREFIX
4a00: 29 29 29 0a 58 36 34 20 3d 20 31 0a 65 6e 64 69  ))).X64 = 1.endi
4a10: 66 0a 65 6e 64 69 66 0a 0a 23 23 23 23 20 44 65  f.endif..#### De
4a20: 74 65 72 6d 69 6e 65 20 69 66 20 74 68 65 20 6f  termine if the o
4a30: 70 74 69 6d 69 7a 65 64 20 61 73 73 65 6d 62 6c  ptimized assembl
4a40: 79 20 72 6f 75 74 69 6e 65 73 20 70 72 6f 76 69  y routines provi
4a50: 64 65 64 20 77 69 74 68 20 7a 6c 69 62 20 73 68  ded with zlib sh
4a60: 6f 75 6c 64 20 62 65 0a 23 20 20 20 20 75 73 65  ould be.#    use
4a70: 64 2c 20 74 61 6b 69 6e 67 20 69 6e 74 6f 20 61  d, taking into a
4a80: 63 63 6f 75 6e 74 20 77 68 65 74 68 65 72 20 7a  ccount whether z
4a90: 6c 69 62 20 69 73 20 61 63 74 75 61 6c 6c 79 20  lib is actually 
4aa0: 65 6e 61 62 6c 65 64 20 61 6e 64 20 74 68 65 20  enabled and the 
4ab0: 74 61 72 67 65 74 0a 23 20 20 20 20 70 72 6f 63  target.#    proc
4ac0: 65 73 73 6f 72 20 61 72 63 68 69 74 65 63 74 75  essor architectu
4ad0: 72 65 2e 0a 23 0a 69 66 6e 64 65 66 20 58 36 34  re..#.ifndef X64
4ae0: 0a 53 53 4c 43 4f 4e 46 49 47 20 3d 20 6d 69 6e  .SSLCONFIG = min
4af0: 67 77 0a 69 66 6e 64 65 66 20 46 4f 53 53 49 4c  gw.ifndef FOSSIL
4b00: 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a 0a 5a 4c  _ENABLE_MINIZ.ZL
4b10: 49 42 43 4f 4e 46 49 47 20 3d 20 4c 4f 43 3d 22  IBCONFIG = LOC="
4b20: 2d 44 41 53 4d 56 20 2d 44 41 53 4d 49 4e 46 22  -DASMV -DASMINF"
4b30: 20 4f 42 4a 41 3d 22 69 6e 66 66 61 73 38 36 2e   OBJA="inffas86.
4b40: 6f 20 6d 61 74 63 68 2e 6f 22 0a 5a 4c 49 42 54  o match.o".ZLIBT
4b50: 41 52 47 45 54 53 20 3d 20 24 28 5a 4c 49 42 44  ARGETS = $(ZLIBD
4b60: 49 52 29 2f 69 6e 66 66 61 73 38 36 2e 6f 20 24  IR)/inffas86.o $
4b70: 28 5a 4c 49 42 44 49 52 29 2f 6d 61 74 63 68 2e  (ZLIBDIR)/match.
4b80: 6f 0a 65 6c 73 65 0a 5a 4c 49 42 43 4f 4e 46 49  o.else.ZLIBCONFI
4b90: 47 20 3d 0a 5a 4c 49 42 54 41 52 47 45 54 53 20  G =.ZLIBTARGETS 
4ba0: 3d 0a 65 6e 64 69 66 0a 65 6c 73 65 0a 53 53 4c  =.endif.else.SSL
4bb0: 43 4f 4e 46 49 47 20 3d 20 6d 69 6e 67 77 36 34  CONFIG = mingw64
4bc0: 0a 5a 4c 49 42 43 4f 4e 46 49 47 20 3d 0a 5a 4c  .ZLIBCONFIG =.ZL
4bd0: 49 42 54 41 52 47 45 54 53 20 3d 0a 65 6e 64 69  IBTARGETS =.endi
4be0: 66 0a 0a 23 23 23 23 20 44 69 73 61 62 6c 65 20  f..#### Disable 
4bf0: 63 72 65 61 74 69 6f 6e 20 6f 66 20 74 68 65 20  creation of the 
4c00: 4f 70 65 6e 53 53 4c 20 73 68 61 72 65 64 20 6c  OpenSSL shared l
4c10: 69 62 72 61 72 69 65 73 2e 20 20 41 6c 73 6f 2c  ibraries.  Also,
4c20: 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74   disable support
4c30: 0a 23 20 20 20 20 66 6f 72 20 53 53 4c 76 33 20  .#    for SSLv3 
4c40: 28 69 2e 65 2e 20 74 68 65 72 65 62 79 20 66 6f  (i.e. thereby fo
4c50: 72 63 69 6e 67 20 74 68 65 20 75 73 65 20 6f 66  rcing the use of
4c60: 20 54 4c 53 29 2e 0a 23 0a 53 53 4c 43 4f 4e 46   TLS)..#.SSLCONF
4c70: 49 47 20 2b 3d 20 6e 6f 2d 73 73 6c 33 20 6e 6f  IG += no-ssl3 no
4c80: 2d 77 65 61 6b 2d 73 73 6c 2d 63 69 70 68 65 72  -weak-ssl-cipher
4c90: 73 20 6e 6f 2d 73 68 61 72 65 64 0a 0a 23 23 23  s no-shared..###
4ca0: 23 20 57 68 65 6e 20 75 73 69 6e 67 20 7a 6c 69  # When using zli
4cb0: 62 2c 20 6d 61 6b 65 20 73 75 72 65 20 74 68 61  b, make sure tha
4cc0: 74 20 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6e  t OpenSSL is con
4cd0: 66 69 67 75 72 65 64 20 74 6f 20 75 73 65 20 74  figured to use t
4ce0: 68 65 20 7a 6c 69 62 0a 23 20 20 20 20 74 68 61  he zlib.#    tha
4cf0: 74 20 46 6f 73 73 69 6c 20 6b 6e 6f 77 73 20 61  t Fossil knows a
4d00: 62 6f 75 74 20 28 69 2e 65 2e 20 74 68 65 20 6f  bout (i.e. the o
4d10: 6e 65 20 77 69 74 68 69 6e 20 74 68 65 20 73 6f  ne within the so
4d20: 75 72 63 65 20 74 72 65 65 29 2e 0a 23 0a 69 66  urce tree)..#.if
4d30: 6e 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42  ndef FOSSIL_ENAB
4d40: 4c 45 5f 4d 49 4e 49 5a 0a 53 53 4c 43 4f 4e 46  LE_MINIZ.SSLCONF
4d50: 49 47 20 2b 3d 20 20 2d 2d 77 69 74 68 2d 7a 6c  IG +=  --with-zl
4d60: 69 62 2d 6c 69 62 3d 24 28 50 57 44 29 2f 24 28  ib-lib=$(PWD)/$(
4d70: 5a 4c 49 42 44 49 52 29 20 2d 2d 77 69 74 68 2d  ZLIBDIR) --with-
4d80: 7a 6c 69 62 2d 69 6e 63 6c 75 64 65 3d 24 28 50  zlib-include=$(P
4d90: 57 44 29 2f 24 28 5a 4c 49 42 44 49 52 29 20 7a  WD)/$(ZLIBDIR) z
4da0: 6c 69 62 0a 65 6e 64 69 66 0a 0a 23 23 23 23 20  lib.endif..#### 
4db0: 54 68 65 20 64 69 72 65 63 74 6f 72 69 65 73 20  The directories 
4dc0: 77 68 65 72 65 20 74 68 65 20 4f 70 65 6e 53 53  where the OpenSS
4dd0: 4c 20 69 6e 63 6c 75 64 65 20 61 6e 64 20 6c 69  L include and li
4de0: 62 72 61 72 79 20 66 69 6c 65 73 20 61 72 65 20  brary files are 
4df0: 6c 6f 63 61 74 65 64 2e 0a 23 0a 4f 50 45 4e 53  located..#.OPENS
4e00: 53 4c 44 49 52 20 3d 20 24 28 53 52 43 44 49 52  SLDIR = $(SRCDIR
4e10: 29 2f 2e 2e 2f 63 6f 6d 70 61 74 2f 6f 70 65 6e  )/../compat/open
4e20: 73 73 6c 0a 4f 50 45 4e 53 53 4c 49 4e 43 44 49  ssl.OPENSSLINCDI
4e30: 52 20 3d 20 24 28 4f 50 45 4e 53 53 4c 44 49 52  R = $(OPENSSLDIR
4e40: 29 2f 69 6e 63 6c 75 64 65 0a 4f 50 45 4e 53 53  )/include.OPENSS
4e50: 4c 4c 49 42 44 49 52 20 3d 20 24 28 4f 50 45 4e  LLIBDIR = $(OPEN
4e60: 53 53 4c 44 49 52 29 0a 0a 23 23 23 23 20 45 69  SSLDIR)..#### Ei
4e70: 74 68 65 72 20 74 68 65 20 64 69 72 65 63 74 6f  ther the directo
4e80: 72 79 20 77 68 65 72 65 20 74 68 65 20 54 63 6c  ry where the Tcl
4e90: 20 6c 69 62 72 61 72 79 20 69 73 20 69 6e 73 74   library is inst
4ea0: 61 6c 6c 65 64 20 6f 72 20 74 68 65 20 54 63 6c  alled or the Tcl
4eb0: 0a 23 20 20 20 20 73 6f 75 72 63 65 20 63 6f 64  .#    source cod
4ec0: 65 20 64 69 72 65 63 74 6f 72 79 20 72 65 73 69  e directory resi
4ed0: 64 65 73 20 28 64 65 70 65 6e 64 69 6e 67 20 6f  des (depending o
4ee0: 6e 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74  n the value of t
4ef0: 68 65 20 6d 61 63 72 6f 0a 23 20 20 20 20 46 4f  he macro.#    FO
4f00: 53 53 49 4c 5f 54 43 4c 5f 53 4f 55 52 43 45 29  SSIL_TCL_SOURCE)
4f10: 2e 20 20 49 66 20 74 68 69 73 20 70 6f 69 6e 74  .  If this point
4f20: 73 20 74 6f 20 74 68 65 20 54 63 6c 20 69 6e 73  s to the Tcl ins
4f30: 74 61 6c 6c 20 64 69 72 65 63 74 6f 72 79 2c 0a  tall directory,.
4f40: 23 20 20 20 20 74 68 69 73 20 64 69 72 65 63 74  #    this direct
4f50: 6f 72 79 20 6d 75 73 74 20 68 61 76 65 20 22 69  ory must have "i
4f60: 6e 63 6c 75 64 65 22 20 61 6e 64 20 22 6c 69 62  nclude" and "lib
4f70: 22 20 73 75 62 2d 64 69 72 65 63 74 6f 72 69 65  " sub-directorie
4f80: 73 2e 20 20 49 66 0a 23 20 20 20 20 74 68 69 73  s.  If.#    this
4f90: 20 70 6f 69 6e 74 73 20 74 6f 20 74 68 65 20 54   points to the T
4fa0: 63 6c 20 73 6f 75 72 63 65 20 63 6f 64 65 20 64  cl source code d
4fb0: 69 72 65 63 74 6f 72 79 2c 20 74 68 69 73 20 64  irectory, this d
4fc0: 69 72 65 63 74 6f 72 79 20 6d 75 73 74 0a 23 20  irectory must.# 
4fd0: 20 20 20 68 61 76 65 20 22 67 65 6e 65 72 69 63     have "generic
4fe0: 22 20 61 6e 64 20 22 77 69 6e 22 20 73 75 62 2d  " and "win" sub-
4ff0: 64 69 72 65 63 74 6f 72 69 65 73 2e 20 20 54 68  directories.  Th
5000: 65 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 75 73  e recommended us
5010: 61 67 65 0a 23 20 20 20 20 68 65 72 65 20 69 73  age.#    here is
5020: 20 74 6f 20 75 73 65 20 74 68 65 20 53 79 73 69   to use the Sysi
5030: 6e 74 65 72 6e 61 6c 73 20 6a 75 6e 63 74 69 6f  nternals junctio
5040: 6e 20 74 6f 6f 6c 20 74 6f 20 63 72 65 61 74 65  n tool to create
5050: 20 61 20 68 61 72 64 0a 23 20 20 20 20 6c 69 6e   a hard.#    lin
5060: 6b 20 62 65 74 77 65 65 6e 20 61 20 22 74 63 6c  k between a "tcl
5070: 2d 38 2e 78 22 20 73 75 62 2d 64 69 72 65 63 74  -8.x" sub-direct
5080: 6f 72 79 20 6f 66 20 74 68 65 20 46 6f 73 73 69  ory of the Fossi
5090: 6c 20 73 6f 75 72 63 65 20 63 6f 64 65 0a 23 20  l source code.# 
50a0: 20 20 20 64 69 72 65 63 74 6f 72 79 20 61 6e 64     directory and
50b0: 20 74 68 65 20 74 61 72 67 65 74 20 54 63 6c 20   the target Tcl 
50c0: 64 69 72 65 63 74 6f 72 79 2e 20 20 54 68 69 73  directory.  This
50d0: 20 72 65 6d 6f 76 65 73 20 74 68 65 20 6e 65 65   removes the nee
50e0: 64 20 74 6f 0a 23 20 20 20 20 68 61 72 64 2d 63  d to.#    hard-c
50f0: 6f 64 65 20 74 68 65 20 6e 65 63 65 73 73 61 72  ode the necessar
5100: 79 20 70 61 74 68 73 20 69 6e 20 74 68 69 73 20  y paths in this 
5110: 4d 61 6b 65 66 69 6c 65 2e 0a 23 0a 54 43 4c 44  Makefile..#.TCLD
5120: 49 52 20 3d 20 24 28 53 52 43 44 49 52 29 2f 2e  IR = $(SRCDIR)/.
5130: 2e 2f 63 6f 6d 70 61 74 2f 74 63 6c 2d 38 2e 36  ./compat/tcl-8.6
5140: 0a 0a 23 23 23 23 20 54 68 65 20 54 63 6c 20 73  ..#### The Tcl s
5150: 6f 75 72 63 65 20 63 6f 64 65 20 64 69 72 65 63  ource code direc
5160: 74 6f 72 79 2e 20 20 54 68 69 73 20 64 65 66 61  tory.  This defa
5170: 75 6c 74 73 20 74 6f 20 74 68 65 20 73 61 6d 65  ults to the same
5180: 20 76 61 6c 75 65 20 61 73 0a 23 20 20 20 20 54   value as.#    T
5190: 43 4c 44 49 52 20 6d 61 63 72 6f 20 28 61 62 6f  CLDIR macro (abo
51a0: 76 65 29 2c 20 77 68 69 63 68 20 6d 61 79 20 6e  ve), which may n
51b0: 6f 74 20 62 65 20 63 6f 72 72 65 63 74 2e 20 20  ot be correct.  
51c0: 54 68 69 73 20 76 61 6c 75 65 20 77 69 6c 6c 0a  This value will.
51d0: 23 20 20 20 20 6f 6e 6c 79 20 62 65 20 75 73 65  #    only be use
51e0: 64 20 69 66 20 74 68 65 20 46 4f 53 53 49 4c 5f  d if the FOSSIL_
51f0: 54 43 4c 5f 53 4f 55 52 43 45 20 6d 61 63 72 6f  TCL_SOURCE macro
5200: 20 69 73 20 64 65 66 69 6e 65 64 2e 0a 23 0a 54   is defined..#.T
5210: 43 4c 53 52 43 44 49 52 20 3d 20 24 28 54 43 4c  CLSRCDIR = $(TCL
5220: 44 49 52 29 0a 0a 23 23 23 23 20 54 68 65 20 54  DIR)..#### The T
5230: 63 6c 20 69 6e 63 6c 75 64 65 20 61 6e 64 20 6c  cl include and l
5240: 69 62 72 61 72 79 20 64 69 72 65 63 74 6f 72 69  ibrary directori
5250: 65 73 2e 20 20 54 68 65 73 65 20 76 61 6c 75 65  es.  These value
5260: 73 20 77 69 6c 6c 20 6f 6e 6c 79 20 62 65 0a 23  s will only be.#
5270: 20 20 20 20 75 73 65 64 20 69 66 20 74 68 65 20      used if the 
5280: 46 4f 53 53 49 4c 5f 54 43 4c 5f 53 4f 55 52 43  FOSSIL_TCL_SOURC
5290: 45 20 6d 61 63 72 6f 20 69 73 20 6e 6f 74 20 64  E macro is not d
52a0: 65 66 69 6e 65 64 2e 0a 23 0a 54 43 4c 49 4e 43  efined..#.TCLINC
52b0: 44 49 52 20 3d 20 24 28 54 43 4c 44 49 52 29 2f  DIR = $(TCLDIR)/
52c0: 69 6e 63 6c 75 64 65 0a 54 43 4c 4c 49 42 44 49  include.TCLLIBDI
52d0: 52 20 3d 20 24 28 54 43 4c 44 49 52 29 2f 6c 69  R = $(TCLDIR)/li
52e0: 62 0a 0a 23 23 23 23 20 54 63 6c 3a 20 57 68 69  b..#### Tcl: Whi
52f0: 63 68 20 54 63 6c 20 6c 69 62 72 61 72 79 20 64  ch Tcl library d
5300: 6f 20 77 65 20 77 61 6e 74 20 74 6f 20 75 73 65  o we want to use
5310: 20 28 38 2e 34 2c 20 38 2e 35 2c 20 38 2e 36 2c   (8.4, 8.5, 8.6,
5320: 20 65 74 63 29 3f 0a 23 0a 69 66 64 65 66 20 46   etc)?.#.ifdef F
5330: 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c  OSSIL_ENABLE_TCL
5340: 5f 53 54 55 42 53 0a 69 66 6e 64 65 66 20 46 4f  _STUBS.ifndef FO
5350: 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 5f  SSIL_ENABLE_TCL_
5360: 50 52 49 56 41 54 45 5f 53 54 55 42 53 0a 4c 49  PRIVATE_STUBS.LI
5370: 42 54 43 4c 20 3d 20 2d 6c 74 63 6c 73 74 75 62  BTCL = -ltclstub
5380: 38 36 0a 65 6e 64 69 66 0a 54 43 4c 54 41 52 47  86.endif.TCLTARG
5390: 45 54 20 3d 20 6c 69 62 74 63 6c 73 74 75 62 38  ET = libtclstub8
53a0: 36 2e 61 0a 65 6c 73 65 0a 4c 49 42 54 43 4c 20  6.a.else.LIBTCL 
53b0: 3d 20 2d 6c 74 63 6c 38 36 0a 54 43 4c 54 41 52  = -ltcl86.TCLTAR
53c0: 47 45 54 20 3d 20 62 69 6e 61 72 69 65 73 0a 65  GET = binaries.e
53d0: 6e 64 69 66 0a 0a 23 23 23 23 20 43 20 63 6f 6d  ndif..#### C com
53e0: 70 69 6c 65 72 20 66 6f 72 20 75 73 65 20 69 6e  piler for use in
53f0: 20 62 75 69 6c 64 69 6e 67 20 65 78 65 63 75 74   building execut
5400: 61 62 6c 65 73 20 74 68 61 74 20 77 69 6c 6c 20  ables that will 
5410: 72 75 6e 20 6f 6e 20 74 68 65 0a 23 20 20 20 20  run on the.#    
5420: 74 61 72 67 65 74 20 70 6c 61 74 66 6f 72 6d 2e  target platform.
5430: 20 20 54 68 69 73 20 69 73 20 75 73 75 61 6c 6c    This is usuall
5440: 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 42 43  y the same as BC
5450: 43 45 58 45 2c 20 75 6e 6c 65 73 73 20 79 6f 75  CEXE, unless you
5460: 0a 23 20 20 20 20 61 72 65 20 63 72 6f 73 73 2d  .#    are cross-
5470: 63 6f 6d 70 69 6c 69 6e 67 2e 20 20 54 68 69 73  compiling.  This
5480: 20 43 20 63 6f 6d 70 69 6c 65 72 20 62 75 69 6c   C compiler buil
5490: 64 73 20 74 68 65 20 66 69 6e 69 73 68 65 64 20  ds the finished 
54a0: 62 69 6e 61 72 79 0a 23 20 20 20 20 66 6f 72 20  binary.#    for 
54b0: 66 6f 73 73 69 6c 2e 20 20 53 65 65 20 42 43 43  fossil.  See BCC
54c0: 20 61 6e 64 20 42 43 43 45 58 45 20 61 62 6f 76   and BCCEXE abov
54d0: 65 20 66 6f 72 20 74 68 65 20 43 20 63 6f 6d 70  e for the C comp
54e0: 69 6c 65 72 20 66 6f 72 0a 23 20 20 20 20 62 75  iler for.#    bu
54f0: 69 6c 64 69 6e 67 20 69 6e 74 65 72 6d 65 64 69  ilding intermedi
5500: 61 74 65 20 63 6f 64 65 2d 67 65 6e 65 72 61 74  ate code-generat
5510: 6f 72 20 74 6f 6f 6c 73 2e 0a 23 0a 54 43 43 45  or tools..#.TCCE
5520: 58 45 20 3d 20 67 63 63 0a 0a 23 23 23 23 20 43  XE = gcc..#### C
5530: 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6f 70   compiler and op
5540: 74 69 6f 6e 73 20 66 6f 72 20 75 73 65 20 69 6e  tions for use in
5550: 20 62 75 69 6c 64 69 6e 67 20 65 78 65 63 75 74   building execut
5560: 61 62 6c 65 73 20 74 68 61 74 20 77 69 6c 6c 0a  ables that will.
5570: 23 20 20 20 20 72 75 6e 20 6f 6e 20 74 68 65 20  #    run on the 
5580: 74 61 72 67 65 74 20 70 6c 61 74 66 6f 72 6d 2e  target platform.
5590: 20 20 54 68 69 73 20 69 73 20 75 73 75 61 6c 6c    This is usuall
55a0: 79 20 74 68 65 20 61 6c 6d 6f 73 74 20 74 68 65  y the almost the
55b0: 20 73 61 6d 65 0a 23 20 20 20 20 61 73 20 42 43   same.#    as BC
55c0: 43 2c 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 72  C, unless you ar
55d0: 65 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e  e cross-compilin
55e0: 67 2e 20 20 54 68 69 73 20 43 20 63 6f 6d 70 69  g.  This C compi
55f0: 6c 65 72 20 62 75 69 6c 64 73 0a 23 20 20 20 20  ler builds.#    
5600: 74 68 65 20 66 69 6e 69 73 68 65 64 20 62 69 6e  the finished bin
5610: 61 72 79 20 66 6f 72 20 66 6f 73 73 69 6c 2e 20  ary for fossil. 
5620: 20 54 68 65 20 42 43 43 20 63 6f 6d 70 69 6c 65   The BCC compile
5630: 72 20 61 62 6f 76 65 20 69 73 20 75 73 65 64 0a  r above is used.
5640: 23 20 20 20 20 66 6f 72 20 62 75 69 6c 64 69 6e  #    for buildin
5650: 67 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 63  g intermediate c
5660: 6f 64 65 2d 67 65 6e 65 72 61 74 6f 72 20 74 6f  ode-generator to
5670: 6f 6c 73 2e 0a 23 0a 54 43 43 20 3d 20 24 28 50  ols..#.TCC = $(P
5680: 52 45 46 49 58 29 24 28 54 43 43 45 58 45 29 20  REFIX)$(TCCEXE) 
5690: 2d 57 61 6c 6c 20 2d 57 64 65 63 6c 61 72 61 74  -Wall -Wdeclarat
56a0: 69 6f 6e 2d 61 66 74 65 72 2d 73 74 61 74 65 6d  ion-after-statem
56b0: 65 6e 74 0a 0a 23 23 23 23 20 41 64 64 20 74 68  ent..#### Add th
56c0: 65 20 6e 65 63 65 73 73 61 72 79 20 63 6f 6d 6d  e necessary comm
56d0: 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73  and line options
56e0: 20 74 6f 20 62 75 69 6c 64 20 77 69 74 68 20 64   to build with d
56f0: 65 62 75 67 67 69 6e 67 0a 23 20 20 20 20 73 79  ebugging.#    sy
5700: 6d 62 6f 6c 73 2c 20 69 66 20 65 6e 61 62 6c 65  mbols, if enable
5710: 64 2e 0a 23 0a 69 66 64 65 66 20 46 4f 53 53 49  d..#.ifdef FOSSI
5720: 4c 5f 45 4e 41 42 4c 45 5f 53 59 4d 42 4f 4c 53  L_ENABLE_SYMBOLS
5730: 0a 54 43 43 20 2b 3d 20 2d 67 0a 65 6c 73 65 0a  .TCC += -g.else.
5740: 54 43 43 20 2b 3d 20 2d 4f 73 0a 65 6e 64 69 66  TCC += -Os.endif
5750: 0a 0a 23 23 23 23 20 57 68 65 6e 20 6e 6f 74 20  ..#### When not 
5760: 75 73 69 6e 67 20 74 68 65 20 6d 69 6e 69 7a 20  using the miniz 
5770: 63 6f 6d 70 72 65 73 73 69 6f 6e 20 6c 69 62 72  compression libr
5780: 61 72 79 2c 20 7a 6c 69 62 20 69 73 20 72 65 71  ary, zlib is req
5790: 75 69 72 65 64 2e 0a 23 0a 69 66 6e 64 65 66 20  uired..#.ifndef 
57a0: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49  FOSSIL_ENABLE_MI
57b0: 4e 49 5a 0a 54 43 43 20 2b 3d 20 2d 4c 24 28 5a  NIZ.TCC += -L$(Z
57c0: 4c 49 42 44 49 52 29 20 2d 49 24 28 5a 49 4e 43  LIBDIR) -I$(ZINC
57d0: 44 49 52 29 0a 65 6e 64 69 66 0a 0a 23 23 23 23  DIR).endif..####
57e0: 20 43 6f 6d 70 69 6c 65 20 72 65 73 6f 75 72 63   Compile resourc
57f0: 65 73 20 66 6f 72 20 75 73 65 20 69 6e 20 62 75  es for use in bu
5800: 69 6c 64 69 6e 67 20 65 78 65 63 75 74 61 62 6c  ilding executabl
5810: 65 73 20 74 68 61 74 20 77 69 6c 6c 20 72 75 6e  es that will run
5820: 0a 23 20 20 20 20 6f 6e 20 74 68 65 20 74 61 72  .#    on the tar
5830: 67 65 74 20 70 6c 61 74 66 6f 72 6d 2e 0a 23 0a  get platform..#.
5840: 52 43 43 20 3d 20 24 28 50 52 45 46 49 58 29 77  RCC = $(PREFIX)w
5850: 69 6e 64 72 65 73 20 2d 49 24 28 53 52 43 44 49  indres -I$(SRCDI
5860: 52 29 0a 0a 69 66 6e 64 65 66 20 46 4f 53 53 49  R)..ifndef FOSSI
5870: 4c 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a 0a 52  L_ENABLE_MINIZ.R
5880: 43 43 20 2b 3d 20 2d 49 24 28 5a 49 4e 43 44 49  CC += -I$(ZINCDI
5890: 52 29 0a 65 6e 64 69 66 0a 0a 23 20 57 69 74 68  R).endif..# With
58a0: 20 48 54 54 50 53 20 73 75 70 70 6f 72 74 0a 69   HTTPS support.i
58b0: 66 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42  fdef FOSSIL_ENAB
58c0: 4c 45 5f 53 53 4c 0a 54 43 43 20 2b 3d 20 2d 4c  LE_SSL.TCC += -L
58d0: 24 28 4f 50 45 4e 53 53 4c 4c 49 42 44 49 52 29  $(OPENSSLLIBDIR)
58e0: 20 2d 49 24 28 4f 50 45 4e 53 53 4c 49 4e 43 44   -I$(OPENSSLINCD
58f0: 49 52 29 0a 52 43 43 20 2b 3d 20 2d 49 24 28 4f  IR).RCC += -I$(O
5900: 50 45 4e 53 53 4c 49 4e 43 44 49 52 29 0a 65 6e  PENSSLINCDIR).en
5910: 64 69 66 0a 0a 23 20 57 69 74 68 20 54 63 6c 20  dif..# With Tcl 
5920: 73 75 70 70 6f 72 74 0a 69 66 64 65 66 20 46 4f  support.ifdef FO
5930: 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 0a  SSIL_ENABLE_TCL.
5940: 69 66 64 65 66 20 46 4f 53 53 49 4c 5f 54 43 4c  ifdef FOSSIL_TCL
5950: 5f 53 4f 55 52 43 45 0a 54 43 43 20 2b 3d 20 2d  _SOURCE.TCC += -
5960: 4c 24 28 54 43 4c 53 52 43 44 49 52 29 2f 77 69  L$(TCLSRCDIR)/wi
5970: 6e 20 2d 49 24 28 54 43 4c 53 52 43 44 49 52 29  n -I$(TCLSRCDIR)
5980: 2f 67 65 6e 65 72 69 63 20 2d 49 24 28 54 43 4c  /generic -I$(TCL
5990: 53 52 43 44 49 52 29 2f 77 69 6e 0a 52 43 43 20  SRCDIR)/win.RCC 
59a0: 2b 3d 20 2d 49 24 28 54 43 4c 53 52 43 44 49 52  += -I$(TCLSRCDIR
59b0: 29 2f 67 65 6e 65 72 69 63 20 2d 49 24 28 54 43  )/generic -I$(TC
59c0: 4c 53 52 43 44 49 52 29 2f 77 69 6e 0a 65 6c 73  LSRCDIR)/win.els
59d0: 65 0a 54 43 43 20 2b 3d 20 2d 4c 24 28 54 43 4c  e.TCC += -L$(TCL
59e0: 4c 49 42 44 49 52 29 20 2d 49 24 28 54 43 4c 49  LIBDIR) -I$(TCLI
59f0: 4e 43 44 49 52 29 0a 52 43 43 20 2b 3d 20 2d 49  NCDIR).RCC += -I
5a00: 24 28 54 43 4c 49 4e 43 44 49 52 29 0a 65 6e 64  $(TCLINCDIR).end
5a10: 69 66 0a 65 6e 64 69 66 0a 0a 23 20 57 69 74 68  if.endif..# With
5a20: 20 6d 69 6e 69 7a 20 28 69 2e 65 2e 20 69 6e 73   miniz (i.e. ins
5a30: 74 65 61 64 20 6f 66 20 7a 6c 69 62 29 0a 69 66  tead of zlib).if
5a40: 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  def FOSSIL_ENABL
5a50: 45 5f 4d 49 4e 49 5a 0a 54 43 43 20 2b 3d 20 2d  E_MINIZ.TCC += -
5a60: 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d  DFOSSIL_ENABLE_M
5a70: 49 4e 49 5a 3d 31 0a 52 43 43 20 2b 3d 20 2d 44  INIZ=1.RCC += -D
5a80: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49  FOSSIL_ENABLE_MI
5a90: 4e 49 5a 3d 31 0a 65 6e 64 69 66 0a 0a 23 20 57  NIZ=1.endif..# W
5aa0: 69 74 68 20 4d 69 6e 47 57 20 63 6f 6d 6d 61 6e  ith MinGW comman
5ab0: 64 20 6c 69 6e 65 20 68 61 6e 64 6c 69 6e 67 20  d line handling 
5ac0: 77 6f 72 6b 61 72 6f 75 6e 64 0a 69 66 64 65 66  workaround.ifdef
5ad0: 20 4d 49 4e 47 57 5f 49 53 5f 33 32 42 49 54 5f   MINGW_IS_32BIT_
5ae0: 4f 4e 4c 59 0a 54 43 43 20 2b 3d 20 2d 44 42 52  ONLY.TCC += -DBR
5af0: 4f 4b 45 4e 5f 4d 49 4e 47 57 5f 43 4d 44 4c 49  OKEN_MINGW_CMDLI
5b00: 4e 45 3d 31 0a 52 43 43 20 2b 3d 20 2d 44 42 52  NE=1.RCC += -DBR
5b10: 4f 4b 45 4e 5f 4d 49 4e 47 57 5f 43 4d 44 4c 49  OKEN_MINGW_CMDLI
5b20: 4e 45 3d 31 0a 65 6e 64 69 66 0a 0a 23 20 57 69  NE=1.endif..# Wi
5b30: 74 68 20 48 54 54 50 53 20 73 75 70 70 6f 72 74  th HTTPS support
5b40: 0a 69 66 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e  .ifdef FOSSIL_EN
5b50: 41 42 4c 45 5f 53 53 4c 0a 54 43 43 20 2b 3d 20  ABLE_SSL.TCC += 
5b60: 2d 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f  -DFOSSIL_ENABLE_
5b70: 53 53 4c 3d 31 0a 52 43 43 20 2b 3d 20 2d 44 46  SSL=1.RCC += -DF
5b80: 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 53 53 4c  OSSIL_ENABLE_SSL
5b90: 3d 31 0a 65 6e 64 69 66 0a 0a 23 20 57 69 74 68  =1.endif..# With
5ba0: 20 72 65 6c 61 74 69 76 65 20 70 61 74 68 73 20   relative paths 
5bb0: 69 6e 20 65 78 74 65 72 6e 61 6c 20 64 69 66 66  in external diff
5bc0: 2f 67 64 69 66 66 0a 69 66 64 65 66 20 46 4f 53  /gdiff.ifdef FOS
5bd0: 53 49 4c 5f 45 4e 41 42 4c 45 5f 45 58 45 43 5f  SIL_ENABLE_EXEC_
5be0: 52 45 4c 5f 50 41 54 48 53 0a 54 43 43 20 2b 3d  REL_PATHS.TCC +=
5bf0: 20 2d 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45   -DFOSSIL_ENABLE
5c00: 5f 45 58 45 43 5f 52 45 4c 5f 50 41 54 48 53 3d  _EXEC_REL_PATHS=
5c10: 31 0a 52 43 43 20 2b 3d 20 2d 44 46 4f 53 53 49  1.RCC += -DFOSSI
5c20: 4c 5f 45 4e 41 42 4c 45 5f 45 58 45 43 5f 52 45  L_ENABLE_EXEC_RE
5c30: 4c 5f 50 41 54 48 53 3d 31 0a 65 6e 64 69 66 0a  L_PATHS=1.endif.
5c40: 0a 23 20 57 69 74 68 20 54 48 31 20 65 6d 62 65  .# With TH1 embe
5c50: 64 64 65 64 20 64 6f 63 73 20 73 75 70 70 6f 72  dded docs suppor
5c60: 74 0a 69 66 64 65 66 20 46 4f 53 53 49 4c 5f 45  t.ifdef FOSSIL_E
5c70: 4e 41 42 4c 45 5f 54 48 31 5f 44 4f 43 53 0a 54  NABLE_TH1_DOCS.T
5c80: 43 43 20 2b 3d 20 2d 44 46 4f 53 53 49 4c 5f 45  CC += -DFOSSIL_E
5c90: 4e 41 42 4c 45 5f 54 48 31 5f 44 4f 43 53 3d 31  NABLE_TH1_DOCS=1
5ca0: 0a 52 43 43 20 2b 3d 20 2d 44 46 4f 53 53 49 4c  .RCC += -DFOSSIL
5cb0: 5f 45 4e 41 42 4c 45 5f 54 48 31 5f 44 4f 43 53  _ENABLE_TH1_DOCS
5cc0: 3d 31 0a 65 6e 64 69 66 0a 0a 23 20 57 69 74 68  =1.endif..# With
5cd0: 20 54 48 31 20 68 6f 6f 6b 20 73 75 70 70 6f 72   TH1 hook suppor
5ce0: 74 0a 69 66 64 65 66 20 46 4f 53 53 49 4c 5f 45  t.ifdef FOSSIL_E
5cf0: 4e 41 42 4c 45 5f 54 48 31 5f 48 4f 4f 4b 53 0a  NABLE_TH1_HOOKS.
5d00: 54 43 43 20 2b 3d 20 2d 44 46 4f 53 53 49 4c 5f  TCC += -DFOSSIL_
5d10: 45 4e 41 42 4c 45 5f 54 48 31 5f 48 4f 4f 4b 53  ENABLE_TH1_HOOKS
5d20: 3d 31 0a 52 43 43 20 2b 3d 20 2d 44 46 4f 53 53  =1.RCC += -DFOSS
5d30: 49 4c 5f 45 4e 41 42 4c 45 5f 54 48 31 5f 48 4f  IL_ENABLE_TH1_HO
5d40: 4f 4b 53 3d 31 0a 65 6e 64 69 66 0a 0a 23 20 57  OKS=1.endif..# W
5d50: 69 74 68 20 54 63 6c 20 73 75 70 70 6f 72 74 0a  ith Tcl support.
5d60: 69 66 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41  ifdef FOSSIL_ENA
5d70: 42 4c 45 5f 54 43 4c 0a 54 43 43 20 2b 3d 20 2d  BLE_TCL.TCC += -
5d80: 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54  DFOSSIL_ENABLE_T
5d90: 43 4c 3d 31 0a 52 43 43 20 2b 3d 20 2d 44 46 4f  CL=1.RCC += -DFO
5da0: 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 3d  SSIL_ENABLE_TCL=
5db0: 31 0a 23 20 45 69 74 68 65 72 20 73 74 61 74 69  1.# Either stati
5dc0: 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 20 6f 72 20  cally linked or 
5dd0: 76 69 61 20 73 74 75 62 73 0a 69 66 64 65 66 20  via stubs.ifdef 
5de0: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43  FOSSIL_ENABLE_TC
5df0: 4c 5f 53 54 55 42 53 0a 54 43 43 20 2b 3d 20 2d  L_STUBS.TCC += -
5e00: 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54  DFOSSIL_ENABLE_T
5e10: 43 4c 5f 53 54 55 42 53 3d 31 20 2d 44 55 53 45  CL_STUBS=1 -DUSE
5e20: 5f 54 43 4c 5f 53 54 55 42 53 0a 52 43 43 20 2b  _TCL_STUBS.RCC +
5e30: 3d 20 2d 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  = -DFOSSIL_ENABL
5e40: 45 5f 54 43 4c 5f 53 54 55 42 53 3d 31 20 2d 44  E_TCL_STUBS=1 -D
5e50: 55 53 45 5f 54 43 4c 5f 53 54 55 42 53 0a 69 66  USE_TCL_STUBS.if
5e60: 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  def FOSSIL_ENABL
5e70: 45 5f 54 43 4c 5f 50 52 49 56 41 54 45 5f 53 54  E_TCL_PRIVATE_ST
5e80: 55 42 53 0a 54 43 43 20 2b 3d 20 2d 44 46 4f 53  UBS.TCC += -DFOS
5e90: 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 5f 50  SIL_ENABLE_TCL_P
5ea0: 52 49 56 41 54 45 5f 53 54 55 42 53 3d 31 0a 52  RIVATE_STUBS=1.R
5eb0: 43 43 20 2b 3d 20 2d 44 46 4f 53 53 49 4c 5f 45  CC += -DFOSSIL_E
5ec0: 4e 41 42 4c 45 5f 54 43 4c 5f 50 52 49 56 41 54  NABLE_TCL_PRIVAT
5ed0: 45 5f 53 54 55 42 53 3d 31 0a 65 6e 64 69 66 0a  E_STUBS=1.endif.
5ee0: 65 6c 73 65 0a 54 43 43 20 2b 3d 20 2d 44 53 54  else.TCC += -DST
5ef0: 41 54 49 43 5f 42 55 49 4c 44 0a 52 43 43 20 2b  ATIC_BUILD.RCC +
5f00: 3d 20 2d 44 53 54 41 54 49 43 5f 42 55 49 4c 44  = -DSTATIC_BUILD
5f10: 0a 65 6e 64 69 66 0a 65 6e 64 69 66 0a 0a 23 20  .endif.endif..# 
5f20: 57 69 74 68 20 4a 53 4f 4e 20 73 75 70 70 6f 72  With JSON suppor
5f30: 74 0a 69 66 64 65 66 20 46 4f 53 53 49 4c 5f 45  t.ifdef FOSSIL_E
5f40: 4e 41 42 4c 45 5f 4a 53 4f 4e 0a 54 43 43 20 2b  NABLE_JSON.TCC +
5f50: 3d 20 2d 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  = -DFOSSIL_ENABL
5f60: 45 5f 4a 53 4f 4e 3d 31 0a 52 43 43 20 2b 3d 20  E_JSON=1.RCC += 
5f70: 2d 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f  -DFOSSIL_ENABLE_
5f80: 4a 53 4f 4e 3d 31 0a 65 6e 64 69 66 0a 0a 23 20  JSON=1.endif..# 
5f90: 57 69 74 68 20 22 73 79 73 2f 6d 6d 61 6e 2e 68  With "sys/mman.h
5fa0: 22 20 73 75 70 70 6f 72 74 0a 69 66 64 65 66 20  " support.ifdef 
5fb0: 55 53 45 5f 4d 4d 41 4e 5f 48 0a 54 43 43 20 2b  USE_MMAN_H.TCC +
5fc0: 3d 20 2d 44 55 53 45 5f 4d 4d 41 4e 5f 48 3d 31  = -DUSE_MMAN_H=1
5fd0: 0a 52 43 43 20 2b 3d 20 2d 44 55 53 45 5f 4d 4d  .RCC += -DUSE_MM
5fe0: 41 4e 5f 48 3d 31 0a 65 6e 64 69 66 0a 0a 23 20  AN_H=1.endif..# 
5ff0: 57 69 74 68 20 53 51 4c 69 74 65 20 45 6e 63 72  With SQLite Encr
6000: 79 70 74 69 6f 6e 20 45 78 74 65 6e 73 69 6f 6e  yption Extension
6010: 20 73 75 70 70 6f 72 74 0a 69 66 64 65 66 20 55   support.ifdef U
6020: 53 45 5f 53 45 45 0a 54 43 43 20 2b 3d 20 2d 44  SE_SEE.TCC += -D
6030: 55 53 45 5f 53 45 45 3d 31 0a 52 43 43 20 2b 3d  USE_SEE=1.RCC +=
6040: 20 2d 44 55 53 45 5f 53 45 45 3d 31 0a 65 6e 64   -DUSE_SEE=1.end
6050: 69 66 0a 0a 23 23 23 23 20 54 68 65 20 6f 70 74  if..#### The opt
6060: 69 6f 6e 20 2d 73 74 61 74 69 63 20 68 61 73 20  ion -static has 
6070: 6e 6f 20 65 66 66 65 63 74 20 6f 6e 20 4d 69 6e  no effect on Min
6080: 47 57 28 2d 77 36 34 29 2c 20 6f 6e 6c 79 20 64  GW(-w64), only d
6090: 79 6e 61 6d 69 63 0a 23 20 20 20 20 65 78 65 63  ynamic.#    exec
60a0: 75 74 61 62 6c 65 73 20 63 61 6e 20 62 65 20 62  utables can be b
60b0: 75 69 6c 74 20 77 68 65 6e 20 6c 69 6e 6b 69 6e  uilt when linkin
60c0: 67 20 77 69 74 68 20 4d 53 56 43 52 54 2e 20 20  g with MSVCRT.  
60d0: 4f 70 65 6e 53 53 4c 0a 23 20 20 20 20 28 6f 70  OpenSSL.#    (op
60e0: 74 69 6f 6e 61 6c 29 20 61 6e 64 20 7a 6c 69 62  tional) and zlib
60f0: 20 28 72 65 71 75 69 72 65 64 29 20 68 6f 77 65   (required) howe
6100: 76 65 72 20 61 72 65 20 61 6c 77 61 79 73 20 6c  ver are always l
6110: 69 6e 6b 65 64 20 69 6e 0a 23 20 20 20 20 73 74  inked in.#    st
6120: 61 74 69 63 61 6c 6c 79 2e 20 20 54 68 65 72 65  atically.  There
6130: 66 6f 72 65 2c 20 74 68 65 20 46 4f 53 53 49 4c  fore, the FOSSIL
6140: 5f 44 59 4e 41 4d 49 43 5f 42 55 49 4c 44 20 6f  _DYNAMIC_BUILD o
6150: 70 74 69 6f 6e 20 64 6f 65 73 0a 23 20 20 20 20  ption does.#    
6160: 6e 6f 74 20 72 65 61 6c 6c 79 20 61 70 70 6c 79  not really apply
6170: 20 74 6f 20 4d 69 6e 47 57 20 28 69 2e 65 2e 20   to MinGW (i.e. 
6180: 73 69 6e 63 65 20 41 4c 4c 20 65 78 74 65 72 6e  since ALL extern
6190: 61 6c 20 6c 69 62 72 61 72 69 65 73 0a 23 20 20  al libraries.#  
61a0: 20 20 61 72 65 20 4e 4f 54 20 6c 69 6e 6b 65 64    are NOT linked
61b0: 20 64 79 6e 61 6d 69 63 61 6c 6c 79 29 2e 0a 23   dynamically)..#
61c0: 0a 23 20 4c 49 42 20 3d 20 2d 73 74 61 74 69 63  .# LIB = -static
61d0: 0a 0a 23 23 23 23 20 4d 69 6e 47 57 3a 20 49 66  ..#### MinGW: If
61e0: 20 61 76 61 69 6c 61 62 6c 65 2c 20 75 73 65 20   available, use 
61f0: 74 68 65 20 55 6e 69 63 6f 64 65 20 63 61 70 61  the Unicode capa
6200: 62 6c 65 20 72 75 6e 74 69 6d 65 20 73 74 61 72  ble runtime star
6210: 74 75 70 20 63 6f 64 65 2e 0a 23 0a 69 66 6e 64  tup code..#.ifnd
6220: 65 66 20 4d 49 4e 47 57 5f 49 53 5f 33 32 42 49  ef MINGW_IS_32BI
6230: 54 5f 4f 4e 4c 59 0a 4c 49 42 20 2b 3d 20 2d 6d  T_ONLY.LIB += -m
6240: 75 6e 69 63 6f 64 65 0a 65 6e 64 69 66 0a 0a 23  unicode.endif..#
6250: 23 23 23 20 53 51 4c 69 74 65 3a 20 49 66 20 65  ### SQLite: If e
6260: 6e 61 62 6c 65 64 2c 20 75 73 65 20 74 68 65 20  nabled, use the 
6270: 73 79 73 74 65 6d 20 53 51 4c 69 74 65 20 6c 69  system SQLite li
6280: 62 72 61 72 79 2e 0a 23 0a 69 66 64 65 66 20 55  brary..#.ifdef U
6290: 53 45 5f 53 59 53 54 45 4d 5f 53 51 4c 49 54 45  SE_SYSTEM_SQLITE
62a0: 0a 4c 49 42 20 2b 3d 20 2d 6c 73 71 6c 69 74 65  .LIB += -lsqlite
62b0: 33 0a 65 6e 64 69 66 0a 0a 23 23 23 23 20 4f 70  3.endif..#### Op
62c0: 65 6e 53 53 4c 3a 20 41 64 64 20 74 68 65 20 6e  enSSL: Add the n
62d0: 65 63 65 73 73 61 72 79 20 6c 69 62 72 61 72 69  ecessary librari
62e0: 65 73 20 72 65 71 75 69 72 65 64 2c 20 69 66 20  es required, if 
62f0: 65 6e 61 62 6c 65 64 2e 0a 23 0a 69 66 64 65 66  enabled..#.ifdef
6300: 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 53   FOSSIL_ENABLE_S
6310: 53 4c 0a 4c 49 42 20 2b 3d 20 2d 6c 73 73 6c 20  SL.LIB += -lssl 
6320: 2d 6c 63 72 79 70 74 6f 20 2d 6c 67 64 69 33 32  -lcrypto -lgdi32
6330: 20 2d 6c 63 72 79 70 74 33 32 0a 65 6e 64 69 66   -lcrypt32.endif
6340: 0a 0a 23 23 23 23 20 54 63 6c 3a 20 41 64 64 20  ..#### Tcl: Add 
6350: 74 68 65 20 6e 65 63 65 73 73 61 72 79 20 6c 69  the necessary li
6360: 62 72 61 72 69 65 73 20 72 65 71 75 69 72 65 64  braries required
6370: 2c 20 69 66 20 65 6e 61 62 6c 65 64 2e 0a 23 0a  , if enabled..#.
6380: 69 66 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41  ifdef FOSSIL_ENA
6390: 42 4c 45 5f 54 43 4c 0a 4c 49 42 20 2b 3d 20 24  BLE_TCL.LIB += $
63a0: 28 4c 49 42 54 43 4c 29 0a 65 6e 64 69 66 0a 0a  (LIBTCL).endif..
63b0: 23 23 23 23 20 45 78 74 72 61 20 61 72 67 75 6d  #### Extra argum
63c0: 65 6e 74 73 20 66 6f 72 20 6c 69 6e 6b 69 6e 67  ents for linking
63d0: 20 74 68 65 20 66 69 6e 69 73 68 65 64 20 62 69   the finished bi
63e0: 6e 61 72 79 2e 20 20 46 6f 73 73 69 6c 20 6e 65  nary.  Fossil ne
63f0: 65 64 73 0a 23 20 20 20 20 74 6f 20 6c 69 6e 6b  eds.#    to link
6400: 20 61 67 61 69 6e 73 74 20 74 68 65 20 5a 2d 4c   against the Z-L
6410: 69 62 20 63 6f 6d 70 72 65 73 73 69 6f 6e 20 6c  ib compression l
6420: 69 62 72 61 72 79 2e 20 20 54 68 65 72 65 20 61  ibrary.  There a
6430: 72 65 20 6e 6f 0a 23 20 20 20 20 6f 74 68 65 72  re no.#    other
6440: 20 6d 61 6e 64 61 74 6f 72 79 20 64 65 70 65 6e   mandatory depen
6450: 64 65 6e 63 69 65 73 2e 0a 23 0a 4c 49 42 20 2b  dencies..#.LIB +
6460: 3d 20 2d 6c 6d 69 6e 67 77 65 78 0a 0a 23 23 23  = -lmingwex..###
6470: 23 20 57 68 65 6e 20 6e 6f 74 20 75 73 69 6e 67  # When not using
6480: 20 74 68 65 20 6d 69 6e 69 7a 20 63 6f 6d 70 72   the miniz compr
6490: 65 73 73 69 6f 6e 20 6c 69 62 72 61 72 79 2c 20  ession library, 
64a0: 7a 6c 69 62 20 69 73 20 72 65 71 75 69 72 65 64  zlib is required
64b0: 2e 0a 23 0a 69 66 6e 64 65 66 20 46 4f 53 53 49  ..#.ifndef FOSSI
64c0: 4c 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a 0a 4c  L_ENABLE_MINIZ.L
64d0: 49 42 20 2b 3d 20 2d 6c 7a 0a 65 6e 64 69 66 0a  IB += -lz.endif.
64e0: 0a 23 23 23 23 20 54 68 65 73 65 20 6c 69 62 72  .#### These libr
64f0: 61 72 69 65 73 20 4d 55 53 54 20 61 70 70 65 61  aries MUST appea
6500: 72 20 69 6e 20 74 68 65 20 73 61 6d 65 20 6f 72  r in the same or
6510: 64 65 72 20 61 73 20 74 68 65 79 20 64 6f 20 66  der as they do f
6520: 6f 72 20 54 63 6c 0a 23 20 20 20 20 6f 72 20 6c  or Tcl.#    or l
6530: 69 6e 6b 69 6e 67 20 77 69 74 68 20 69 74 20 77  inking with it w
6540: 69 6c 6c 20 6e 6f 74 20 77 6f 72 6b 20 28 65 78  ill not work (ex
6550: 61 63 74 20 72 65 61 73 6f 6e 20 75 6e 6b 6e 6f  act reason unkno
6560: 77 6e 29 2e 0a 23 0a 69 66 64 65 66 20 46 4f 53  wn)..#.ifdef FOS
6570: 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 0a 69  SIL_ENABLE_TCL.i
6580: 66 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42  fdef FOSSIL_ENAB
6590: 4c 45 5f 54 43 4c 5f 53 54 55 42 53 0a 4c 49 42  LE_TCL_STUBS.LIB
65a0: 20 2b 3d 20 2d 6c 6b 65 72 6e 65 6c 33 32 20 2d   += -lkernel32 -
65b0: 6c 77 73 32 5f 33 32 0a 65 6c 73 65 0a 4c 49 42  lws2_32.else.LIB
65c0: 20 2b 3d 20 2d 6c 6e 65 74 61 70 69 33 32 20 2d   += -lnetapi32 -
65d0: 6c 6b 65 72 6e 65 6c 33 32 20 2d 6c 75 73 65 72  lkernel32 -luser
65e0: 33 32 20 2d 6c 61 64 76 61 70 69 33 32 20 2d 6c  32 -ladvapi32 -l
65f0: 77 73 32 5f 33 32 0a 65 6e 64 69 66 0a 65 6c 73  ws2_32.endif.els
6600: 65 0a 4c 49 42 20 2b 3d 20 2d 6c 6b 65 72 6e 65  e.LIB += -lkerne
6610: 6c 33 32 20 2d 6c 77 73 32 5f 33 32 0a 65 6e 64  l32 -lws2_32.end
6620: 69 66 0a 0a 23 23 23 23 20 4c 69 62 72 61 72 79  if..#### Library
6630: 20 72 65 71 75 69 72 65 64 20 66 6f 72 20 44 4e   required for DN
6640: 53 20 6c 6f 6f 6b 75 70 73 2e 0a 23 0a 4c 49 42  S lookups..#.LIB
6650: 20 2b 3d 20 2d 6c 64 6e 73 61 70 69 0a 0a 23 23   += -ldnsapi..##
6660: 23 23 20 54 63 6c 20 73 68 65 6c 6c 20 66 6f 72  ## Tcl shell for
6670: 20 75 73 65 20 69 6e 20 72 75 6e 6e 69 6e 67 20   use in running 
6680: 74 68 65 20 66 6f 73 73 69 6c 20 74 65 73 74 20  the fossil test 
6690: 73 75 69 74 65 2e 20 20 54 68 69 73 20 69 73 20  suite.  This is 
66a0: 6f 6e 6c 79 0a 23 20 20 20 20 75 73 65 64 20 66  only.#    used f
66b0: 6f 72 20 74 65 73 74 69 6e 67 2e 0a 23 0a 54 43  or testing..#.TC
66c0: 4c 53 48 20 3d 20 74 63 6c 73 68 0a 0a 23 23 23  LSH = tclsh..###
66d0: 23 20 4e 75 6c 6c 73 6f 66 74 20 69 6e 73 74 61  # Nullsoft insta
66e0: 6c 6c 65 72 20 4d 61 6b 65 4e 53 49 53 20 6c 6f  ller MakeNSIS lo
66f0: 63 61 74 69 6f 6e 0a 23 0a 4d 41 4b 45 4e 53 49  cation.#.MAKENSI
6700: 53 20 3d 20 22 24 28 50 52 4f 47 52 41 4d 46 49  S = "$(PROGRAMFI
6710: 4c 45 53 29 5c 4e 53 49 53 5c 4d 61 6b 65 4e 53  LES)\NSIS\MakeNS
6720: 49 53 2e 65 78 65 22 0a 0a 23 23 23 23 20 49 6e  IS.exe"..#### In
6730: 6e 6f 20 53 65 74 75 70 20 65 78 65 63 75 74 61  no Setup executa
6740: 62 6c 65 20 6c 6f 63 61 74 69 6f 6e 0a 23 0a 49  ble location.#.I
6750: 4e 4e 4f 53 45 54 55 50 20 3d 20 22 24 28 50 52  NNOSETUP = "$(PR
6760: 4f 47 52 41 4d 46 49 4c 45 53 29 5c 49 6e 6e 6f  OGRAMFILES)\Inno
6770: 20 53 65 74 75 70 20 35 5c 49 53 43 43 2e 65 78   Setup 5\ISCC.ex
6780: 65 22 0a 0a 23 23 23 23 20 49 6e 63 6c 75 64 65  e"..#### Include
6790: 20 61 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e   a configuration
67a0: 20 66 69 6c 65 20 74 68 61 74 20 63 61 6e 20 6f   file that can o
67b0: 76 65 72 72 69 64 65 20 61 6e 79 20 6f 6e 65 20  verride any one 
67c0: 6f 66 20 74 68 65 73 65 20 73 65 74 74 69 6e 67  of these setting
67d0: 73 2e 0a 23 0a 2d 69 6e 63 6c 75 64 65 20 63 6f  s..#.-include co
67e0: 6e 66 69 67 2e 77 33 32 0a 0a 23 20 53 54 4f 50  nfig.w32..# STOP
67f0: 20 48 45 52 45 0a 23 20 59 6f 75 20 73 68 6f 75   HERE.# You shou
6800: 6c 64 20 6e 6f 74 20 6e 65 65 64 20 74 6f 20 63  ld not need to c
6810: 68 61 6e 67 65 20 61 6e 79 74 68 69 6e 67 20 62  hange anything b
6820: 65 6c 6f 77 20 74 68 69 73 20 6c 69 6e 65 0a 23  elow this line.#
6830: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
6840: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
6850: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
6860: 2d 2d 2d 2d 2d 2d 2d 2d 0a 58 42 43 43 20 3d 20  --------.XBCC = 
6870: 24 28 42 43 43 29 20 24 28 43 46 4c 41 47 53 29  $(BCC) $(CFLAGS)
6880: 0a 58 54 43 43 20 3d 20 24 28 54 43 43 29 20 24  .XTCC = $(TCC) $
6890: 28 43 46 4c 41 47 53 29 20 2d 49 2e 20 2d 49 24  (CFLAGS) -I. -I$
68a0: 28 53 52 43 44 49 52 29 0a 7d 0a 77 72 69 74 65  (SRCDIR).}.write
68b0: 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 53  ln -nonewline "S
68c0: 52 43 20 3d 22 0a 66 6f 72 65 61 63 68 20 73 20  RC =".foreach s 
68d0: 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20  [lsort $src] {. 
68e0: 20 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e 65 77 6c   writeln -nonewl
68f0: 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 5c 24 28 53  ine " \\\n  \$(S
6900: 52 43 44 49 52 29 2f 24 73 2e 63 22 0a 7d 0a 77  RCDIR)/$s.c".}.w
6910: 72 69 74 65 6c 6e 20 22 5c 6e 22 0a 77 72 69 74  riteln "\n".writ
6920: 65 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  eln -nonewline "
6930: 45 58 54 52 41 5f 46 49 4c 45 53 20 3d 22 0a 66  EXTRA_FILES =".f
6940: 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20  oreach s [lsort 
6950: 24 65 78 74 72 61 5f 66 69 6c 65 73 5d 20 7b 0a  $extra_files] {.
6960: 20 20 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e 65 77    writeln -nonew
6970: 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 5c 24 28  line " \\\n  \$(
6980: 53 52 43 44 49 52 29 2f 24 73 22 0a 7d 0a 77 72  SRCDIR)/$s".}.wr
6990: 69 74 65 6c 6e 20 22 5c 6e 22 0a 77 72 69 74 65  iteln "\n".write
69a0: 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 54  ln -nonewline "T
69b0: 52 41 4e 53 5f 53 52 43 20 3d 22 0a 66 6f 72 65  RANS_SRC =".fore
69c0: 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72  ach s [lsort $sr
69d0: 63 5d 20 7b 0a 20 20 77 72 69 74 65 6c 6e 20 2d  c] {.  writeln -
69e0: 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e  nonewline " \\\n
69f0: 20 20 5c 24 28 4f 42 4a 44 49 52 29 2f 24 7b 73    \$(OBJDIR)/${s
6a00: 7d 5f 2e 63 22 0a 7d 0a 77 72 69 74 65 6c 6e 20  }_.c".}.writeln 
6a10: 22 5c 6e 22 0a 77 72 69 74 65 6c 6e 20 2d 6e 6f  "\n".writeln -no
6a20: 6e 65 77 6c 69 6e 65 20 22 4f 42 4a 20 3d 22 0a  newline "OBJ =".
6a30: 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74  foreach s [lsort
6a40: 20 24 73 72 63 5d 20 7b 0a 20 20 77 72 69 74 65   $src] {.  write
6a50: 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20  ln -nonewline " 
6a60: 5c 5c 5c 6e 20 5c 24 28 4f 42 4a 44 49 52 29 2f  \\\n \$(OBJDIR)/
6a70: 24 73 2e 6f 22 0a 7d 0a 77 72 69 74 65 6c 6e 20  $s.o".}.writeln 
6a80: 22 5c 6e 22 0a 77 72 69 74 65 6c 6e 20 22 41 50  "\n".writeln "AP
6a90: 50 4e 41 4d 45 20 20 20 20 3d 20 24 7b 6e 61 6d  PNAME    = ${nam
6aa0: 65 7d 2e 65 78 65 22 0a 77 72 69 74 65 6c 6e 20  e}.exe".writeln 
6ab0: 22 41 50 50 54 41 52 47 45 54 53 20 3d 22 0a 77  "APPTARGETS =".w
6ac0: 72 69 74 65 6c 6e 20 7b 0a 23 23 23 23 20 49 66  riteln {.#### If
6ad0: 20 74 68 65 20 55 53 45 5f 57 49 4e 44 4f 57 53   the USE_WINDOWS
6ae0: 20 76 61 72 69 61 62 6c 65 20 65 78 69 73 74 73   variable exists
6af0: 2c 20 69 74 20 69 73 20 61 73 73 75 6d 65 64 20  , it is assumed 
6b00: 74 68 61 74 20 77 65 20 61 72 65 20 62 75 69 6c  that we are buil
6b10: 64 69 6e 67 0a 23 20 20 20 20 69 6e 73 69 64 65  ding.#    inside
6b20: 20 6f 66 20 61 20 57 69 6e 64 6f 77 73 2d 73 74   of a Windows-st
6b30: 79 6c 65 20 73 68 65 6c 6c 3b 20 6f 74 68 65 72  yle shell; other
6b40: 77 69 73 65 2c 20 69 74 20 69 73 20 61 73 73 75  wise, it is assu
6b50: 6d 65 64 20 74 68 61 74 20 77 65 20 61 72 65 0a  med that we are.
6b60: 23 20 20 20 20 62 75 69 6c 64 69 6e 67 20 69 6e  #    building in
6b70: 73 69 64 65 20 6f 66 20 61 20 55 6e 69 78 2d 73  side of a Unix-s
6b80: 74 79 6c 65 20 73 68 65 6c 6c 2e 20 20 4e 6f 74  tyle shell.  Not
6b90: 65 20 74 68 61 74 20 74 68 65 20 22 6d 6f 76 65  e that the "move
6ba0: 22 20 63 6f 6d 6d 61 6e 64 20 69 73 0a 23 20 20  " command is.#  
6bb0: 20 20 62 72 6f 6b 65 6e 20 77 68 65 6e 20 61 74    broken when at
6bc0: 74 65 6d 70 74 69 6e 67 20 74 6f 20 75 73 65 20  tempting to use 
6bd0: 69 74 20 66 72 6f 6d 20 74 68 65 20 57 69 6e 64  it from the Wind
6be0: 6f 77 73 20 73 68 65 6c 6c 20 76 69 61 20 4d 69  ows shell via Mi
6bf0: 6e 47 57 20 6d 61 6b 65 0a 23 20 20 20 20 62 65  nGW make.#    be
6c00: 63 61 75 73 65 20 74 68 65 20 53 48 45 4c 4c 20  cause the SHELL 
6c10: 76 61 72 69 61 62 6c 65 20 69 73 20 6f 6e 6c 79  variable is only
6c20: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 61 69   used for certai
6c30: 6e 20 63 6f 6d 6d 61 6e 64 73 20 74 68 61 74 20  n commands that 
6c40: 61 72 65 0a 23 20 20 20 20 72 65 63 6f 67 6e 69  are.#    recogni
6c50: 7a 65 64 20 69 6e 74 65 72 6e 61 6c 6c 79 20 62  zed internally b
6c60: 79 20 6d 61 6b 65 2e 0a 23 0a 69 66 64 65 66 20  y make..#.ifdef 
6c70: 55 53 45 5f 57 49 4e 44 4f 57 53 0a 54 52 41 4e  USE_WINDOWS.TRAN
6c80: 53 4c 41 54 45 20 20 20 3d 20 24 28 73 75 62 73  SLATE   = $(subs
6c90: 74 20 2f 2c 5c 2c 24 28 4f 42 4a 44 49 52 29 2f  t /,\,$(OBJDIR)/
6ca0: 74 72 61 6e 73 6c 61 74 65 2e 65 78 65 29 0a 4d  translate.exe).M
6cb0: 41 4b 45 48 45 41 44 45 52 53 20 3d 20 24 28 73  AKEHEADERS = $(s
6cc0: 75 62 73 74 20 2f 2c 5c 2c 24 28 4f 42 4a 44 49  ubst /,\,$(OBJDI
6cd0: 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e 65  R)/makeheaders.e
6ce0: 78 65 29 0a 4d 4b 49 4e 44 45 58 20 20 20 20 20  xe).MKINDEX     
6cf0: 3d 20 24 28 73 75 62 73 74 20 2f 2c 5c 2c 24 28  = $(subst /,\,$(
6d00: 4f 42 4a 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e  OBJDIR)/mkindex.
6d10: 65 78 65 29 0a 4d 4b 42 55 49 4c 54 49 4e 20 20  exe).MKBUILTIN  
6d20: 20 3d 20 24 28 73 75 62 73 74 20 2f 2c 5c 2c 24   = $(subst /,\,$
6d30: 28 4f 42 4a 44 49 52 29 2f 6d 6b 62 75 69 6c 74  (OBJDIR)/mkbuilt
6d40: 69 6e 2e 65 78 65 29 0a 4d 4b 56 45 52 53 49 4f  in.exe).MKVERSIO
6d50: 4e 20 20 20 3d 20 24 28 73 75 62 73 74 20 2f 2c  N   = $(subst /,
6d60: 5c 2c 24 28 4f 42 4a 44 49 52 29 2f 6d 6b 76 65  \,$(OBJDIR)/mkve
6d70: 72 73 69 6f 6e 2e 65 78 65 29 0a 43 4f 44 45 43  rsion.exe).CODEC
6d80: 48 45 43 4b 31 20 20 3d 20 24 28 73 75 62 73 74  HECK1  = $(subst
6d90: 20 2f 2c 5c 2c 24 28 4f 42 4a 44 49 52 29 2f 63   /,\,$(OBJDIR)/c
6da0: 6f 64 65 63 68 65 63 6b 31 2e 65 78 65 29 0a 43  odecheck1.exe).C
6db0: 41 54 20 20 20 20 20 20 20 20 20 3d 20 74 79 70  AT         = typ
6dc0: 65 0a 43 50 20 20 20 20 20 20 20 20 20 20 3d 20  e.CP          = 
6dd0: 63 6f 70 79 0a 47 52 45 50 20 20 20 20 20 20 20  copy.GREP       
6de0: 20 3d 20 66 69 6e 64 0a 4d 56 20 20 20 20 20 20   = find.MV      
6df0: 20 20 20 20 3d 20 63 6f 70 79 0a 52 4d 20 20 20      = copy.RM   
6e00: 20 20 20 20 20 20 20 3d 20 64 65 6c 20 2f 51 0a         = del /Q.
6e10: 4d 4b 44 49 52 20 20 20 20 20 20 20 3d 20 2d 6d  MKDIR       = -m
6e20: 6b 64 69 72 0a 52 4d 44 49 52 20 20 20 20 20 20  kdir.RMDIR      
6e30: 20 3d 20 72 6d 64 69 72 20 2f 53 20 2f 51 0a 65   = rmdir /S /Q.e
6e40: 6c 73 65 0a 54 52 41 4e 53 4c 41 54 45 20 20 20  lse.TRANSLATE   
6e50: 3d 20 24 28 4f 42 4a 44 49 52 29 2f 74 72 61 6e  = $(OBJDIR)/tran
6e60: 73 6c 61 74 65 2e 65 78 65 0a 4d 41 4b 45 48 45  slate.exe.MAKEHE
6e70: 41 44 45 52 53 20 3d 20 24 28 4f 42 4a 44 49 52  ADERS = $(OBJDIR
6e80: 29 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e 65 78  )/makeheaders.ex
6e90: 65 0a 4d 4b 49 4e 44 45 58 20 20 20 20 20 3d 20  e.MKINDEX     = 
6ea0: 24 28 4f 42 4a 44 49 52 29 2f 6d 6b 69 6e 64 65  $(OBJDIR)/mkinde
6eb0: 78 2e 65 78 65 0a 4d 4b 42 55 49 4c 54 49 4e 20  x.exe.MKBUILTIN 
6ec0: 20 20 3d 20 24 28 4f 42 4a 44 49 52 29 2f 6d 6b    = $(OBJDIR)/mk
6ed0: 62 75 69 6c 74 69 6e 2e 65 78 65 0a 4d 4b 56 45  builtin.exe.MKVE
6ee0: 52 53 49 4f 4e 20 20 20 3d 20 24 28 4f 42 4a 44  RSION   = $(OBJD
6ef0: 49 52 29 2f 6d 6b 76 65 72 73 69 6f 6e 2e 65 78  IR)/mkversion.ex
6f00: 65 0a 43 4f 44 45 43 48 45 43 4b 31 20 20 3d 20  e.CODECHECK1  = 
6f10: 24 28 4f 42 4a 44 49 52 29 2f 63 6f 64 65 63 68  $(OBJDIR)/codech
6f20: 65 63 6b 31 2e 65 78 65 0a 43 41 54 20 20 20 20  eck1.exe.CAT    
6f30: 20 20 20 20 20 3d 20 63 61 74 0a 43 50 20 20 20       = cat.CP   
6f40: 20 20 20 20 20 20 20 3d 20 63 70 0a 47 52 45 50         = cp.GREP
6f50: 20 20 20 20 20 20 20 20 3d 20 67 72 65 70 0a 4d          = grep.M
6f60: 56 20 20 20 20 20 20 20 20 20 20 3d 20 6d 76 0a  V          = mv.
6f70: 52 4d 20 20 20 20 20 20 20 20 20 20 3d 20 72 6d  RM          = rm
6f80: 20 2d 66 0a 4d 4b 44 49 52 20 20 20 20 20 20 20   -f.MKDIR       
6f90: 3d 20 2d 6d 6b 64 69 72 20 2d 70 0a 52 4d 44 49  = -mkdir -p.RMDI
6fa0: 52 20 20 20 20 20 20 20 3d 20 72 6d 20 2d 72 66  R       = rm -rf
6fb0: 0a 65 6e 64 69 66 7d 0a 0a 77 72 69 74 65 6c 6e  .endif}..writeln
6fc0: 20 7b 0a 61 6c 6c 3a 09 24 28 4f 42 4a 44 49 52   {.all:.$(OBJDIR
6fd0: 29 20 24 28 41 50 50 4e 41 4d 45 29 0a 0a 24 28  ) $(APPNAME)..$(
6fe0: 4f 42 4a 44 49 52 29 2f 66 6f 73 73 69 6c 2e 6f  OBJDIR)/fossil.o
6ff0: 3a 09 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 77  :.$(SRCDIR)/../w
7000: 69 6e 2f 66 6f 73 73 69 6c 2e 72 63 20 24 28 4f  in/fossil.rc $(O
7010: 42 4a 44 49 52 29 2f 56 45 52 53 49 4f 4e 2e 68  BJDIR)/VERSION.h
7020: 0a 69 66 64 65 66 20 55 53 45 5f 57 49 4e 44 4f  .ifdef USE_WINDO
7030: 57 53 0a 09 24 28 43 41 54 29 20 24 28 73 75 62  WS..$(CAT) $(sub
7040: 73 74 20 2f 2c 5c 2c 24 28 53 52 43 44 49 52 29  st /,\,$(SRCDIR)
7050: 5c 6d 69 6e 69 7a 2e 63 29 20 7c 20 24 28 47 52  \miniz.c) | $(GR
7060: 45 50 29 20 22 64 65 66 69 6e 65 20 4d 5a 5f 56  EP) "define MZ_V
7070: 45 52 53 49 4f 4e 22 20 3e 20 24 28 73 75 62 73  ERSION" > $(subs
7080: 74 20 2f 2c 5c 2c 24 28 4f 42 4a 44 49 52 29 5c  t /,\,$(OBJDIR)\
7090: 6d 69 6e 69 7a 76 65 72 2e 68 29 0a 09 24 28 43  minizver.h)..$(C
70a0: 50 29 20 24 28 73 75 62 73 74 20 2f 2c 5c 2c 24  P) $(subst /,\,$
70b0: 28 53 52 43 44 49 52 29 5c 2e 2e 5c 77 69 6e 5c  (SRCDIR)\..\win\
70c0: 66 6f 73 73 69 6c 2e 72 63 29 20 24 28 73 75 62  fossil.rc) $(sub
70d0: 73 74 20 2f 2c 5c 2c 24 28 4f 42 4a 44 49 52 29  st /,\,$(OBJDIR)
70e0: 29 0a 09 24 28 43 50 29 20 24 28 73 75 62 73 74  )..$(CP) $(subst
70f0: 20 2f 2c 5c 2c 24 28 53 52 43 44 49 52 29 5c 2e   /,\,$(SRCDIR)\.
7100: 2e 5c 77 69 6e 5c 66 6f 73 73 69 6c 2e 69 63 6f  .\win\fossil.ico
7110: 29 20 24 28 73 75 62 73 74 20 2f 2c 5c 2c 24 28  ) $(subst /,\,$(
7120: 4f 42 4a 44 49 52 29 29 0a 09 24 28 43 50 29 20  OBJDIR))..$(CP) 
7130: 24 28 73 75 62 73 74 20 2f 2c 5c 2c 24 28 53 52  $(subst /,\,$(SR
7140: 43 44 49 52 29 5c 2e 2e 5c 77 69 6e 5c 66 6f 73  CDIR)\..\win\fos
7150: 73 69 6c 2e 65 78 65 2e 6d 61 6e 69 66 65 73 74  sil.exe.manifest
7160: 29 20 24 28 73 75 62 73 74 20 2f 2c 5c 2c 24 28  ) $(subst /,\,$(
7170: 4f 42 4a 44 49 52 29 29 0a 65 6c 73 65 0a 09 24  OBJDIR)).else..$
7180: 28 43 41 54 29 20 24 28 53 52 43 44 49 52 29 2f  (CAT) $(SRCDIR)/
7190: 6d 69 6e 69 7a 2e 63 20 7c 20 24 28 47 52 45 50  miniz.c | $(GREP
71a0: 29 20 22 64 65 66 69 6e 65 20 4d 5a 5f 56 45 52  ) "define MZ_VER
71b0: 53 49 4f 4e 22 20 3e 20 24 28 4f 42 4a 44 49 52  SION" > $(OBJDIR
71c0: 29 2f 6d 69 6e 69 7a 76 65 72 2e 68 0a 09 24 28  )/minizver.h..$(
71d0: 43 50 29 20 24 28 53 52 43 44 49 52 29 2f 2e 2e  CP) $(SRCDIR)/..
71e0: 2f 77 69 6e 2f 66 6f 73 73 69 6c 2e 72 63 20 24  /win/fossil.rc $
71f0: 28 4f 42 4a 44 49 52 29 0a 09 24 28 43 50 29 20  (OBJDIR)..$(CP) 
7200: 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 77 69 6e  $(SRCDIR)/../win
7210: 2f 66 6f 73 73 69 6c 2e 69 63 6f 20 24 28 4f 42  /fossil.ico $(OB
7220: 4a 44 49 52 29 0a 09 24 28 43 50 29 20 24 28 53  JDIR)..$(CP) $(S
7230: 52 43 44 49 52 29 2f 2e 2e 2f 77 69 6e 2f 66 6f  RCDIR)/../win/fo
7240: 73 73 69 6c 2e 65 78 65 2e 6d 61 6e 69 66 65 73  ssil.exe.manifes
7250: 74 20 24 28 4f 42 4a 44 49 52 29 0a 65 6e 64 69  t $(OBJDIR).endi
7260: 66 0a 09 24 28 52 43 43 29 20 24 28 4f 42 4a 44  f..$(RCC) $(OBJD
7270: 49 52 29 2f 66 6f 73 73 69 6c 2e 72 63 20 2d 6f  IR)/fossil.rc -o
7280: 20 24 28 4f 42 4a 44 49 52 29 2f 66 6f 73 73 69   $(OBJDIR)/fossi
7290: 6c 2e 6f 0a 0a 69 6e 73 74 61 6c 6c 3a 09 24 28  l.o..install:.$(
72a0: 4f 42 4a 44 49 52 29 20 24 28 41 50 50 4e 41 4d  OBJDIR) $(APPNAM
72b0: 45 29 0a 69 66 64 65 66 20 55 53 45 5f 57 49 4e  E).ifdef USE_WIN
72c0: 44 4f 57 53 0a 09 24 28 4d 4b 44 49 52 29 20 24  DOWS..$(MKDIR) $
72d0: 28 73 75 62 73 74 20 2f 2c 5c 2c 24 28 49 4e 53  (subst /,\,$(INS
72e0: 54 41 4c 4c 44 49 52 29 29 0a 09 24 28 43 50 29  TALLDIR))..$(CP)
72f0: 20 24 28 73 75 62 73 74 20 2f 2c 5c 2c 24 28 41   $(subst /,\,$(A
7300: 50 50 4e 41 4d 45 29 29 20 24 28 73 75 62 73 74  PPNAME)) $(subst
7310: 20 2f 2c 5c 2c 24 28 49 4e 53 54 41 4c 4c 44 49   /,\,$(INSTALLDI
7320: 52 29 29 0a 65 6c 73 65 0a 09 24 28 4d 4b 44 49  R)).else..$(MKDI
7330: 52 29 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 29  R) $(INSTALLDIR)
7340: 0a 09 24 28 43 50 29 20 24 28 41 50 50 4e 41 4d  ..$(CP) $(APPNAM
7350: 45 29 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 29  E) $(INSTALLDIR)
7360: 0a 65 6e 64 69 66 0a 0a 24 28 4f 42 4a 44 49 52  .endif..$(OBJDIR
7370: 29 3a 0a 69 66 64 65 66 20 55 53 45 5f 57 49 4e  ):.ifdef USE_WIN
7380: 44 4f 57 53 0a 09 24 28 4d 4b 44 49 52 29 20 24  DOWS..$(MKDIR) $
7390: 28 73 75 62 73 74 20 2f 2c 5c 2c 24 28 4f 42 4a  (subst /,\,$(OBJ
73a0: 44 49 52 29 29 0a 65 6c 73 65 0a 09 24 28 4d 4b  DIR)).else..$(MK
73b0: 44 49 52 29 20 24 28 4f 42 4a 44 49 52 29 0a 65  DIR) $(OBJDIR).e
73c0: 6e 64 69 66 0a 0a 24 28 54 52 41 4e 53 4c 41 54  ndif..$(TRANSLAT
73d0: 45 29 3a 09 24 28 53 52 43 44 49 52 29 2f 74 72  E):.$(SRCDIR)/tr
73e0: 61 6e 73 6c 61 74 65 2e 63 0a 09 24 28 58 42 43  anslate.c..$(XBC
73f0: 43 29 20 2d 6f 20 24 40 20 24 28 53 52 43 44 49  C) -o $@ $(SRCDI
7400: 52 29 2f 74 72 61 6e 73 6c 61 74 65 2e 63 0a 0a  R)/translate.c..
7410: 24 28 4d 41 4b 45 48 45 41 44 45 52 53 29 3a 09  $(MAKEHEADERS):.
7420: 24 28 53 52 43 44 49 52 29 2f 6d 61 6b 65 68 65  $(SRCDIR)/makehe
7430: 61 64 65 72 73 2e 63 0a 09 24 28 58 42 43 43 29  aders.c..$(XBCC)
7440: 20 2d 6f 20 24 40 20 24 28 53 52 43 44 49 52 29   -o $@ $(SRCDIR)
7450: 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e 63 0a 0a  /makeheaders.c..
7460: 24 28 4d 4b 49 4e 44 45 58 29 3a 09 24 28 53 52  $(MKINDEX):.$(SR
7470: 43 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e 63 0a  CDIR)/mkindex.c.
7480: 09 24 28 58 42 43 43 29 20 2d 6f 20 24 40 20 24  .$(XBCC) -o $@ $
7490: 28 53 52 43 44 49 52 29 2f 6d 6b 69 6e 64 65 78  (SRCDIR)/mkindex
74a0: 2e 63 0a 0a 24 28 4d 4b 42 55 49 4c 54 49 4e 29  .c..$(MKBUILTIN)
74b0: 3a 09 24 28 53 52 43 44 49 52 29 2f 6d 6b 62 75  :.$(SRCDIR)/mkbu
74c0: 69 6c 74 69 6e 2e 63 0a 09 24 28 58 42 43 43 29  iltin.c..$(XBCC)
74d0: 20 2d 6f 20 24 40 20 24 28 53 52 43 44 49 52 29   -o $@ $(SRCDIR)
74e0: 2f 6d 6b 62 75 69 6c 74 69 6e 2e 63 0a 0a 24 28  /mkbuiltin.c..$(
74f0: 4d 4b 56 45 52 53 49 4f 4e 29 3a 20 24 28 53 52  MKVERSION): $(SR
7500: 43 44 49 52 29 2f 6d 6b 76 65 72 73 69 6f 6e 2e  CDIR)/mkversion.
7510: 63 0a 09 24 28 58 42 43 43 29 20 2d 6f 20 24 40  c..$(XBCC) -o $@
7520: 20 24 28 53 52 43 44 49 52 29 2f 6d 6b 76 65 72   $(SRCDIR)/mkver
7530: 73 69 6f 6e 2e 63 0a 0a 24 28 43 4f 44 45 43 48  sion.c..$(CODECH
7540: 45 43 4b 31 29 3a 09 24 28 53 52 43 44 49 52 29  ECK1):.$(SRCDIR)
7550: 2f 63 6f 64 65 63 68 65 63 6b 31 2e 63 0a 09 24  /codecheck1.c..$
7560: 28 58 42 43 43 29 20 2d 6f 20 24 40 20 24 28 53  (XBCC) -o $@ $(S
7570: 52 43 44 49 52 29 2f 63 6f 64 65 63 68 65 63 6b  RCDIR)/codecheck
7580: 31 2e 63 0a 0a 23 20 57 41 52 4e 49 4e 47 2e 20  1.c..# WARNING. 
7590: 44 41 4e 47 45 52 2e 20 52 75 6e 6e 69 6e 67 20  DANGER. Running 
75a0: 74 68 65 20 74 65 73 74 20 73 75 69 74 65 20 6d  the test suite m
75b0: 6f 64 69 66 69 65 73 20 74 68 65 20 72 65 70 6f  odifies the repo
75c0: 73 69 74 6f 72 79 20 74 68 65 0a 23 20 62 75 69  sitory the.# bui
75d0: 6c 64 20 69 73 20 64 6f 6e 65 20 66 72 6f 6d 2c  ld is done from,
75e0: 20 69 2e 65 2e 20 74 68 65 20 63 68 65 63 6b 6f   i.e. the checko
75f0: 75 74 20 62 65 6c 6f 6e 67 73 20 74 6f 2e 20 44  ut belongs to. D
7600: 6f 20 6e 6f 74 20 73 79 6e 63 2f 70 75 73 68 0a  o not sync/push.
7610: 23 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79  # the repository
7620: 20 61 66 74 65 72 20 72 75 6e 6e 69 6e 67 20 74   after running t
7630: 68 65 20 74 65 73 74 73 2e 0a 74 65 73 74 3a 09  he tests..test:.
7640: 24 28 4f 42 4a 44 49 52 29 20 24 28 41 50 50 4e  $(OBJDIR) $(APPN
7650: 41 4d 45 29 0a 09 24 28 54 43 4c 53 48 29 20 24  AME)..$(TCLSH) $
7660: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 74 65 73 74  (SRCDIR)/../test
7670: 2f 74 65 73 74 65 72 2e 74 63 6c 20 24 28 41 50  /tester.tcl $(AP
7680: 50 4e 41 4d 45 29 0a 0a 24 28 4f 42 4a 44 49 52  PNAME)..$(OBJDIR
7690: 29 2f 56 45 52 53 49 4f 4e 2e 68 3a 09 24 28 53  )/VERSION.h:.$(S
76a0: 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65  RCDIR)/../manife
76b0: 73 74 2e 75 75 69 64 20 24 28 53 52 43 44 49 52  st.uuid $(SRCDIR
76c0: 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 20 24 28  )/../manifest $(
76d0: 4d 4b 56 45 52 53 49 4f 4e 29 20 24 28 4f 42 4a  MKVERSION) $(OBJ
76e0: 44 49 52 29 2f 70 68 6f 6e 79 2e 68 0a 09 24 28  DIR)/phony.h..$(
76f0: 4d 4b 56 45 52 53 49 4f 4e 29 20 24 28 53 52 43  MKVERSION) $(SRC
7700: 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74  DIR)/../manifest
7710: 2e 75 75 69 64 20 24 28 53 52 43 44 49 52 29 2f  .uuid $(SRCDIR)/
7720: 2e 2e 2f 6d 61 6e 69 66 65 73 74 20 24 28 53 52  ../manifest $(SR
7730: 43 44 49 52 29 2f 2e 2e 2f 56 45 52 53 49 4f 4e  CDIR)/../VERSION
7740: 20 3e 24 40 0a 0a 24 28 4f 42 4a 44 49 52 29 2f   >$@..$(OBJDIR)/
7750: 70 68 6f 6e 79 2e 68 3a 0a 09 23 20 46 6f 72 63  phony.h:..# Forc
7760: 65 20 72 65 62 75 69 6c 64 20 6f 66 20 56 45 52  e rebuild of VER
7770: 53 49 4f 4e 2e 68 20 65 76 65 72 79 20 74 69 6d  SION.h every tim
7780: 65 20 22 6d 61 6b 65 22 20 69 73 20 72 75 6e 0a  e "make" is run.
7790: 0a 23 20 54 68 65 20 55 53 45 5f 53 59 53 54 45  .# The USE_SYSTE
77a0: 4d 5f 53 51 4c 49 54 45 20 76 61 72 69 61 62 6c  M_SQLITE variabl
77b0: 65 20 6d 61 79 20 62 65 20 75 6e 64 65 66 69 6e  e may be undefin
77c0: 65 64 2c 20 73 65 74 20 74 6f 20 30 2c 20 6f 72  ed, set to 0, or
77d0: 20 73 65 74 0a 23 20 74 6f 20 31 2e 20 49 66 20   set.# to 1. If 
77e0: 69 74 20 69 73 20 73 65 74 20 74 6f 20 31 2c 20  it is set to 1, 
77f0: 74 68 65 6e 20 74 68 65 72 65 20 69 73 20 6e 6f  then there is no
7800: 20 6e 65 65 64 20 74 6f 20 62 75 69 6c 64 20 6f   need to build o
7810: 72 20 6c 69 6e 6b 0a 23 20 74 68 65 20 73 71 6c  r link.# the sql
7820: 69 74 65 33 2e 6f 20 6f 62 6a 65 63 74 2e 20 49  ite3.o object. I
7830: 6e 73 74 65 61 64 2c 20 74 68 65 20 73 79 73 74  nstead, the syst
7840: 65 6d 20 53 51 4c 69 74 65 20 77 69 6c 6c 20 62  em SQLite will b
7850: 65 20 6c 69 6e 6b 65 64 0a 23 20 75 73 69 6e 67  e linked.# using
7860: 20 2d 6c 73 71 6c 69 74 65 33 2e 0a 53 51 4c 49   -lsqlite3..SQLI
7870: 54 45 33 5f 4f 42 4a 2e 30 20 3d 20 24 28 4f 42  TE3_OBJ.0 = $(OB
7880: 4a 44 49 52 29 2f 73 71 6c 69 74 65 33 2e 6f 0a  JDIR)/sqlite3.o.
7890: 53 51 4c 49 54 45 33 5f 4f 42 4a 2e 31 20 3d 0a  SQLITE3_OBJ.1 =.
78a0: 53 51 4c 49 54 45 33 5f 4f 42 4a 2e 20 20 3d 20  SQLITE3_OBJ.  = 
78b0: 24 28 53 51 4c 49 54 45 33 5f 4f 42 4a 2e 30 29  $(SQLITE3_OBJ.0)
78c0: 0a 0a 23 20 54 68 65 20 46 4f 53 53 49 4c 5f 45  ..# The FOSSIL_E
78d0: 4e 41 42 4c 45 5f 4d 49 4e 49 5a 20 76 61 72 69  NABLE_MINIZ vari
78e0: 61 62 6c 65 20 6d 61 79 20 62 65 20 75 6e 64 65  able may be unde
78f0: 66 69 6e 65 64 2c 20 73 65 74 20 74 6f 20 30 2c  fined, set to 0,
7900: 20 6f 72 0a 23 20 73 65 74 20 74 6f 20 31 2e 20   or.# set to 1. 
7910: 20 49 66 20 69 74 20 69 73 20 73 65 74 20 74 6f   If it is set to
7920: 20 31 2c 20 74 68 65 20 6d 69 6e 69 7a 20 6c 69   1, the miniz li
7930: 62 72 61 72 79 20 69 6e 63 6c 75 64 65 64 20 69  brary included i
7940: 6e 20 74 68 65 0a 23 20 73 6f 75 72 63 65 20 74  n the.# source t
7950: 72 65 65 20 73 68 6f 75 6c 64 20 62 65 20 75 73  ree should be us
7960: 65 64 3b 20 6f 74 68 65 72 77 69 73 65 2c 20 69  ed; otherwise, i
7970: 74 20 73 68 6f 75 6c 64 20 6e 6f 74 2e 0a 4d 49  t should not..MI
7980: 4e 49 5a 5f 4f 42 4a 2e 30 20 3d 0a 4d 49 4e 49  NIZ_OBJ.0 =.MINI
7990: 5a 5f 4f 42 4a 2e 31 20 3d 20 24 28 4f 42 4a 44  Z_OBJ.1 = $(OBJD
79a0: 49 52 29 2f 6d 69 6e 69 7a 2e 6f 0a 4d 49 4e 49  IR)/miniz.o.MINI
79b0: 5a 5f 4f 42 4a 2e 20 20 3d 20 24 28 4d 49 4e 49  Z_OBJ.  = $(MINI
79c0: 5a 5f 4f 42 4a 2e 30 29 0a 0a 23 20 54 68 65 20  Z_OBJ.0)..# The 
79d0: 55 53 45 5f 53 45 45 20 76 61 72 69 61 62 6c 65  USE_SEE variable
79e0: 20 6d 61 79 20 62 65 20 75 6e 64 65 66 69 6e 65   may be undefine
79f0: 64 2c 20 30 20 6f 72 20 31 2e 20 20 49 66 20 75  d, 0 or 1.  If u
7a00: 6e 64 65 66 69 6e 65 64 20 6f 72 0a 23 20 30 2c  ndefined or.# 0,
7a10: 20 6f 72 64 69 6e 61 72 79 20 53 51 4c 69 74 65   ordinary SQLite
7a20: 20 69 73 20 75 73 65 64 2e 20 20 49 66 20 31 2c   is used.  If 1,
7a30: 20 74 68 65 6e 20 73 71 6c 69 74 65 33 2d 73 65   then sqlite3-se
7a40: 65 2e 63 20 28 6e 6f 74 20 70 61 72 74 20 6f 66  e.c (not part of
7a50: 0a 23 20 74 68 65 20 73 6f 75 72 63 65 20 74 72  .# the source tr
7a60: 65 65 29 20 69 73 20 75 73 65 64 20 61 6e 64 20  ee) is used and 
7a70: 65 78 74 72 61 20 66 6c 61 67 73 20 61 72 65 20  extra flags are 
7a80: 70 72 6f 76 69 64 65 64 20 74 6f 20 65 6e 61 62  provided to enab
7a90: 6c 65 0a 23 20 74 68 65 20 53 51 4c 69 74 65 20  le.# the SQLite 
7aa0: 45 6e 63 72 79 70 74 69 6f 6e 20 45 78 74 65 6e  Encryption Exten
7ab0: 73 69 6f 6e 2e 0a 53 51 4c 49 54 45 33 5f 53 52  sion..SQLITE3_SR
7ac0: 43 2e 30 20 3d 20 73 71 6c 69 74 65 33 2e 63 0a  C.0 = sqlite3.c.
7ad0: 53 51 4c 49 54 45 33 5f 53 52 43 2e 31 20 3d 20  SQLITE3_SRC.1 = 
7ae0: 73 71 6c 69 74 65 33 2d 73 65 65 2e 63 0a 53 51  sqlite3-see.c.SQ
7af0: 4c 49 54 45 33 5f 53 52 43 2e 20 3d 20 73 71 6c  LITE3_SRC. = sql
7b00: 69 74 65 33 2e 63 0a 53 51 4c 49 54 45 33 5f 53  ite3.c.SQLITE3_S
7b10: 52 43 20 3d 20 24 28 53 52 43 44 49 52 29 2f 24  RC = $(SRCDIR)/$
7b20: 28 53 51 4c 49 54 45 33 5f 53 52 43 2e 24 28 55  (SQLITE3_SRC.$(U
7b30: 53 45 5f 53 45 45 29 29 0a 53 51 4c 49 54 45 33  SE_SEE)).SQLITE3
7b40: 5f 53 48 45 4c 4c 5f 53 52 43 2e 30 20 3d 20 73  _SHELL_SRC.0 = s
7b50: 68 65 6c 6c 2e 63 0a 53 51 4c 49 54 45 33 5f 53  hell.c.SQLITE3_S
7b60: 48 45 4c 4c 5f 53 52 43 2e 31 20 3d 20 73 68 65  HELL_SRC.1 = she
7b70: 6c 6c 2d 73 65 65 2e 63 0a 53 51 4c 49 54 45 33  ll-see.c.SQLITE3
7b80: 5f 53 48 45 4c 4c 5f 53 52 43 2e 20 3d 20 73 68  _SHELL_SRC. = sh
7b90: 65 6c 6c 2e 63 0a 53 51 4c 49 54 45 33 5f 53 48  ell.c.SQLITE3_SH
7ba0: 45 4c 4c 5f 53 52 43 20 3d 20 24 28 53 52 43 44  ELL_SRC = $(SRCD
7bb0: 49 52 29 2f 24 28 53 51 4c 49 54 45 33 5f 53 48  IR)/$(SQLITE3_SH
7bc0: 45 4c 4c 5f 53 52 43 2e 24 28 55 53 45 5f 53 45  ELL_SRC.$(USE_SE
7bd0: 45 29 29 0a 53 45 45 5f 46 4c 41 47 53 2e 30 20  E)).SEE_FLAGS.0 
7be0: 3d 0a 53 45 45 5f 46 4c 41 47 53 2e 31 20 3d 20  =.SEE_FLAGS.1 = 
7bf0: 2d 44 53 51 4c 49 54 45 5f 48 41 53 5f 43 4f 44  -DSQLITE_HAS_COD
7c00: 45 43 20 2d 44 53 51 4c 49 54 45 5f 53 48 45 4c  EC -DSQLITE_SHEL
7c10: 4c 5f 44 42 4b 45 59 5f 50 52 4f 43 3d 66 6f 73  L_DBKEY_PROC=fos
7c20: 73 69 6c 5f 6b 65 79 0a 53 45 45 5f 46 4c 41 47  sil_key.SEE_FLAG
7c30: 53 2e 20 3d 0a 53 45 45 5f 46 4c 41 47 53 20 3d  S. =.SEE_FLAGS =
7c40: 20 24 28 53 45 45 5f 46 4c 41 47 53 2e 24 28 55   $(SEE_FLAGS.$(U
7c50: 53 45 5f 53 45 45 29 29 0a 7d 0a 0a 77 72 69 74  SE_SEE)).}..writ
7c60: 65 6c 6e 20 5b 73 74 72 69 6e 67 20 6d 61 70 20  eln [string map 
7c70: 5b 6c 69 73 74 20 3c 3c 3c 4e 45 58 54 5f 4c 49  [list <<<NEXT_LI
7c80: 4e 45 3e 3e 3e 20 5c 5c 5d 20 7b 0a 45 58 54 52  NE>>> \\] {.EXTR
7c90: 41 4f 42 4a 20 3d 20 3c 3c 3c 4e 45 58 54 5f 4c  AOBJ = <<<NEXT_L
7ca0: 49 4e 45 3e 3e 3e 0a 20 24 28 53 51 4c 49 54 45  INE>>>. $(SQLITE
7cb0: 33 5f 4f 42 4a 2e 24 28 55 53 45 5f 53 59 53 54  3_OBJ.$(USE_SYST
7cc0: 45 4d 5f 53 51 4c 49 54 45 29 29 20 3c 3c 3c 4e  EM_SQLITE)) <<<N
7cd0: 45 58 54 5f 4c 49 4e 45 3e 3e 3e 0a 20 24 28 4d  EXT_LINE>>>. $(M
7ce0: 49 4e 49 5a 5f 4f 42 4a 2e 24 28 46 4f 53 53 49  INIZ_OBJ.$(FOSSI
7cf0: 4c 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a 29 29  L_ENABLE_MINIZ))
7d00: 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e 45 3e 3e 3e   <<<NEXT_LINE>>>
7d10: 0a 20 24 28 4f 42 4a 44 49 52 29 2f 73 68 65 6c  . $(OBJDIR)/shel
7d20: 6c 2e 6f 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e 45  l.o <<<NEXT_LINE
7d30: 3e 3e 3e 0a 20 24 28 4f 42 4a 44 49 52 29 2f 74  >>>. $(OBJDIR)/t
7d40: 68 2e 6f 20 3c 3c 3c 4e 45 58 54 5f 4c 49 4e 45  h.o <<<NEXT_LINE
7d50: 3e 3e 3e 0a 20 24 28 4f 42 4a 44 49 52 29 2f 74  >>>. $(OBJDIR)/t
7d60: 68 5f 6c 61 6e 67 2e 6f 20 3c 3c 3c 4e 45 58 54  h_lang.o <<<NEXT
7d70: 5f 4c 49 4e 45 3e 3e 3e 0a 20 24 28 4f 42 4a 44  _LINE>>>. $(OBJD
7d80: 49 52 29 2f 74 68 5f 74 63 6c 2e 6f 20 3c 3c 3c  IR)/th_tcl.o <<<
7d90: 4e 45 58 54 5f 4c 49 4e 45 3e 3e 3e 0a 20 24 28  NEXT_LINE>>>. $(
7da0: 4f 42 4a 44 49 52 29 2f 63 73 6f 6e 5f 61 6d 61  OBJDIR)/cson_ama
7db0: 6c 67 61 6d 61 74 69 6f 6e 2e 6f 0a 7d 5d 0a 0a  lgamation.o.}]..
7dc0: 77 72 69 74 65 6c 6e 20 7b 0a 24 28 5a 4c 49 42  writeln {.$(ZLIB
7dd0: 44 49 52 29 2f 69 6e 66 66 61 73 38 36 2e 6f 3a  DIR)/inffas86.o:
7de0: 0a 09 24 28 54 43 43 29 20 2d 63 20 2d 6f 20 24  ..$(TCC) -c -o $
7df0: 40 20 2d 44 41 53 4d 49 4e 46 20 2d 49 24 28 5a  @ -DASMINF -I$(Z
7e00: 4c 49 42 44 49 52 29 20 2d 4f 33 20 24 28 5a 4c  LIBDIR) -O3 $(ZL
7e10: 49 42 44 49 52 29 2f 63 6f 6e 74 72 69 62 2f 69  IBDIR)/contrib/i
7e20: 6e 66 6c 61 74 65 38 36 2f 69 6e 66 66 61 73 38  nflate86/inffas8
7e30: 36 2e 63 0a 0a 24 28 5a 4c 49 42 44 49 52 29 2f  6.c..$(ZLIBDIR)/
7e40: 6d 61 74 63 68 2e 6f 3a 0a 09 24 28 54 43 43 29  match.o:..$(TCC)
7e50: 20 2d 63 20 2d 6f 20 24 40 20 2d 44 41 53 4d 56   -c -o $@ -DASMV
7e60: 20 24 28 5a 4c 49 42 44 49 52 29 2f 63 6f 6e 74   $(ZLIBDIR)/cont
7e70: 72 69 62 2f 61 73 6d 36 38 36 2f 6d 61 74 63 68  rib/asm686/match
7e80: 2e 53 0a 0a 7a 6c 69 62 3a 09 24 28 5a 4c 49 42  .S..zlib:.$(ZLIB
7e90: 54 41 52 47 45 54 53 29 0a 09 24 28 4d 41 4b 45  TARGETS)..$(MAKE
7ea0: 29 20 2d 43 20 24 28 5a 4c 49 42 44 49 52 29 20  ) -C $(ZLIBDIR) 
7eb0: 50 52 45 46 49 58 3d 24 28 50 52 45 46 49 58 29  PREFIX=$(PREFIX)
7ec0: 20 43 43 3d 24 28 50 52 45 46 49 58 29 24 28 54   CC=$(PREFIX)$(T
7ed0: 43 43 45 58 45 29 20 24 28 5a 4c 49 42 43 4f 4e  CCEXE) $(ZLIBCON
7ee0: 46 49 47 29 20 2d 66 20 77 69 6e 33 32 2f 4d 61  FIG) -f win32/Ma
7ef0: 6b 65 66 69 6c 65 2e 67 63 63 20 6c 69 62 7a 2e  kefile.gcc libz.
7f00: 61 0a 0a 63 6c 65 61 6e 2d 7a 6c 69 62 3a 0a 09  a..clean-zlib:..
7f10: 24 28 4d 41 4b 45 29 20 2d 43 20 24 28 5a 4c 49  $(MAKE) -C $(ZLI
7f20: 42 44 49 52 29 20 50 52 45 46 49 58 3d 24 28 50  BDIR) PREFIX=$(P
7f30: 52 45 46 49 58 29 20 43 43 3d 24 28 50 52 45 46  REFIX) CC=$(PREF
7f40: 49 58 29 24 28 54 43 43 45 58 45 29 20 2d 66 20  IX)$(TCCEXE) -f 
7f50: 77 69 6e 33 32 2f 4d 61 6b 65 66 69 6c 65 2e 67  win32/Makefile.g
7f60: 63 63 20 63 6c 65 61 6e 0a 0a 69 66 64 65 66 20  cc clean..ifdef 
7f70: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49  FOSSIL_ENABLE_MI
7f80: 4e 49 5a 0a 42 4c 44 54 41 52 47 45 54 53 20 3d  NIZ.BLDTARGETS =
7f90: 0a 65 6c 73 65 0a 42 4c 44 54 41 52 47 45 54 53  .else.BLDTARGETS
7fa0: 20 3d 20 7a 6c 69 62 0a 65 6e 64 69 66 0a 0a 6f   = zlib.endif..o
7fb0: 70 65 6e 73 73 6c 3a 09 24 28 42 4c 44 54 41 52  penssl:.$(BLDTAR
7fc0: 47 45 54 53 29 0a 09 63 64 20 24 28 4f 50 45 4e  GETS)..cd $(OPEN
7fd0: 53 53 4c 4c 49 42 44 49 52 29 3b 2e 2f 43 6f 6e  SSLLIBDIR);./Con
7fe0: 66 69 67 75 72 65 20 2d 2d 63 72 6f 73 73 2d 63  figure --cross-c
7ff0: 6f 6d 70 69 6c 65 2d 70 72 65 66 69 78 3d 24 28  ompile-prefix=$(
8000: 50 52 45 46 49 58 29 20 24 28 53 53 4c 43 4f 4e  PREFIX) $(SSLCON
8010: 46 49 47 29 0a 09 73 65 64 20 2d 69 20 2d 65 20  FIG)..sed -i -e 
8020: 27 73 2f 5e 50 45 52 4c 3d 43 3a 5c 5c 2e 2a 24  's/^PERL=C:\\.*$
8030: 24 2f 50 45 52 4c 3d 70 65 72 6c 2e 65 78 65 2f  $/PERL=perl.exe/
8040: 69 27 20 24 28 4f 50 45 4e 53 53 4c 4c 49 42 44  i' $(OPENSSLLIBD
8050: 49 52 29 2f 4d 61 6b 65 66 69 6c 65 0a 09 24 28  IR)/Makefile..$(
8060: 4d 41 4b 45 29 20 2d 43 20 24 28 4f 50 45 4e 53  MAKE) -C $(OPENS
8070: 53 4c 4c 49 42 44 49 52 29 20 50 52 45 46 49 58  SLLIBDIR) PREFIX
8080: 3d 24 28 50 52 45 46 49 58 29 20 43 43 3d 24 28  =$(PREFIX) CC=$(
8090: 50 52 45 46 49 58 29 24 28 54 43 43 45 58 45 29  PREFIX)$(TCCEXE)
80a0: 20 62 75 69 6c 64 5f 6c 69 62 73 0a 0a 63 6c 65   build_libs..cle
80b0: 61 6e 2d 6f 70 65 6e 73 73 6c 3a 0a 09 24 28 4d  an-openssl:..$(M
80c0: 41 4b 45 29 20 2d 43 20 24 28 4f 50 45 4e 53 53  AKE) -C $(OPENSS
80d0: 4c 4c 49 42 44 49 52 29 20 50 52 45 46 49 58 3d  LLIBDIR) PREFIX=
80e0: 24 28 50 52 45 46 49 58 29 20 43 43 3d 24 28 50  $(PREFIX) CC=$(P
80f0: 52 45 46 49 58 29 24 28 54 43 43 45 58 45 29 20  REFIX)$(TCCEXE) 
8100: 63 6c 65 61 6e 0a 0a 74 63 6c 3a 0a 09 63 64 20  clean..tcl:..cd 
8110: 24 28 54 43 4c 53 52 43 44 49 52 29 2f 77 69 6e  $(TCLSRCDIR)/win
8120: 3b 2e 2f 63 6f 6e 66 69 67 75 72 65 0a 09 24 28  ;./configure..$(
8130: 4d 41 4b 45 29 20 2d 43 20 24 28 54 43 4c 53 52  MAKE) -C $(TCLSR
8140: 43 44 49 52 29 2f 77 69 6e 20 50 52 45 46 49 58  CDIR)/win PREFIX
8150: 3d 24 28 50 52 45 46 49 58 29 20 43 43 3d 24 28  =$(PREFIX) CC=$(
8160: 50 52 45 46 49 58 29 24 28 54 43 43 45 58 45 29  PREFIX)$(TCCEXE)
8170: 20 24 28 54 43 4c 54 41 52 47 45 54 29 0a 0a 63   $(TCLTARGET)..c
8180: 6c 65 61 6e 2d 74 63 6c 3a 0a 09 24 28 4d 41 4b  lean-tcl:..$(MAK
8190: 45 29 20 2d 43 20 24 28 54 43 4c 53 52 43 44 49  E) -C $(TCLSRCDI
81a0: 52 29 2f 77 69 6e 20 50 52 45 46 49 58 3d 24 28  R)/win PREFIX=$(
81b0: 50 52 45 46 49 58 29 20 43 43 3d 24 28 50 52 45  PREFIX) CC=$(PRE
81c0: 46 49 58 29 24 28 54 43 43 45 58 45 29 20 64 69  FIX)$(TCCEXE) di
81d0: 73 74 63 6c 65 61 6e 0a 0a 41 50 50 54 41 52 47  stclean..APPTARG
81e0: 45 54 53 20 2b 3d 20 24 28 42 4c 44 54 41 52 47  ETS += $(BLDTARG
81f0: 45 54 53 29 0a 0a 69 66 64 65 66 20 46 4f 53 53  ETS)..ifdef FOSS
8200: 49 4c 5f 42 55 49 4c 44 5f 53 53 4c 0a 41 50 50  IL_BUILD_SSL.APP
8210: 54 41 52 47 45 54 53 20 2b 3d 20 6f 70 65 6e 73  TARGETS += opens
8220: 73 6c 0a 65 6e 64 69 66 0a 0a 24 28 41 50 50 4e  sl.endif..$(APPN
8230: 41 4d 45 29 3a 09 24 28 41 50 50 54 41 52 47 45  AME):.$(APPTARGE
8240: 54 53 29 20 24 28 4f 42 4a 44 49 52 29 2f 68 65  TS) $(OBJDIR)/he
8250: 61 64 65 72 73 20 24 28 43 4f 44 45 43 48 45 43  aders $(CODECHEC
8260: 4b 31 29 20 24 28 45 58 54 52 41 4f 42 4a 29 20  K1) $(EXTRAOBJ) 
8270: 24 28 4f 42 4a 29 20 24 28 4f 42 4a 44 49 52 29  $(OBJ) $(OBJDIR)
8280: 2f 66 6f 73 73 69 6c 2e 6f 0a 09 24 28 43 4f 44  /fossil.o..$(COD
8290: 45 43 48 45 43 4b 31 29 20 24 28 54 52 41 4e 53  ECHECK1) $(TRANS
82a0: 5f 53 52 43 29 0a 09 24 28 54 43 43 29 20 2d 6f  _SRC)..$(TCC) -o
82b0: 20 24 40 20 24 28 45 58 54 52 41 4f 42 4a 29 20   $@ $(EXTRAOBJ) 
82c0: 24 28 4f 42 4a 29 20 24 28 4f 42 4a 44 49 52 29  $(OBJ) $(OBJDIR)
82d0: 2f 66 6f 73 73 69 6c 2e 6f 20 24 28 4c 49 42 29  /fossil.o $(LIB)
82e0: 0a 0a 23 20 54 68 69 73 20 72 75 6c 65 20 70 72  ..# This rule pr
82f0: 65 76 65 6e 74 73 20 6d 61 6b 65 20 66 72 6f 6d  events make from
8300: 20 75 73 69 6e 67 20 69 74 73 20 64 65 66 61 75   using its defau
8310: 6c 74 20 72 75 6c 65 73 20 74 6f 20 74 72 79 20  lt rules to try 
8320: 62 75 69 6c 64 0a 23 20 61 6e 20 65 78 65 63 75  build.# an execu
8330: 74 61 62 6c 65 20 6e 61 6d 65 64 20 22 6d 61 6e  table named "man
8340: 69 66 65 73 74 22 20 6f 75 74 20 6f 66 20 74 68  ifest" out of th
8350: 65 20 66 69 6c 65 20 6e 61 6d 65 64 20 22 6d 61  e file named "ma
8360: 6e 69 66 65 73 74 2e 63 22 0a 23 0a 24 28 53 52  nifest.c".#.$(SR
8370: 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73  CDIR)/../manifes
8380: 74 3a 0a 09 23 20 6e 6f 6f 70 0a 0a 63 6c 65 61  t:..# noop..clea
8390: 6e 3a 0a 69 66 64 65 66 20 55 53 45 5f 57 49 4e  n:.ifdef USE_WIN
83a0: 44 4f 57 53 0a 09 24 28 52 4d 29 20 24 28 73 75  DOWS..$(RM) $(su
83b0: 62 73 74 20 2f 2c 5c 2c 24 28 41 50 50 4e 41 4d  bst /,\,$(APPNAM
83c0: 45 29 29 0a 09 24 28 52 4d 44 49 52 29 20 24 28  E))..$(RMDIR) $(
83d0: 73 75 62 73 74 20 2f 2c 5c 2c 24 28 4f 42 4a 44  subst /,\,$(OBJD
83e0: 49 52 29 29 0a 65 6c 73 65 0a 09 24 28 52 4d 29  IR)).else..$(RM)
83f0: 20 24 28 41 50 50 4e 41 4d 45 29 0a 09 24 28 52   $(APPNAME)..$(R
8400: 4d 44 49 52 29 20 24 28 4f 42 4a 44 49 52 29 0a  MDIR) $(OBJDIR).
8410: 65 6e 64 69 66 0a 0a 73 65 74 75 70 3a 20 24 28  endif..setup: $(
8420: 4f 42 4a 44 49 52 29 20 24 28 41 50 50 4e 41 4d  OBJDIR) $(APPNAM
8430: 45 29 0a 09 24 28 4d 41 4b 45 4e 53 49 53 29 20  E)..$(MAKENSIS) 
8440: 2e 2f 73 65 74 75 70 2f 66 6f 73 73 69 6c 2e 6e  ./setup/fossil.n
8450: 73 69 0a 0a 69 6e 6e 6f 73 65 74 75 70 3a 20 24  si..innosetup: $
8460: 28 4f 42 4a 44 49 52 29 20 24 28 41 50 50 4e 41  (OBJDIR) $(APPNA
8470: 4d 45 29 0a 09 24 28 49 4e 4e 4f 53 45 54 55 50  ME)..$(INNOSETUP
8480: 29 20 2e 2f 73 65 74 75 70 2f 66 6f 73 73 69 6c  ) ./setup/fossil
8490: 2e 69 73 73 20 2d 44 41 70 70 56 65 72 73 69 6f  .iss -DAppVersio
84a0: 6e 3d 24 28 73 68 65 6c 6c 20 24 28 43 41 54 29  n=$(shell $(CAT)
84b0: 20 2e 2f 56 45 52 53 49 4f 4e 29 0a 7d 0a 0a 73   ./VERSION).}..s
84c0: 65 74 20 6d 68 61 72 67 73 20 7b 7d 0a 66 6f 72  et mhargs {}.for
84d0: 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73  each s [lsort $s
84e0: 72 63 5d 20 7b 0a 20 20 69 66 20 7b 5b 73 74 72  rc] {.  if {[str
84f0: 69 6e 67 20 6c 65 6e 67 74 68 20 24 6d 68 61 72  ing length $mhar
8500: 67 73 5d 20 3e 20 30 7d 20 7b 61 70 70 65 6e 64  gs] > 0} {append
8510: 20 6d 68 61 72 67 73 20 22 20 5c 5c 5c 6e 5c 74   mhargs " \\\n\t
8520: 5c 74 22 7d 0a 20 20 61 70 70 65 6e 64 20 6d 68  \t"}.  append mh
8530: 61 72 67 73 20 22 5c 24 28 4f 42 4a 44 49 52 29  args "\$(OBJDIR)
8540: 2f 24 7b 73 7d 5f 2e 63 3a 5c 24 28 4f 42 4a 44  /${s}_.c:\$(OBJD
8550: 49 52 29 2f 24 73 2e 68 22 0a 20 20 73 65 74 20  IR)/$s.h".  set 
8560: 65 78 74 72 61 5f 68 28 24 73 29 20 7b 20 7d 0a  extra_h($s) { }.
8570: 7d 0a 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20  }.append mhargs 
8580: 22 20 5c 5c 5c 6e 5c 74 5c 74 5c 24 28 53 52 43  " \\\n\t\t\$(SRC
8590: 44 49 52 29 2f 73 71 6c 69 74 65 33 2e 68 22 0a  DIR)/sqlite3.h".
85a0: 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22 20  append mhargs " 
85b0: 5c 5c 5c 6e 5c 74 5c 74 5c 24 28 53 52 43 44 49  \\\n\t\t\$(SRCDI
85c0: 52 29 2f 74 68 2e 68 22 0a 61 70 70 65 6e 64 20  R)/th.h".append 
85d0: 6d 68 61 72 67 73 20 22 20 5c 5c 5c 6e 5c 74 5c  mhargs " \\\n\t\
85e0: 74 5c 24 28 4f 42 4a 44 49 52 29 2f 56 45 52 53  t\$(OBJDIR)/VERS
85f0: 49 4f 4e 2e 68 22 0a 77 72 69 74 65 6c 6e 20 22  ION.h".writeln "
8600: 5c 24 28 4f 42 4a 44 49 52 29 2f 70 61 67 65 5f  \$(OBJDIR)/page_
8610: 69 6e 64 65 78 2e 68 3a 20 5c 24 28 54 52 41 4e  index.h: \$(TRAN
8620: 53 5f 53 52 43 29 20 5c 24 28 4d 4b 49 4e 44 45  S_SRC) \$(MKINDE
8630: 58 29 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74 5c  X)".writeln "\t\
8640: 24 28 4d 4b 49 4e 44 45 58 29 20 5c 24 28 54 52  $(MKINDEX) \$(TR
8650: 41 4e 53 5f 53 52 43 29 20 3e 5c 24 40 5c 6e 22  ANS_SRC) >\$@\n"
8660: 0a 0a 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42  ..writeln "\$(OB
8670: 4a 44 49 52 29 2f 62 75 69 6c 74 69 6e 5f 64 61  JDIR)/builtin_da
8680: 74 61 2e 68 3a 5c 74 5c 24 28 4d 4b 42 55 49 4c  ta.h:\t\$(MKBUIL
8690: 54 49 4e 29 20 5c 24 28 45 58 54 52 41 5f 46 49  TIN) \$(EXTRA_FI
86a0: 4c 45 53 29 22 0a 77 72 69 74 65 6c 6e 20 22 5c  LES)".writeln "\
86b0: 74 5c 24 28 4d 4b 42 55 49 4c 54 49 4e 29 20 2d  t\$(MKBUILTIN) -
86c0: 2d 70 72 65 66 69 78 20 5c 24 28 53 52 43 44 49  -prefix \$(SRCDI
86d0: 52 29 2f 20 5c 24 28 45 58 54 52 41 5f 46 49 4c  R)/ \$(EXTRA_FIL
86e0: 45 53 29 20 3e 5c 24 40 5c 6e 22 0a 0a 77 72 69  ES) >\$@\n"..wri
86f0: 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29  teln "\$(OBJDIR)
8700: 2f 68 65 61 64 65 72 73 3a 5c 74 5c 24 28 4f 42  /headers:\t\$(OB
8710: 4a 44 49 52 29 2f 70 61 67 65 5f 69 6e 64 65 78  JDIR)/page_index
8720: 2e 68 20 5c 24 28 4f 42 4a 44 49 52 29 2f 62 75  .h \$(OBJDIR)/bu
8730: 69 6c 74 69 6e 5f 64 61 74 61 2e 68 20 5c 24 28  iltin_data.h \$(
8740: 4d 41 4b 45 48 45 41 44 45 52 53 29 20 5c 24 28  MAKEHEADERS) \$(
8750: 4f 42 4a 44 49 52 29 2f 56 45 52 53 49 4f 4e 2e  OBJDIR)/VERSION.
8760: 68 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74 5c 24  h".writeln "\t\$
8770: 28 4d 41 4b 45 48 45 41 44 45 52 53 29 20 24 6d  (MAKEHEADERS) $m
8780: 68 61 72 67 73 22 0a 77 72 69 74 65 6c 6e 20 22  hargs".writeln "
8790: 5c 74 65 63 68 6f 20 44 6f 6e 65 20 3e 5c 24 28  \techo Done >\$(
87a0: 4f 42 4a 44 49 52 29 2f 68 65 61 64 65 72 73 5c  OBJDIR)/headers\
87b0: 6e 22 0a 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f  n".writeln "\$(O
87c0: 42 4a 44 49 52 29 2f 68 65 61 64 65 72 73 3a 20  BJDIR)/headers: 
87d0: 4d 61 6b 65 66 69 6c 65 5c 6e 22 0a 77 72 69 74  Makefile\n".writ
87e0: 65 6c 6e 20 22 4d 61 6b 65 66 69 6c 65 3a 5c 6e  eln "Makefile:\n
87f0: 22 0a 73 65 74 20 65 78 74 72 61 5f 68 28 6d 61  ".set extra_h(ma
8800: 69 6e 29 20 22 20 5c 24 28 4f 42 4a 44 49 52 29  in) " \$(OBJDIR)
8810: 2f 70 61 67 65 5f 69 6e 64 65 78 2e 68 20 22 0a  /page_index.h ".
8820: 73 65 74 20 65 78 74 72 61 5f 68 28 62 75 69 6c  set extra_h(buil
8830: 74 69 6e 29 20 22 20 5c 24 28 4f 42 4a 44 49 52  tin) " \$(OBJDIR
8840: 29 2f 62 75 69 6c 74 69 6e 5f 64 61 74 61 2e 68  )/builtin_data.h
8850: 20 22 0a 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c   "..foreach s [l
8860: 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 77  sort $src] {.  w
8870: 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49  riteln "\$(OBJDI
8880: 52 29 2f 24 7b 73 7d 5f 2e 63 3a 5c 74 5c 24 28  R)/${s}_.c:\t\$(
8890: 53 52 43 44 49 52 29 2f 24 73 2e 63 20 5c 24 28  SRCDIR)/$s.c \$(
88a0: 54 52 41 4e 53 4c 41 54 45 29 22 0a 20 20 77 72  TRANSLATE)".  wr
88b0: 69 74 65 6c 6e 20 22 5c 74 5c 24 28 54 52 41 4e  iteln "\t\$(TRAN
88c0: 53 4c 41 54 45 29 20 5c 24 28 53 52 43 44 49 52  SLATE) \$(SRCDIR
88d0: 29 2f 24 73 2e 63 20 3e 5c 24 40 5c 6e 22 0a 20  )/$s.c >\$@\n". 
88e0: 20 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a   writeln "\$(OBJ
88f0: 44 49 52 29 2f 24 73 2e 6f 3a 5c 74 5c 24 28 4f  DIR)/$s.o:\t\$(O
8900: 42 4a 44 49 52 29 2f 24 7b 73 7d 5f 2e 63 20 5c  BJDIR)/${s}_.c \
8910: 24 28 4f 42 4a 44 49 52 29 2f 24 73 2e 68 24 65  $(OBJDIR)/$s.h$e
8920: 78 74 72 61 5f 68 28 24 73 29 5c 24 28 53 52 43  xtra_h($s)\$(SRC
8930: 44 49 52 29 2f 63 6f 6e 66 69 67 2e 68 22 0a 20  DIR)/config.h". 
8940: 20 77 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 58   writeln "\t\$(X
8950: 54 43 43 29 20 2d 6f 20 5c 24 28 4f 42 4a 44 49  TCC) -o \$(OBJDI
8960: 52 29 2f 24 73 2e 6f 20 2d 63 20 5c 24 28 4f 42  R)/$s.o -c \$(OB
8970: 4a 44 49 52 29 2f 24 7b 73 7d 5f 2e 63 5c 6e 22  JDIR)/${s}_.c\n"
8980: 0a 20 20 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f  .  writeln "\$(O
8990: 42 4a 44 49 52 29 2f 24 7b 73 7d 2e 68 3a 5c 74  BJDIR)/${s}.h:\t
89a0: 5c 24 28 4f 42 4a 44 49 52 29 2f 68 65 61 64 65  \$(OBJDIR)/heade
89b0: 72 73 5c 6e 22 0a 7d 0a 0a 77 72 69 74 65 6c 6e  rs\n".}..writeln
89c0: 20 7b 4d 49 4e 47 57 5f 4f 50 54 49 4f 4e 53 20   {MINGW_OPTIONS 
89d0: 3d 20 2d 44 5f 48 41 56 45 5f 5f 4d 49 4e 47 57  = -D_HAVE__MINGW
89e0: 5f 48 0a 7d 0a 0a 73 65 74 20 53 51 4c 49 54 45  _H.}..set SQLITE
89f0: 5f 57 49 4e 33 32 5f 4f 50 54 49 4f 4e 53 20 24  _WIN32_OPTIONS $
8a00: 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 0a 6c  SQLITE_OPTIONS.l
8a10: 61 70 70 65 6e 64 20 53 51 4c 49 54 45 5f 57 49  append SQLITE_WI
8a20: 4e 33 32 5f 4f 50 54 49 4f 4e 53 20 2d 44 53 51  N32_OPTIONS -DSQ
8a30: 4c 49 54 45 5f 57 49 4e 33 32 5f 4e 4f 5f 41 4e  LITE_WIN32_NO_AN
8a40: 53 49 0a 0a 73 65 74 20 4d 49 4e 47 57 5f 53 51  SI..set MINGW_SQ
8a50: 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 20 24 53 51  LITE_OPTIONS $SQ
8a60: 4c 49 54 45 5f 57 49 4e 33 32 5f 4f 50 54 49 4f  LITE_WIN32_OPTIO
8a70: 4e 53 0a 6c 61 70 70 65 6e 64 20 4d 49 4e 47 57  NS.lappend MINGW
8a80: 5f 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 20  _SQLITE_OPTIONS 
8a90: 7b 24 28 4d 49 4e 47 57 5f 4f 50 54 49 4f 4e 53  {$(MINGW_OPTIONS
8aa0: 29 7d 0a 6c 61 70 70 65 6e 64 20 4d 49 4e 47 57  )}.lappend MINGW
8ab0: 5f 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 20  _SQLITE_OPTIONS 
8ac0: 2d 44 53 51 4c 49 54 45 5f 55 53 45 5f 4d 41 4c  -DSQLITE_USE_MAL
8ad0: 4c 4f 43 5f 48 0a 6c 61 70 70 65 6e 64 20 4d 49  LOC_H.lappend MI
8ae0: 4e 47 57 5f 53 51 4c 49 54 45 5f 4f 50 54 49 4f  NGW_SQLITE_OPTIO
8af0: 4e 53 20 2d 44 53 51 4c 49 54 45 5f 55 53 45 5f  NS -DSQLITE_USE_
8b00: 4d 53 49 5a 45 0a 0a 73 65 74 20 4d 49 4e 49 5a  MSIZE..set MINIZ
8b10: 5f 57 49 4e 33 32 5f 4f 50 54 49 4f 4e 53 20 24  _WIN32_OPTIONS $
8b20: 4d 49 4e 49 5a 5f 4f 50 54 49 4f 4e 53 0a 0a 73  MINIZ_OPTIONS..s
8b30: 65 74 20 6a 20 22 20 5c 5c 5c 6e 20 20 20 20 20  et j " \\\n     
8b40: 20 20 20 20 20 20 20 20 20 20 20 20 22 0a 77 72              ".wr
8b50: 69 74 65 6c 6e 20 22 53 51 4c 49 54 45 5f 4f 50  iteln "SQLITE_OP
8b60: 54 49 4f 4e 53 20 3d 20 5b 6a 6f 69 6e 20 24 4d  TIONS = [join $M
8b70: 49 4e 47 57 5f 53 51 4c 49 54 45 5f 4f 50 54 49  INGW_SQLITE_OPTI
8b80: 4f 4e 53 20 24 6a 5d 5c 6e 22 0a 73 65 74 20 6a  ONS $j]\n".set j
8b90: 20 22 20 5c 5c 5c 6e 20 20 20 20 20 20 20 20 20   " \\\n         
8ba0: 20 20 20 20 20 20 20 22 0a 77 72 69 74 65 6c 6e         ".writeln
8bb0: 20 22 53 48 45 4c 4c 5f 4f 50 54 49 4f 4e 53 20   "SHELL_OPTIONS 
8bc0: 3d 20 5b 6a 6f 69 6e 20 24 53 48 45 4c 4c 5f 57  = [join $SHELL_W
8bd0: 49 4e 33 32 5f 4f 50 54 49 4f 4e 53 20 24 6a 5d  IN32_OPTIONS $j]
8be0: 5c 6e 22 0a 73 65 74 20 6a 20 22 20 5c 5c 5c 6e  \n".set j " \\\n
8bf0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
8c00: 22 0a 77 72 69 74 65 6c 6e 20 22 4d 49 4e 49 5a  ".writeln "MINIZ
8c10: 5f 4f 50 54 49 4f 4e 53 20 3d 20 5b 6a 6f 69 6e  _OPTIONS = [join
8c20: 20 24 4d 49 4e 49 5a 5f 57 49 4e 33 32 5f 4f 50   $MINIZ_WIN32_OP
8c30: 54 49 4f 4e 53 20 24 6a 5d 5c 6e 22 0a 0a 77 72  TIONS $j]\n"..wr
8c40: 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52  iteln "\$(OBJDIR
8c50: 29 2f 73 71 6c 69 74 65 33 2e 6f 3a 5c 74 5c 24  )/sqlite3.o:\t\$
8c60: 28 53 51 4c 49 54 45 33 5f 53 52 43 29 20 5c 24  (SQLITE3_SRC) \$
8c70: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 77 69 6e 2f  (SRCDIR)/../win/
8c80: 4d 61 6b 65 66 69 6c 65 2e 6d 69 6e 67 77 22 0a  Makefile.mingw".
8c90: 77 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 58 54  writeln "\t\$(XT
8ca0: 43 43 29 20 5c 24 28 53 51 4c 49 54 45 5f 4f 50  CC) \$(SQLITE_OP
8cb0: 54 49 4f 4e 53 29 20 5c 24 28 53 51 4c 49 54 45  TIONS) \$(SQLITE
8cc0: 5f 43 46 4c 41 47 53 29 20 5c 24 28 53 45 45 5f  _CFLAGS) \$(SEE_
8cd0: 46 4c 41 47 53 29 20 5c 5c 22 0a 77 72 69 74 65  FLAGS) \\".write
8ce0: 6c 6e 20 22 5c 74 5c 74 2d 63 20 5c 24 28 53 51  ln "\t\t-c \$(SQ
8cf0: 4c 49 54 45 33 5f 53 52 43 29 20 2d 6f 20 5c 24  LITE3_SRC) -o \$
8d00: 40 5c 6e 22 0a 0a 77 72 69 74 65 6c 6e 20 22 5c  @\n"..writeln "\
8d10: 24 28 4f 42 4a 44 49 52 29 2f 63 73 6f 6e 5f 61  $(OBJDIR)/cson_a
8d20: 6d 61 6c 67 61 6d 61 74 69 6f 6e 2e 6f 3a 5c 74  malgamation.o:\t
8d30: 5c 24 28 53 52 43 44 49 52 29 2f 63 73 6f 6e 5f  \$(SRCDIR)/cson_
8d40: 61 6d 61 6c 67 61 6d 61 74 69 6f 6e 2e 63 22 0a  amalgamation.c".
8d50: 77 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 58 54  writeln "\t\$(XT
8d60: 43 43 29 20 2d 63 20 5c 24 28 53 52 43 44 49 52  CC) -c \$(SRCDIR
8d70: 29 2f 63 73 6f 6e 5f 61 6d 61 6c 67 61 6d 61 74  )/cson_amalgamat
8d80: 69 6f 6e 2e 63 20 2d 6f 20 5c 24 40 5c 6e 22 0a  ion.c -o \$@\n".
8d90: 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44  writeln "\$(OBJD
8da0: 49 52 29 2f 6a 73 6f 6e 2e 6f 20 5c 24 28 4f 42  IR)/json.o \$(OB
8db0: 4a 44 49 52 29 2f 6a 73 6f 6e 5f 61 72 74 69 66  JDIR)/json_artif
8dc0: 61 63 74 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29  act.o \$(OBJDIR)
8dd0: 2f 6a 73 6f 6e 5f 62 72 61 6e 63 68 2e 6f 20 5c  /json_branch.o \
8de0: 24 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 63  $(OBJDIR)/json_c
8df0: 6f 6e 66 69 67 2e 6f 20 5c 24 28 4f 42 4a 44 49  onfig.o \$(OBJDI
8e00: 52 29 2f 6a 73 6f 6e 5f 64 69 66 66 2e 6f 20 5c  R)/json_diff.o \
8e10: 24 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 64  $(OBJDIR)/json_d
8e20: 69 72 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f  ir.o \$(OBJDIR)/
8e30: 6a 73 6f 73 5f 66 69 6e 66 6f 2e 6f 20 5c 24 28  jsos_finfo.o \$(
8e40: 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 6c 6f 67  OBJDIR)/json_log
8e50: 69 6e 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f  in.o \$(OBJDIR)/
8e60: 6a 73 6f 6e 5f 71 75 65 72 79 2e 6f 20 5c 24 28  json_query.o \$(
8e70: 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 72 65 70  OBJDIR)/json_rep
8e80: 6f 72 74 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29  ort.o \$(OBJDIR)
8e90: 2f 6a 73 6f 6e 5f 73 74 61 74 75 73 2e 6f 20 5c  /json_status.o \
8ea0: 24 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f 74  $(OBJDIR)/json_t
8eb0: 61 67 2e 6f 20 5c 24 28 4f 42 4a 44 49 52 29 2f  ag.o \$(OBJDIR)/
8ec0: 6a 73 6f 6e 5f 74 69 6d 65 6c 69 6e 65 2e 6f 20  json_timeline.o 
8ed0: 5c 24 28 4f 42 4a 44 49 52 29 2f 6a 73 6f 6e 5f  \$(OBJDIR)/json_
8ee0: 75 73 65 72 2e 6f 20 5c 24 28 4f 42 4a 44 49 52  user.o \$(OBJDIR
8ef0: 29 2f 6a 73 6f 6e 5f 77 69 6b 69 2e 6f 20 3a 20  )/json_wiki.o : 
8f00: 5c 24 28 53 52 43 44 49 52 29 2f 6a 73 6f 6e 5f  \$(SRCDIR)/json_
8f10: 64 65 74 61 69 6c 2e 68 5c 6e 22 0a 0a 77 72 69  detail.h\n"..wri
8f20: 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29  teln "\$(OBJDIR)
8f30: 2f 73 68 65 6c 6c 2e 6f 3a 5c 74 5c 24 28 53 51  /shell.o:\t\$(SQ
8f40: 4c 49 54 45 33 5f 53 48 45 4c 4c 5f 53 52 43 29  LITE3_SHELL_SRC)
8f50: 20 5c 24 28 53 52 43 44 49 52 29 2f 73 71 6c 69   \$(SRCDIR)/sqli
8f60: 74 65 33 2e 68 20 5c 24 28 53 52 43 44 49 52 29  te3.h \$(SRCDIR)
8f70: 2f 2e 2e 2f 77 69 6e 2f 4d 61 6b 65 66 69 6c 65  /../win/Makefile
8f80: 2e 6d 69 6e 67 77 22 0a 77 72 69 74 65 6c 6e 20  .mingw".writeln 
8f90: 22 5c 74 5c 24 28 58 54 43 43 29 20 5c 24 28 53  "\t\$(XTCC) \$(S
8fa0: 48 45 4c 4c 5f 4f 50 54 49 4f 4e 53 29 20 5c 24  HELL_OPTIONS) \$
8fb0: 28 53 48 45 4c 4c 5f 43 46 4c 41 47 53 29 20 5c  (SHELL_CFLAGS) \
8fc0: 24 28 53 45 45 5f 46 4c 41 47 53 29 20 2d 63 20  $(SEE_FLAGS) -c 
8fd0: 5c 24 28 53 51 4c 49 54 45 33 5f 53 48 45 4c 4c  \$(SQLITE3_SHELL
8fe0: 5f 53 52 43 29 20 2d 6f 20 5c 24 40 5c 6e 22 0a  _SRC) -o \$@\n".
8ff0: 0a 77 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a  .writeln "\$(OBJ
9000: 44 49 52 29 2f 74 68 2e 6f 3a 5c 74 5c 24 28 53  DIR)/th.o:\t\$(S
9010: 52 43 44 49 52 29 2f 74 68 2e 63 22 0a 77 72 69  RCDIR)/th.c".wri
9020: 74 65 6c 6e 20 22 5c 74 5c 24 28 58 54 43 43 29  teln "\t\$(XTCC)
9030: 20 2d 63 20 5c 24 28 53 52 43 44 49 52 29 2f 74   -c \$(SRCDIR)/t
9040: 68 2e 63 20 2d 6f 20 5c 24 40 5c 6e 22 0a 0a 77  h.c -o \$@\n"..w
9050: 72 69 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49  riteln "\$(OBJDI
9060: 52 29 2f 74 68 5f 6c 61 6e 67 2e 6f 3a 5c 74 5c  R)/th_lang.o:\t\
9070: 24 28 53 52 43 44 49 52 29 2f 74 68 5f 6c 61 6e  $(SRCDIR)/th_lan
9080: 67 2e 63 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74  g.c".writeln "\t
9090: 5c 24 28 58 54 43 43 29 20 2d 63 20 5c 24 28 53  \$(XTCC) -c \$(S
90a0: 52 43 44 49 52 29 2f 74 68 5f 6c 61 6e 67 2e 63  RCDIR)/th_lang.c
90b0: 20 2d 6f 20 5c 24 40 5c 6e 22 0a 0a 77 72 69 74   -o \$@\n"..writ
90c0: 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29 2f  eln "\$(OBJDIR)/
90d0: 74 68 5f 74 63 6c 2e 6f 3a 5c 74 5c 24 28 53 52  th_tcl.o:\t\$(SR
90e0: 43 44 49 52 29 2f 74 68 5f 74 63 6c 2e 63 22 0a  CDIR)/th_tcl.c".
90f0: 77 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 58 54  writeln "\t\$(XT
9100: 43 43 29 20 2d 63 20 5c 24 28 53 52 43 44 49 52  CC) -c \$(SRCDIR
9110: 29 2f 74 68 5f 74 63 6c 2e 63 20 2d 6f 20 5c 24  )/th_tcl.c -o \$
9120: 40 5c 6e 22 0a 0a 77 72 69 74 65 6c 6e 20 22 5c  @\n"..writeln "\
9130: 24 28 4f 42 4a 44 49 52 29 2f 6d 69 6e 69 7a 2e  $(OBJDIR)/miniz.
9140: 6f 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 6d  o:\t\$(SRCDIR)/m
9150: 69 6e 69 7a 2e 63 22 0a 77 72 69 74 65 6c 6e 20  iniz.c".writeln 
9160: 22 5c 74 5c 24 28 58 54 43 43 29 20 5c 24 28 4d  "\t\$(XTCC) \$(M
9170: 49 4e 49 5a 5f 4f 50 54 49 4f 4e 53 29 20 2d 63  INIZ_OPTIONS) -c
9180: 20 5c 24 28 53 52 43 44 49 52 29 2f 6d 69 6e 69   \$(SRCDIR)/mini
9190: 7a 2e 63 20 2d 6f 20 5c 24 40 5c 6e 22 0a 0a 63  z.c -o \$@\n"..c
91a0: 6c 6f 73 65 20 24 6f 75 74 70 75 74 5f 66 69 6c  lose $output_fil
91b0: 65 0a 23 0a 23 20 45 6e 64 20 6f 66 20 74 68 65  e.#.# End of the
91c0: 20 77 69 6e 2f 4d 61 6b 65 66 69 6c 65 2e 6d 69   win/Makefile.mi
91d0: 6e 67 77 20 6f 75 74 70 75 74 0a 23 23 23 23 23  ngw output.#####
91e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
91f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9200: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9210: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9220: 23 23 23 23 23 23 23 23 23 0a 23 23 23 23 23 23  #########.######
9230: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9240: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9250: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9260: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9270: 23 23 23 23 23 23 23 23 0a 23 23 23 23 23 23 23  ########.#######
9280: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9290: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
92a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
92b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
92c0: 23 23 23 23 23 23 23 0a 23 20 42 65 67 69 6e 20  #######.# Begin 
92d0: 77 69 6e 2f 4d 61 6b 65 66 69 6c 65 2e 64 6d 63  win/Makefile.dmc
92e0: 20 6f 75 74 70 75 74 0a 23 0a 70 75 74 73 20 22   output.#.puts "
92f0: 62 75 69 6c 64 69 6e 67 20 2e 2e 2f 77 69 6e 2f  building ../win/
9300: 4d 61 6b 65 66 69 6c 65 2e 64 6d 63 22 0a 73 65  Makefile.dmc".se
9310: 74 20 6f 75 74 70 75 74 5f 66 69 6c 65 20 5b 6f  t output_file [o
9320: 70 65 6e 20 2e 2e 2f 77 69 6e 2f 4d 61 6b 65 66  pen ../win/Makef
9330: 69 6c 65 2e 64 6d 63 20 77 5d 0a 66 63 6f 6e 66  ile.dmc w].fconf
9340: 69 67 75 72 65 20 24 6f 75 74 70 75 74 5f 66 69  igure $output_fi
9350: 6c 65 20 2d 74 72 61 6e 73 6c 61 74 69 6f 6e 20  le -translation 
9360: 62 69 6e 61 72 79 0a 0a 77 72 69 74 65 6c 6e 20  binary..writeln 
9370: 7b 23 0a 23 23 23 23 23 23 23 23 23 23 23 23 23  {#.#############
9380: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9390: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
93a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
93b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
93c0: 23 0a 23 20 57 41 52 4e 49 4e 47 3a 20 44 4f 20  #.# WARNING: DO 
93d0: 4e 4f 54 20 45 44 49 54 2c 20 41 55 54 4f 4d 41  NOT EDIT, AUTOMA
93e0: 54 49 43 41 4c 4c 59 20 47 45 4e 45 52 41 54 45  TICALLY GENERATE
93f0: 44 20 46 49 4c 45 20 28 53 45 45 20 22 73 72 63  D FILE (SEE "src
9400: 2f 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 22 29 0a  /makemake.tcl").
9410: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9420: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9430: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9440: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
9450: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23  ##############.#
9460: 0a 23 20 54 68 69 73 20 66 69 6c 65 20 69 73 20  .# This file is 
9470: 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 67 65  automatically ge
9480: 6e 65 72 61 74 65 64 2e 20 20 49 6e 73 74 65 61  nerated.  Instea
9490: 64 20 6f 66 20 65 64 69 74 69 6e 67 20 74 68 69  d of editing thi
94a0: 73 0a 23 20 66 69 6c 65 2c 20 65 64 69 74 20 22  s.# file, edit "
94b0: 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 22 20 74 68  makemake.tcl" th
94c0: 65 6e 20 72 75 6e 20 22 74 63 6c 73 68 20 6d 61  en run "tclsh ma
94d0: 6b 65 6d 61 6b 65 2e 74 63 6c 22 0a 23 20 74 6f  kemake.tcl".# to
94e0: 20 72 65 67 65 6e 65 72 61 74 65 20 74 68 69 73   regenerate this
94f0: 20 66 69 6c 65 2e 0a 23 0a 42 20 20 20 20 20 20   file..#.B      
9500: 3d 20 2e 2e 0a 53 52 43 44 49 52 20 3d 20 24 42  = ...SRCDIR = $B
9510: 5c 73 72 63 0a 4f 42 4a 44 49 52 20 3d 20 2e 0a  \src.OBJDIR = ..
9520: 4f 20 20 20 20 20 20 3d 20 2e 6f 62 6a 0a 45 20  O      = .obj.E 
9530: 20 20 20 20 20 3d 20 2e 65 78 65 0a 0a 0a 23 20       = .exe...# 
9540: 4d 61 79 62 65 20 44 4d 44 49 52 2c 20 53 53 4c  Maybe DMDIR, SSL
9550: 20 6f 72 20 49 4e 43 4c 20 6e 65 65 64 73 20 61   or INCL needs a
9560: 64 6a 75 73 74 6d 65 6e 74 0a 44 4d 44 49 52 20  djustment.DMDIR 
9570: 20 3d 20 63 3a 5c 44 4d 0a 49 4e 43 4c 20 20 20   = c:\DM.INCL   
9580: 3d 20 2d 49 2e 20 2d 49 24 28 53 52 43 44 49 52  = -I. -I$(SRCDIR
9590: 29 20 2d 49 24 42 5c 77 69 6e 5c 69 6e 63 6c 75  ) -I$B\win\inclu
95a0: 64 65 20 2d 49 24 28 44 4d 44 49 52 29 5c 65 78  de -I$(DMDIR)\ex
95b0: 74 72 61 5c 69 6e 63 6c 75 64 65 0a 0a 23 53 53  tra\include..#SS
95c0: 4c 20 20 20 3d 20 20 2d 44 46 4f 53 53 49 4c 5f  L   =  -DFOSSIL_
95d0: 45 4e 41 42 4c 45 5f 53 53 4c 3d 31 0a 53 53 4c  ENABLE_SSL=1.SSL
95e0: 20 20 20 20 3d 0a 0a 43 46 4c 41 47 53 20 3d 20      =..CFLAGS = 
95f0: 2d 6f 0a 42 43 43 20 20 20 20 3d 20 24 28 44 4d  -o.BCC    = $(DM
9600: 44 49 52 29 5c 62 69 6e 5c 64 6d 63 20 24 28 43  DIR)\bin\dmc $(C
9610: 46 4c 41 47 53 29 0a 54 43 43 20 20 20 20 3d 20  FLAGS).TCC    = 
9620: 24 28 44 4d 44 49 52 29 5c 62 69 6e 5c 64 6d 63  $(DMDIR)\bin\dmc
9630: 20 24 28 43 46 4c 41 47 53 29 20 24 28 44 4d 43   $(CFLAGS) $(DMC
9640: 44 45 46 29 20 24 28 53 53 4c 29 20 24 28 49 4e  DEF) $(SSL) $(IN
9650: 43 4c 29 0a 4c 49 42 53 20 20 20 3d 20 24 28 44  CL).LIBS   = $(D
9660: 4d 44 49 52 29 5c 65 78 74 72 61 5c 6c 69 62 5c  MDIR)\extra\lib\
9670: 20 7a 6c 69 62 20 77 73 6f 63 6b 33 32 20 61 64   zlib wsock32 ad
9680: 76 61 70 69 33 32 20 64 6e 73 61 70 69 0a 7d 0a  vapi32 dnsapi.}.
9690: 77 72 69 74 65 6c 6e 20 22 53 51 4c 49 54 45 5f  writeln "SQLITE_
96a0: 4f 50 54 49 4f 4e 53 20 3d 20 5b 6a 6f 69 6e 20  OPTIONS = [join 
96b0: 24 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 20  $SQLITE_OPTIONS 
96c0: 7b 20 7d 5d 5c 6e 22 0a 77 72 69 74 65 6c 6e 20  { }]\n".writeln 
96d0: 22 53 48 45 4c 4c 5f 4f 50 54 49 4f 4e 53 20 3d  "SHELL_OPTIONS =
96e0: 20 5b 6a 6f 69 6e 20 24 53 48 45 4c 4c 5f 57 49   [join $SHELL_WI
96f0: 4e 33 32 5f 4f 50 54 49 4f 4e 53 20 7b 20 7d 5d  N32_OPTIONS { }]
9700: 5c 6e 22 0a 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e  \n".writeln -non
9710: 65 77 6c 69 6e 65 20 22 53 52 43 20 20 20 3d 22  ewline "SRC   ="
9720: 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72  .foreach s [lsor
9730: 74 20 24 73 72 63 5d 20 7b 0a 20 20 77 72 69 74  t $src] {.  writ
9740: 65 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  eln -nonewline "
9750: 20 24 7b 73 7d 5f 2e 63 22 0a 7d 0a 77 72 69 74   ${s}_.c".}.writ
9760: 65 6c 6e 20 22 5c 6e 22 0a 77 72 69 74 65 6c 6e  eln "\n".writeln
9770: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 4f 42 4a   -nonewline "OBJ
9780: 20 20 20 3d 20 22 0a 66 6f 72 65 61 63 68 20 73     = ".foreach s
9790: 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a   [lsort $src] {.
97a0: 20 20 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e 65 77    writeln -nonew
97b0: 6c 69 6e 65 20 22 5c 24 28 4f 42 4a 44 49 52 29  line "\$(OBJDIR)
97c0: 5c 5c 24 73 5c 24 4f 20 22 0a 7d 0a 77 72 69 74  \\$s\$O ".}.writ
97d0: 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29 5c  eln "\$(OBJDIR)\
97e0: 5c 73 68 65 6c 6c 5c 24 4f 20 5c 24 28 4f 42 4a  \shell\$O \$(OBJ
97f0: 44 49 52 29 5c 5c 73 71 6c 69 74 65 33 5c 24 4f  DIR)\\sqlite3\$O
9800: 20 5c 24 28 4f 42 4a 44 49 52 29 5c 5c 74 68 5c   \$(OBJDIR)\\th\
9810: 24 4f 20 5c 24 28 4f 42 4a 44 49 52 29 5c 5c 74  $O \$(OBJDIR)\\t
9820: 68 5f 6c 61 6e 67 5c 24 4f 22 0a 77 72 69 74 65  h_lang\$O".write
9830: 6c 6e 20 7b 0a 0a 52 43 3d 24 28 44 4d 44 49 52  ln {..RC=$(DMDIR
9840: 29 5c 62 69 6e 5c 72 63 63 0a 52 43 46 4c 41 47  )\bin\rcc.RCFLAG
9850: 53 3d 2d 33 32 20 2d 77 31 20 2d 49 24 28 53 52  S=-32 -w1 -I$(SR
9860: 43 44 49 52 29 20 2f 44 5f 5f 44 4d 43 5f 5f 0a  CDIR) /D__DMC__.
9870: 0a 41 50 50 4e 41 4d 45 20 3d 20 24 28 4f 42 4a  .APPNAME = $(OBJ
9880: 44 49 52 29 5c 66 6f 73 73 69 6c 24 28 45 29 0a  DIR)\fossil$(E).
9890: 0a 61 6c 6c 3a 20 24 28 41 50 50 4e 41 4d 45 29  .all: $(APPNAME)
98a0: 0a 0a 24 28 41 50 50 4e 41 4d 45 29 20 3a 20 74  ..$(APPNAME) : t
98b0: 72 61 6e 73 6c 61 74 65 24 45 20 6d 6b 69 6e 64  ranslate$E mkind
98c0: 65 78 24 45 20 63 6f 64 65 63 68 65 63 6b 31 24  ex$E codecheck1$
98d0: 45 20 68 65 61 64 65 72 73 20 20 24 28 4f 42 4a  E headers  $(OBJ
98e0: 29 20 24 28 4f 42 4a 44 49 52 29 5c 6c 69 6e 6b  ) $(OBJDIR)\link
98f0: 0a 09 63 64 20 24 28 4f 42 4a 44 49 52 29 0a 09  ..cd $(OBJDIR)..
9900: 63 6f 64 65 63 68 65 63 6b 31 24 45 20 24 28 53  codecheck1$E $(S
9910: 52 43 29 0a 09 24 28 44 4d 44 49 52 29 5c 62 69  RC)..$(DMDIR)\bi
9920: 6e 5c 6c 69 6e 6b 20 40 6c 69 6e 6b 0a 0a 24 28  n\link @link..$(
9930: 4f 42 4a 44 49 52 29 5c 66 6f 73 73 69 6c 2e 72  OBJDIR)\fossil.r
9940: 65 73 3a 09 24 42 5c 77 69 6e 5c 66 6f 73 73 69  es:.$B\win\fossi
9950: 6c 2e 72 63 0a 09 24 28 52 43 29 20 24 28 52 43  l.rc..$(RC) $(RC
9960: 46 4c 41 47 53 29 20 2d 6f 24 40 20 24 2a 2a 0a  FLAGS) -o$@ $**.
9970: 0a 24 28 4f 42 4a 44 49 52 29 5c 6c 69 6e 6b 3a  .$(OBJDIR)\link:
9980: 20 24 42 5c 77 69 6e 5c 4d 61 6b 65 66 69 6c 65   $B\win\Makefile
9990: 2e 64 6d 63 20 24 28 4f 42 4a 44 49 52 29 5c 66  .dmc $(OBJDIR)\f
99a0: 6f 73 73 69 6c 2e 72 65 73 7d 0a 77 72 69 74 65  ossil.res}.write
99b0: 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 5c  ln -nonewline "\
99c0: 74 2b 65 63 68 6f 20 22 0a 66 6f 72 65 61 63 68  t+echo ".foreach
99d0: 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20   s [lsort $src] 
99e0: 7b 0a 20 20 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e  {.  writeln -non
99f0: 65 77 6c 69 6e 65 20 22 24 73 20 22 0a 7d 0a 77  ewline "$s ".}.w
9a00: 72 69 74 65 6c 6e 20 22 73 68 65 6c 6c 20 73 71  riteln "shell sq
9a10: 6c 69 74 65 33 20 74 68 20 74 68 5f 6c 61 6e 67  lite3 th th_lang
9a20: 20 3e 20 5c 24 40 22 0a 77 72 69 74 65 6c 6e 20   > \$@".writeln 
9a30: 22 5c 74 2b 65 63 68 6f 20 66 6f 73 73 69 6c 20  "\t+echo fossil 
9a40: 3e 3e 20 5c 24 40 22 0a 77 72 69 74 65 6c 6e 20  >> \$@".writeln 
9a50: 22 5c 74 2b 65 63 68 6f 20 66 6f 73 73 69 6c 20  "\t+echo fossil 
9a60: 3e 3e 20 5c 24 40 22 0a 77 72 69 74 65 6c 6e 20  >> \$@".writeln 
9a70: 22 5c 74 2b 65 63 68 6f 20 5c 24 28 4c 49 42 53  "\t+echo \$(LIBS
9a80: 29 20 3e 3e 20 5c 24 40 22 0a 77 72 69 74 65 6c  ) >> \$@".writel
9a90: 6e 20 22 5c 74 2b 65 63 68 6f 2e 20 3e 3e 20 5c  n "\t+echo. >> \
9aa0: 24 40 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74 2b  $@".writeln "\t+
9ab0: 65 63 68 6f 20 66 6f 73 73 69 6c 20 3e 3e 20 5c  echo fossil >> \
9ac0: 24 40 22 0a 0a 77 72 69 74 65 6c 6e 20 7b 0a 74  $@"..writeln {.t
9ad0: 72 61 6e 73 6c 61 74 65 24 45 3a 20 24 28 53 52  ranslate$E: $(SR
9ae0: 43 44 49 52 29 5c 74 72 61 6e 73 6c 61 74 65 2e  CDIR)\translate.
9af0: 63 0a 09 24 28 42 43 43 29 20 2d 6f 24 40 20 24  c..$(BCC) -o$@ $
9b00: 2a 2a 0a 0a 6d 61 6b 65 68 65 61 64 65 72 73 24  **..makeheaders$
9b10: 45 3a 20 24 28 53 52 43 44 49 52 29 5c 6d 61 6b  E: $(SRCDIR)\mak
9b20: 65 68 65 61 64 65 72 73 2e 63 0a 09 24 28 42 43  eheaders.c..$(BC
9b30: 43 29 20 2d 6f 24 40 20 24 2a 2a 0a 0a 6d 6b 69  C) -o$@ $**..mki
9b40: 6e 64 65 78 24 45 3a 20 24 28 53 52 43 44 49 52  ndex$E: $(SRCDIR
9b50: 29 5c 6d 6b 69 6e 64 65 78 2e 63 0a 09 24 28 42  )\mkindex.c..$(B
9b60: 43 43 29 20 2d 6f 24 40 20 24 2a 2a 0a 0a 6d 6b  CC) -o$@ $**..mk
9b70: 62 75 69 6c 74 69 6e 24 45 3a 20 24 28 53 52 43  builtin$E: $(SRC
9b80: 44 49 52 29 5c 6d 6b 62 75 69 6c 74 69 6e 2e 63  DIR)\mkbuiltin.c
9b90: 0a 09 24 28 42 43 43 29 20 2d 6f 24 40 20 24 2a  ..$(BCC) -o$@ $*
9ba0: 2a 0a 0a 6d 6b 76 65 72 73 69 6f 6e 24 45 3a 20  *..mkversion$E: 
9bb0: 24 28 53 52 43 44 49 52 29 5c 6d 6b 76 65 72 73  $(SRCDIR)\mkvers
9bc0: 69 6f 6e 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f  ion.c..$(BCC) -o
9bd0: 24 40 20 24 2a 2a 0a 0a 63 6f 64 65 63 68 65 63  $@ $**..codechec
9be0: 6b 31 24 45 3a 20 24 28 53 52 43 44 49 52 29 5c  k1$E: $(SRCDIR)\
9bf0: 63 6f 64 65 63 68 65 63 6b 31 2e 63 0a 09 24 28  codecheck1.c..$(
9c00: 42 43 43 29 20 2d 6f 24 40 20 24 2a 2a 0a 0a 24  BCC) -o$@ $**..$
9c10: 28 4f 42 4a 44 49 52 29 5c 73 68 65 6c 6c 24 4f  (OBJDIR)\shell$O
9c20: 20 3a 20 24 28 53 52 43 44 49 52 29 5c 73 68 65   : $(SRCDIR)\she
9c30: 6c 6c 2e 63 0a 09 24 28 54 43 43 29 20 2d 6f 24  ll.c..$(TCC) -o$
9c40: 40 20 2d 63 20 24 28 53 48 45 4c 4c 5f 4f 50 54  @ -c $(SHELL_OPT
9c50: 49 4f 4e 53 29 20 24 28 53 51 4c 49 54 45 5f 4f  IONS) $(SQLITE_O
9c60: 50 54 49 4f 4e 53 29 20 24 28 53 48 45 4c 4c 5f  PTIONS) $(SHELL_
9c70: 43 46 4c 41 47 53 29 20 24 2a 2a 0a 0a 24 28 4f  CFLAGS) $**..$(O
9c80: 42 4a 44 49 52 29 5c 73 71 6c 69 74 65 33 24 4f  BJDIR)\sqlite3$O
9c90: 20 3a 20 24 28 53 52 43 44 49 52 29 5c 73 71 6c   : $(SRCDIR)\sql
9ca0: 69 74 65 33 2e 63 0a 09 24 28 54 43 43 29 20 2d  ite3.c..$(TCC) -
9cb0: 6f 24 40 20 2d 63 20 24 28 53 51 4c 49 54 45 5f  o$@ -c $(SQLITE_
9cc0: 4f 50 54 49 4f 4e 53 29 20 24 28 53 51 4c 49 54  OPTIONS) $(SQLIT
9cd0: 45 5f 43 46 4c 41 47 53 29 20 24 2a 2a 0a 0a 24  E_CFLAGS) $**..$
9ce0: 28 4f 42 4a 44 49 52 29 5c 74 68 24 4f 20 3a 20  (OBJDIR)\th$O : 
9cf0: 24 28 53 52 43 44 49 52 29 5c 74 68 2e 63 0a 09  $(SRCDIR)\th.c..
9d00: 24 28 54 43 43 29 20 2d 6f 24 40 20 2d 63 20 24  $(TCC) -o$@ -c $
9d10: 2a 2a 0a 0a 24 28 4f 42 4a 44 49 52 29 5c 74 68  **..$(OBJDIR)\th
9d20: 5f 6c 61 6e 67 24 4f 20 3a 20 24 28 53 52 43 44  _lang$O : $(SRCD
9d30: 49 52 29 5c 74 68 5f 6c 61 6e 67 2e 63 0a 09 24  IR)\th_lang.c..$
9d40: 28 54 43 43 29 20 2d 6f 24 40 20 2d 63 20 24 2a  (TCC) -o$@ -c $*
9d50: 2a 0a 0a 24 28 4f 42 4a 44 49 52 29 5c 63 73 6f  *..$(OBJDIR)\cso
9d60: 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f 6e 2e 68  n_amalgamation.h
9d70: 20 3a 20 24 28 53 52 43 44 49 52 29 5c 63 73 6f   : $(SRCDIR)\cso
9d80: 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f 6e 2e 68  n_amalgamation.h
9d90: 0a 09 63 70 20 24 40 20 24 40 0a 0a 56 45 52 53  ..cp $@ $@..VERS
9da0: 49 4f 4e 2e 68 20 3a 20 6d 6b 76 65 72 73 69 6f  ION.h : mkversio
9db0: 6e 24 45 20 24 42 5c 6d 61 6e 69 66 65 73 74 2e  n$E $B\manifest.
9dc0: 75 75 69 64 20 24 42 5c 6d 61 6e 69 66 65 73 74  uuid $B\manifest
9dd0: 20 24 42 5c 56 45 52 53 49 4f 4e 0a 09 2b 24 2a   $B\VERSION..+$*
9de0: 2a 20 3e 20 24 40 0a 0a 70 61 67 65 5f 69 6e 64  * > $@..page_ind
9df0: 65 78 2e 68 3a 20 6d 6b 69 6e 64 65 78 24 45 20  ex.h: mkindex$E 
9e00: 24 28 53 52 43 29 0a 09 2b 24 2a 2a 20 3e 20 24  $(SRC)..+$** > $
9e10: 40 0a 0a 62 75 69 6c 74 69 6e 5f 64 61 74 61 2e  @..builtin_data.
9e20: 68 3a 09 6d 6b 62 75 69 6c 74 69 6e 24 45 20 24  h:.mkbuiltin$E $
9e30: 28 45 58 54 52 41 5f 46 49 4c 45 53 29 0a 09 6d  (EXTRA_FILES)..m
9e40: 6b 62 75 69 6c 74 69 6e 24 45 20 2d 2d 70 72 65  kbuiltin$E --pre
9e50: 66 69 78 20 24 28 53 52 43 44 49 52 29 2f 20 24  fix $(SRCDIR)/ $
9e60: 28 45 58 54 52 41 5f 46 49 4c 45 53 29 20 3e 20  (EXTRA_FILES) > 
9e70: 24 40 0a 0a 63 6c 65 61 6e 3a 0a 09 2d 64 65 6c  $@..clean:..-del
9e80: 20 24 28 4f 42 4a 44 49 52 29 5c 2a 2e 6f 62 6a   $(OBJDIR)\*.obj
9e90: 0a 09 2d 64 65 6c 20 2a 2e 6f 62 6a 20 2a 5f 2e  ..-del *.obj *_.
9ea0: 63 20 2a 2e 68 20 2a 2e 6d 61 70 0a 0a 72 65 61  c *.h *.map..rea
9eb0: 6c 63 6c 65 61 6e 3a 0a 09 2d 64 65 6c 20 24 28  lclean:..-del $(
9ec0: 41 50 50 4e 41 4d 45 29 20 74 72 61 6e 73 6c 61  APPNAME) transla
9ed0: 74 65 24 45 20 6d 6b 69 6e 64 65 78 24 45 20 6d  te$E mkindex$E m
9ee0: 61 6b 65 68 65 61 64 65 72 73 24 45 20 6d 6b 76  akeheaders$E mkv
9ef0: 65 72 73 69 6f 6e 24 45 20 63 6f 64 65 63 68 65  ersion$E codeche
9f00: 63 6b 31 24 45 20 6d 6b 62 75 69 6c 74 69 6e 24  ck1$E mkbuiltin$
9f10: 45 0a 0a 24 28 4f 42 4a 44 49 52 29 5c 6a 73 6f  E..$(OBJDIR)\jso
9f20: 6e 24 4f 20 3a 20 24 28 53 52 43 44 49 52 29 5c  n$O : $(SRCDIR)\
9f30: 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68 0a 24 28  json_detail.h.$(
9f40: 4f 42 4a 44 49 52 29 5c 6a 73 6f 6e 5f 61 72 74  OBJDIR)\json_art
9f50: 69 66 61 63 74 24 4f 20 3a 20 24 28 53 52 43 44  ifact$O : $(SRCD
9f60: 49 52 29 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e  IR)\json_detail.
9f70: 68 0a 24 28 4f 42 4a 44 49 52 29 5c 6a 73 6f 6e  h.$(OBJDIR)\json
9f80: 5f 62 72 61 6e 63 68 24 4f 20 3a 20 24 28 53 52  _branch$O : $(SR
9f90: 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74 61 69  CDIR)\json_detai
9fa0: 6c 2e 68 0a 24 28 4f 42 4a 44 49 52 29 5c 6a 73  l.h.$(OBJDIR)\js
9fb0: 6f 6e 5f 63 6f 6e 66 69 67 24 4f 20 3a 20 24 28  on_config$O : $(
9fc0: 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74  SRCDIR)\json_det
9fd0: 61 69 6c 2e 68 0a 24 28 4f 42 4a 44 49 52 29 5c  ail.h.$(OBJDIR)\
9fe0: 6a 73 6f 6e 5f 64 69 66 66 24 4f 20 3a 20 24 28  json_diff$O : $(
9ff0: 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74  SRCDIR)\json_det
a000: 61 69 6c 2e 68 0a 24 28 4f 42 4a 44 49 52 29 5c  ail.h.$(OBJDIR)\
a010: 6a 73 6f 6e 5f 64 69 72 24 4f 20 3a 20 24 28 53  json_dir$O : $(S
a020: 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74 61  RCDIR)\json_deta
a030: 69 6c 2e 68 0a 24 28 4f 42 4a 44 49 52 29 5c 6a  il.h.$(OBJDIR)\j
a040: 73 6f 6e 5f 66 69 6e 66 6f 24 4f 20 3a 20 24 28  son_finfo$O : $(
a050: 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74  SRCDIR)\json_det
a060: 61 69 6c 2e 68 0a 24 28 4f 42 4a 44 49 52 29 5c  ail.h.$(OBJDIR)\
a070: 6a 73 6f 6e 5f 6c 6f 67 69 6e 24 4f 20 3a 20 24  json_login$O : $
a080: 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65  (SRCDIR)\json_de
a090: 74 61 69 6c 2e 68 0a 24 28 4f 42 4a 44 49 52 29  tail.h.$(OBJDIR)
a0a0: 5c 6a 73 6f 6e 5f 71 75 65 72 79 24 4f 20 3a 20  \json_query$O : 
a0b0: 24 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64  $(SRCDIR)\json_d
a0c0: 65 74 61 69 6c 2e 68 0a 24 28 4f 42 4a 44 49 52  etail.h.$(OBJDIR
a0d0: 29 5c 6a 73 6f 6e 5f 72 65 70 6f 72 74 24 4f 20  )\json_report$O 
a0e0: 3a 20 24 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e  : $(SRCDIR)\json
a0f0: 5f 64 65 74 61 69 6c 2e 68 0a 24 28 4f 42 4a 44  _detail.h.$(OBJD
a100: 49 52 29 5c 6a 73 6f 6e 5f 73 74 61 74 75 73 24  IR)\json_status$
a110: 4f 20 3a 20 24 28 53 52 43 44 49 52 29 5c 6a 73  O : $(SRCDIR)\js
a120: 6f 6e 5f 64 65 74 61 69 6c 2e 68 0a 24 28 4f 42  on_detail.h.$(OB
a130: 4a 44 49 52 29 5c 6a 73 6f 6e 5f 74 61 67 24 4f  JDIR)\json_tag$O
a140: 20 3a 20 24 28 53 52 43 44 49 52 29 5c 6a 73 6f   : $(SRCDIR)\jso
a150: 6e 5f 64 65 74 61 69 6c 2e 68 0a 24 28 4f 42 4a  n_detail.h.$(OBJ
a160: 44 49 52 29 5c 6a 73 6f 6e 5f 74 69 6d 65 6c 69  DIR)\json_timeli
a170: 6e 65 24 4f 20 3a 20 24 28 53 52 43 44 49 52 29  ne$O : $(SRCDIR)
a180: 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68 0a 24  \json_detail.h.$
a190: 28 4f 42 4a 44 49 52 29 5c 6a 73 6f 6e 5f 75 73  (OBJDIR)\json_us
a1a0: 65 72 24 4f 20 3a 20 24 28 53 52 43 44 49 52 29  er$O : $(SRCDIR)
a1b0: 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68 0a 24  \json_detail.h.$
a1c0: 28 4f 42 4a 44 49 52 29 5c 6a 73 6f 6e 5f 77 69  (OBJDIR)\json_wi
a1d0: 6b 69 24 4f 20 3a 20 24 28 53 52 43 44 49 52 29  ki$O : $(SRCDIR)
a1e0: 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68 0a 0a  \json_detail.h..
a1f0: 7d 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f  }.foreach s [lso
a200: 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 77 72 69  rt $src] {.  wri
a210: 74 65 6c 6e 20 22 5c 24 28 4f 42 4a 44 49 52 29  teln "\$(OBJDIR)
a220: 5c 5c 24 73 5c 24 4f 20 3a 20 24 7b 73 7d 5f 2e  \\$s\$O : ${s}_.
a230: 63 20 24 7b 73 7d 2e 68 22 0a 20 20 77 72 69 74  c ${s}.h".  writ
a240: 65 6c 6e 20 22 5c 74 5c 24 28 54 43 43 29 20 2d  eln "\t\$(TCC) -
a250: 6f 5c 24 40 20 2d 63 20 24 7b 73 7d 5f 2e 63 5c  o\$@ -c ${s}_.c\
a260: 6e 22 0a 20 20 77 72 69 74 65 6c 6e 20 22 24 7b  n".  writeln "${
a270: 73 7d 5f 2e 63 20 3a 20 5c 24 28 53 52 43 44 49  s}_.c : \$(SRCDI
a280: 52 29 5c 5c 24 73 2e 63 22 0a 20 20 77 72 69 74  R)\\$s.c".  writ
a290: 65 6c 6e 20 22 5c 74 2b 74 72 61 6e 73 6c 61 74  eln "\t+translat
a2a0: 65 5c 24 45 20 5c 24 2a 2a 20 3e 20 5c 24 40 5c  e\$E \$** > \$@\
a2b0: 6e 22 0a 7d 0a 0a 77 72 69 74 65 6c 6e 20 2d 6e  n".}..writeln -n
a2c0: 6f 6e 65 77 6c 69 6e 65 20 22 68 65 61 64 65 72  onewline "header
a2d0: 73 3a 20 6d 61 6b 65 68 65 61 64 65 72 73 5c 24  s: makeheaders\$
a2e0: 45 20 70 61 67 65 5f 69 6e 64 65 78 2e 68 20 62  E page_index.h b
a2f0: 75 69 6c 74 69 6e 5f 64 61 74 61 2e 68 20 56 45  uiltin_data.h VE
a300: 52 53 49 4f 4e 2e 68 5c 6e 5c 74 20 2b 6d 61 6b  RSION.h\n\t +mak
a310: 65 68 65 61 64 65 72 73 5c 24 45 20 22 0a 66 6f  eheaders\$E ".fo
a320: 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24  reach s [lsort $
a330: 73 72 63 5d 20 7b 0a 20 20 77 72 69 74 65 6c 6e  src] {.  writeln
a340: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 24 7b 73   -nonewline "${s
a350: 7d 5f 2e 63 3a 24 73 2e 68 20 22 0a 7d 0a 77 72  }_.c:$s.h ".}.wr
a360: 69 74 65 6c 6e 20 22 5c 24 28 53 52 43 44 49 52  iteln "\$(SRCDIR
a370: 29 5c 5c 73 71 6c 69 74 65 33 2e 68 20 5c 24 28  )\\sqlite3.h \$(
a380: 53 52 43 44 49 52 29 5c 5c 74 68 2e 68 20 56 45  SRCDIR)\\th.h VE
a390: 52 53 49 4f 4e 2e 68 20 5c 24 28 53 52 43 44 49  RSION.h \$(SRCDI
a3a0: 52 29 5c 5c 63 73 6f 6e 5f 61 6d 61 6c 67 61 6d  R)\\cson_amalgam
a3b0: 61 74 69 6f 6e 2e 68 22 0a 77 72 69 74 65 6c 6e  ation.h".writeln
a3c0: 20 22 5c 74 40 63 6f 70 79 20 2f 59 20 6e 75 6c   "\t@copy /Y nul
a3d0: 3a 20 68 65 61 64 65 72 73 22 0a 0a 63 6c 6f 73  : headers"..clos
a3e0: 65 20 24 6f 75 74 70 75 74 5f 66 69 6c 65 0a 23  e $output_file.#
a3f0: 0a 23 20 45 6e 64 20 6f 66 20 74 68 65 20 77 69  .# End of the wi
a400: 6e 2f 4d 61 6b 65 66 69 6c 65 2e 64 6d 63 20 6f  n/Makefile.dmc o
a410: 75 74 70 75 74 0a 23 23 23 23 23 23 23 23 23 23  utput.##########
a420: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a430: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a440: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a450: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a460: 23 23 23 23 0a 23 23 23 23 23 23 23 23 23 23 23  ####.###########
a470: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a480: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a490: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a4a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a4b0: 23 23 23 0a 23 23 23 23 23 23 23 23 23 23 23 23  ###.############
a4c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a4d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a4e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a4f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a500: 23 23 0a 23 20 42 65 67 69 6e 20 77 69 6e 2f 4d  ##.# Begin win/M
a510: 61 6b 65 66 69 6c 65 2e 6d 73 63 20 6f 75 74 70  akefile.msc outp
a520: 75 74 0a 23 0a 70 75 74 73 20 22 62 75 69 6c 64  ut.#.puts "build
a530: 69 6e 67 20 2e 2e 2f 77 69 6e 2f 4d 61 6b 65 66  ing ../win/Makef
a540: 69 6c 65 2e 6d 73 63 22 0a 73 65 74 20 6f 75 74  ile.msc".set out
a550: 70 75 74 5f 66 69 6c 65 20 5b 6f 70 65 6e 20 2e  put_file [open .
a560: 2e 2f 77 69 6e 2f 4d 61 6b 65 66 69 6c 65 2e 6d  ./win/Makefile.m
a570: 73 63 20 77 5d 0a 66 63 6f 6e 66 69 67 75 72 65  sc w].fconfigure
a580: 20 24 6f 75 74 70 75 74 5f 66 69 6c 65 20 2d 74   $output_file -t
a590: 72 61 6e 73 6c 61 74 69 6f 6e 20 62 69 6e 61 72  ranslation binar
a5a0: 79 0a 0a 77 72 69 74 65 6c 6e 20 7b 23 0a 23 23  y..writeln {#.##
a5b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a5c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a5d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a5e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a5f0: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 57  ############.# W
a600: 41 52 4e 49 4e 47 3a 20 44 4f 20 4e 4f 54 20 45  ARNING: DO NOT E
a610: 44 49 54 2c 20 41 55 54 4f 4d 41 54 49 43 41 4c  DIT, AUTOMATICAL
a620: 4c 59 20 47 45 4e 45 52 41 54 45 44 20 46 49 4c  LY GENERATED FIL
a630: 45 20 28 53 45 45 20 22 73 72 63 2f 6d 61 6b 65  E (SEE "src/make
a640: 6d 61 6b 65 2e 74 63 6c 22 29 0a 23 23 23 23 23  make.tcl").#####
a650: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a660: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a670: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a680: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a690: 23 23 23 23 23 23 23 23 23 0a 23 0a 23 0a 23 20  #########.#.#.# 
a6a0: 54 68 69 73 20 66 69 6c 65 20 69 73 20 61 75 74  This file is aut
a6b0: 6f 6d 61 74 69 63 61 6c 6c 79 20 67 65 6e 65 72  omatically gener
a6c0: 61 74 65 64 2e 20 20 49 6e 73 74 65 61 64 20 6f  ated.  Instead o
a6d0: 66 20 65 64 69 74 69 6e 67 20 74 68 69 73 0a 23  f editing this.#
a6e0: 20 66 69 6c 65 2c 20 65 64 69 74 20 22 6d 61 6b   file, edit "mak
a6f0: 65 6d 61 6b 65 2e 74 63 6c 22 20 74 68 65 6e 20  emake.tcl" then 
a700: 72 75 6e 20 22 74 63 6c 73 68 20 6d 61 6b 65 6d  run "tclsh makem
a710: 61 6b 65 2e 74 63 6c 22 0a 23 20 74 6f 20 72 65  ake.tcl".# to re
a720: 67 65 6e 65 72 61 74 65 20 74 68 69 73 20 66 69  generate this fi
a730: 6c 65 2e 0a 23 0a 42 20 20 20 20 20 20 20 3d 20  le..#.B       = 
a740: 2e 2e 0a 53 52 43 44 49 52 20 20 3d 20 24 28 42  ...SRCDIR  = $(B
a750: 29 5c 73 72 63 0a 54 20 20 20 20 20 20 20 3d 20  )\src.T       = 
a760: 2e 0a 4f 42 4a 44 49 52 20 20 3d 20 24 28 54 29  ..OBJDIR  = $(T)
a770: 0a 4f 58 20 20 20 20 20 20 3d 20 24 28 4f 42 4a  .OX      = $(OBJ
a780: 44 49 52 29 0a 4f 20 20 20 20 20 20 20 3d 20 2e  DIR).O       = .
a790: 6f 62 6a 0a 45 20 20 20 20 20 20 20 3d 20 2e 65  obj.E       = .e
a7a0: 78 65 0a 50 20 20 20 20 20 20 20 3d 20 2e 70 64  xe.P       = .pd
a7b0: 62 0a 44 42 47 4f 50 54 53 20 3d 20 2f 4f 64 0a  b.DBGOPTS = /Od.
a7c0: 0a 49 4e 53 54 41 4c 4c 44 49 52 20 3d 20 2e 0a  .INSTALLDIR = ..
a7d0: 21 69 66 64 65 66 20 44 45 53 54 44 49 52 0a 49  !ifdef DESTDIR.I
a7e0: 4e 53 54 41 4c 4c 44 49 52 20 3d 20 24 28 44 45  NSTALLDIR = $(DE
a7f0: 53 54 44 49 52 29 5c 24 28 49 4e 53 54 41 4c 4c  STDIR)\$(INSTALL
a800: 44 49 52 29 0a 21 65 6e 64 69 66 0a 0a 23 20 57  DIR).!endif..# W
a810: 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 6f 75 74  hen building out
a820: 20 6f 66 20 73 6f 75 72 63 65 2c 20 74 68 69 73   of source, this
a830: 20 4d 61 6b 65 66 69 6c 65 20 6e 65 65 64 73 20   Makefile needs 
a840: 74 6f 20 6b 6e 6f 77 20 74 68 65 20 70 61 74 68  to know the path
a850: 20 74 6f 20 74 68 65 20 62 61 73 65 0a 23 20 74   to the base.# t
a860: 6f 70 2d 6c 65 76 65 6c 20 64 69 72 65 63 74 6f  op-level directo
a870: 72 79 20 66 6f 72 20 74 68 69 73 20 70 72 6f 6a  ry for this proj
a880: 65 63 74 2e 20 50 61 73 73 20 69 74 20 6f 6e 20  ect. Pass it on 
a890: 4e 4d 41 4b 45 20 63 6f 6d 6d 61 6e 64 20 6c 69  NMAKE command li
a8a0: 6e 65 20 76 69 61 20 6d 61 6b 65 0a 23 20 76 61  ne via make.# va
a8b0: 72 69 61 62 6c 65 20 42 3a 0a 23 20 20 20 4e 4d  riable B:.#   NM
a8c0: 41 4b 45 20 2f 66 20 22 70 61 74 68 5c 74 6f 5c  AKE /f "path\to\
a8d0: 74 68 69 73 5c 4d 61 6b 65 66 69 6c 65 22 20 42  this\Makefile" B
a8e0: 3d 22 70 61 74 68 2f 74 6f 2f 66 6f 73 73 69 6c  ="path/to/fossil
a8f0: 2f 72 6f 6f 74 22 0a 23 0a 23 20 4e 4f 54 45 3a  /root".#.# NOTE:
a900: 20 4d 61 6b 65 20 73 75 72 65 20 42 20 70 61 74   Make sure B pat
a910: 68 20 68 61 73 20 6e 6f 20 74 72 61 69 6c 69 6e  h has no trailin
a920: 67 20 62 61 63 6b 73 6c 61 73 68 2c 20 55 4e 49  g backslash, UNI
a930: 58 2d 73 74 79 6c 65 20 70 61 74 68 20 69 73 20  X-style path is 
a940: 4f 4b 20 74 6f 6f 2e 0a 23 0a 21 69 66 20 21 65  OK too..#.!if !e
a950: 78 69 73 74 28 22 24 28 42 29 5c 2e 66 6f 73 73  xist("$(B)\.foss
a960: 69 6c 2d 73 65 74 74 69 6e 67 73 22 29 0a 21 65  il-settings").!e
a970: 72 72 6f 72 20 50 6c 65 61 73 65 20 73 70 65 63  rror Please spec
a980: 69 66 79 20 70 61 74 68 20 74 6f 20 70 72 6f 6a  ify path to proj
a990: 65 63 74 20 62 61 73 65 20 64 69 72 65 63 74 6f  ect base directo
a9a0: 72 79 3a 20 42 3d 22 70 61 74 68 2f 74 6f 2f 66  ry: B="path/to/f
a9b0: 6f 73 73 69 6c 22 0a 21 65 6e 64 69 66 0a 0a 23  ossil".!endif..#
a9c0: 20 50 65 72 6c 20 69 73 20 6f 6e 6c 79 20 6e 65   Perl is only ne
a9d0: 63 65 73 73 61 72 79 20 69 66 20 4f 70 65 6e 53  cessary if OpenS
a9e0: 53 4c 20 73 75 70 70 6f 72 74 20 69 73 20 65 6e  SL support is en
a9f0: 61 62 6c 65 64 20 61 6e 64 20 69 74 20 69 73 20  abled and it is 
aa00: 62 75 69 6c 74 20 66 72 6f 6d 0a 23 20 73 6f 75  built from.# sou
aa10: 72 63 65 20 63 6f 64 65 2e 20 20 54 68 65 20 50  rce code.  The P
aa20: 45 52 4c 44 49 52 20 65 6e 76 69 72 6f 6e 6d 65  ERLDIR environme
aa30: 6e 74 20 76 61 72 69 61 62 6c 65 2c 20 69 66 20  nt variable, if 
aa40: 69 74 20 65 78 69 73 74 73 2c 20 73 68 6f 75 6c  it exists, shoul
aa50: 64 20 70 6f 69 6e 74 0a 23 20 74 6f 20 74 68 65  d point.# to the
aa60: 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61   directory conta
aa70: 69 6e 69 6e 67 20 74 68 65 20 6d 61 69 6e 20 50  ining the main P
aa80: 65 72 6c 20 65 78 65 63 75 74 61 62 6c 65 20 73  erl executable s
aa90: 70 65 63 69 66 69 65 64 20 68 65 72 65 20 28 69  pecified here (i
aaa0: 2e 65 2e 0a 23 20 22 70 65 72 6c 2e 65 78 65 22  .e..# "perl.exe"
aab0: 29 2e 0a 50 45 52 4c 20 20 20 20 3d 20 70 65 72  )..PERL    = per
aac0: 6c 2e 65 78 65 0a 0a 23 20 45 6e 61 62 6c 65 20  l.exe..# Enable 
aad0: 75 73 65 20 6f 66 20 61 76 61 69 6c 61 62 6c 65  use of available
aae0: 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6d 69   compiler optimi
aaf0: 7a 61 74 69 6f 6e 73 3f 0a 21 69 66 6e 64 65 66  zations?.!ifndef
ab00: 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 0a 4f   OPTIMIZATIONS.O
ab10: 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 3d 20 32  PTIMIZATIONS = 2
ab20: 0a 21 65 6e 64 69 66 0a 0a 23 20 45 6e 61 62 6c  .!endif..# Enabl
ab30: 65 20 64 65 62 75 67 67 69 6e 67 20 73 79 6d 62  e debugging symb
ab40: 6f 6c 73 3f 0a 21 69 66 6e 64 65 66 20 44 45 42  ols?.!ifndef DEB
ab50: 55 47 0a 44 45 42 55 47 20 3d 20 30 0a 21 65 6e  UG.DEBUG = 0.!en
ab60: 64 69 66 0a 21 69 66 64 65 66 20 46 4f 53 53 49  dif.!ifdef FOSSI
ab70: 4c 5f 44 45 42 55 47 0a 44 45 42 55 47 20 3d 20  L_DEBUG.DEBUG = 
ab80: 31 0a 21 65 6e 64 69 66 0a 0a 23 20 42 75 69 6c  1.!endif..# Buil
ab90: 64 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69  d the OpenSSL li
aba0: 62 72 61 72 69 65 73 3f 0a 21 69 66 6e 64 65 66  braries?.!ifndef
abb0: 20 46 4f 53 53 49 4c 5f 42 55 49 4c 44 5f 53 53   FOSSIL_BUILD_SS
abc0: 4c 0a 46 4f 53 53 49 4c 5f 42 55 49 4c 44 5f 53  L.FOSSIL_BUILD_S
abd0: 53 4c 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 23  SL = 0.!endif..#
abe0: 20 42 75 69 6c 64 20 74 68 65 20 69 6e 63 6c 75   Build the inclu
abf0: 64 65 64 20 7a 6c 69 62 20 6c 69 62 72 61 72 79  ded zlib library
ac00: 3f 0a 21 69 66 6e 64 65 66 20 46 4f 53 53 49 4c  ?.!ifndef FOSSIL
ac10: 5f 42 55 49 4c 44 5f 5a 4c 49 42 0a 46 4f 53 53  _BUILD_ZLIB.FOSS
ac20: 49 4c 5f 42 55 49 4c 44 5f 5a 4c 49 42 20 3d 20  IL_BUILD_ZLIB = 
ac30: 31 0a 21 65 6e 64 69 66 0a 0a 23 20 4c 69 6e 6b  1.!endif..# Link
ac40: 20 65 76 65 72 79 74 68 69 6e 67 20 65 78 63 65   everything exce
ac50: 70 74 20 53 51 4c 69 74 65 20 64 79 6e 61 6d 69  pt SQLite dynami
ac60: 63 61 6c 6c 79 3f 0a 21 69 66 6e 64 65 66 20 46  cally?.!ifndef F
ac70: 4f 53 53 49 4c 5f 44 59 4e 41 4d 49 43 5f 42 55  OSSIL_DYNAMIC_BU
ac80: 49 4c 44 0a 46 4f 53 53 49 4c 5f 44 59 4e 41 4d  ILD.FOSSIL_DYNAM
ac90: 49 43 5f 42 55 49 4c 44 20 3d 20 30 0a 21 65 6e  IC_BUILD = 0.!en
aca0: 64 69 66 0a 0a 23 20 45 6e 61 62 6c 65 20 72 65  dif..# Enable re
acb0: 6c 61 74 69 76 65 20 70 61 74 68 73 20 69 6e 20  lative paths in 
acc0: 65 78 74 65 72 6e 61 6c 20 64 69 66 66 2f 67 64  external diff/gd
acd0: 69 66 66 3f 0a 21 69 66 6e 64 65 66 20 46 4f 53  iff?.!ifndef FOS
ace0: 53 49 4c 5f 45 4e 41 42 4c 45 5f 45 58 45 43 5f  SIL_ENABLE_EXEC_
acf0: 52 45 4c 5f 50 41 54 48 53 0a 46 4f 53 53 49 4c  REL_PATHS.FOSSIL
ad00: 5f 45 4e 41 42 4c 45 5f 45 58 45 43 5f 52 45 4c  _ENABLE_EXEC_REL
ad10: 5f 50 41 54 48 53 20 3d 20 30 0a 21 65 6e 64 69  _PATHS = 0.!endi
ad20: 66 0a 0a 23 20 45 6e 61 62 6c 65 20 74 68 65 20  f..# Enable the 
ad30: 4a 53 4f 4e 20 41 50 49 3f 0a 21 69 66 6e 64 65  JSON API?.!ifnde
ad40: 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f  f FOSSIL_ENABLE_
ad50: 4a 53 4f 4e 0a 46 4f 53 53 49 4c 5f 45 4e 41 42  JSON.FOSSIL_ENAB
ad60: 4c 45 5f 4a 53 4f 4e 20 3d 20 30 0a 21 65 6e 64  LE_JSON = 0.!end
ad70: 69 66 0a 0a 23 20 45 6e 61 62 6c 65 20 75 73 65  if..# Enable use
ad80: 20 6f 66 20 6d 69 6e 69 7a 20 69 6e 73 74 65 61   of miniz instea
ad90: 64 20 6f 66 20 7a 6c 69 62 3f 0a 21 69 66 6e 64  d of zlib?.!ifnd
ada0: 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45  ef FOSSIL_ENABLE
adb0: 5f 4d 49 4e 49 5a 0a 46 4f 53 53 49 4c 5f 45 4e  _MINIZ.FOSSIL_EN
adc0: 41 42 4c 45 5f 4d 49 4e 49 5a 20 3d 20 30 0a 21  ABLE_MINIZ = 0.!
add0: 65 6e 64 69 66 0a 0a 23 20 45 6e 61 62 6c 65 20  endif..# Enable 
ade0: 4f 70 65 6e 53 53 4c 20 73 75 70 70 6f 72 74 3f  OpenSSL support?
adf0: 0a 21 69 66 6e 64 65 66 20 46 4f 53 53 49 4c 5f  .!ifndef FOSSIL_
ae00: 45 4e 41 42 4c 45 5f 53 53 4c 0a 46 4f 53 53 49  ENABLE_SSL.FOSSI
ae10: 4c 5f 45 4e 41 42 4c 45 5f 53 53 4c 20 3d 20 30  L_ENABLE_SSL = 0
ae20: 0a 21 65 6e 64 69 66 0a 0a 23 20 45 6e 61 62 6c  .!endif..# Enabl
ae30: 65 20 74 68 65 20 54 63 6c 20 69 6e 74 65 67 72  e the Tcl integr
ae40: 61 74 69 6f 6e 20 73 75 62 73 79 73 74 65 6d 3f  ation subsystem?
ae50: 0a 21 69 66 6e 64 65 66 20 46 4f 53 53 49 4c 5f  .!ifndef FOSSIL_
ae60: 45 4e 41 42 4c 45 5f 54 43 4c 0a 46 4f 53 53 49  ENABLE_TCL.FOSSI
ae70: 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 20 3d 20 30  L_ENABLE_TCL = 0
ae80: 0a 21 65 6e 64 69 66 0a 0a 23 20 45 6e 61 62 6c  .!endif..# Enabl
ae90: 65 20 54 48 31 20 73 63 72 69 70 74 73 20 69 6e  e TH1 scripts in
aea0: 20 65 6d 62 65 64 64 65 64 20 64 6f 63 75 6d 65   embedded docume
aeb0: 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 3f 0a 21  ntation files?.!
aec0: 69 66 6e 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e  ifndef FOSSIL_EN
aed0: 41 42 4c 45 5f 54 48 31 5f 44 4f 43 53 0a 46 4f  ABLE_TH1_DOCS.FO
aee0: 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 48 31 5f  SSIL_ENABLE_TH1_
aef0: 44 4f 43 53 20 3d 20 30 0a 21 65 6e 64 69 66 0a  DOCS = 0.!endif.
af00: 0a 23 20 45 6e 61 62 6c 65 20 54 48 31 20 68 6f  .# Enable TH1 ho
af10: 6f 6b 73 20 66 6f 72 20 63 6f 6d 6d 61 6e 64 73  oks for commands
af20: 20 61 6e 64 20 77 65 62 20 70 61 67 65 73 3f 0a   and web pages?.
af30: 21 69 66 6e 64 65 66 20 46 4f 53 53 49 4c 5f 45  !ifndef FOSSIL_E
af40: 4e 41 42 4c 45 5f 54 48 31 5f 48 4f 4f 4b 53 0a  NABLE_TH1_HOOKS.
af50: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 48  FOSSIL_ENABLE_TH
af60: 31 5f 48 4f 4f 4b 53 20 3d 20 30 0a 21 65 6e 64  1_HOOKS = 0.!end
af70: 69 66 0a 0a 23 20 45 6e 61 62 6c 65 20 73 75 70  if..# Enable sup
af80: 70 6f 72 74 20 66 6f 72 20 57 69 6e 64 6f 77 73  port for Windows
af90: 20 58 50 20 77 69 74 68 20 56 69 73 75 61 6c 20   XP with Visual 
afa0: 53 74 75 64 69 6f 20 32 30 31 78 3f 0a 21 69 66  Studio 201x?.!if
afb0: 6e 64 65 66 20 46 4f 53 53 49 4c 5f 45 4e 41 42  ndef FOSSIL_ENAB
afc0: 4c 45 5f 57 49 4e 58 50 0a 46 4f 53 53 49 4c 5f  LE_WINXP.FOSSIL_
afd0: 45 4e 41 42 4c 45 5f 57 49 4e 58 50 20 3d 20 30  ENABLE_WINXP = 0
afe0: 0a 21 65 6e 64 69 66 0a 0a 23 20 45 6e 61 62 6c  .!endif..# Enabl
aff0: 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 74 68  e support for th
b000: 65 20 53 51 4c 69 74 65 20 45 6e 63 72 79 70 74  e SQLite Encrypt
b010: 69 6f 6e 20 45 78 74 65 6e 73 69 6f 6e 3f 0a 21  ion Extension?.!
b020: 69 66 6e 64 65 66 20 55 53 45 5f 53 45 45 0a 55  ifndef USE_SEE.U
b030: 53 45 5f 53 45 45 20 3d 20 30 0a 21 65 6e 64 69  SE_SEE = 0.!endi
b040: 66 0a 0a 21 69 66 20 24 28 46 4f 53 53 49 4c 5f  f..!if $(FOSSIL_
b050: 45 4e 41 42 4c 45 5f 53 53 4c 29 21 3d 30 0a 53  ENABLE_SSL)!=0.S
b060: 53 4c 44 49 52 20 20 20 20 3d 20 24 28 42 29 5c  SLDIR    = $(B)\
b070: 63 6f 6d 70 61 74 5c 6f 70 65 6e 73 73 6c 0a 53  compat\openssl.S
b080: 53 4c 49 4e 43 44 49 52 20 3d 20 24 28 53 53 4c  SLINCDIR = $(SSL
b090: 44 49 52 29 5c 69 6e 63 6c 75 64 65 0a 21 69 66  DIR)\include.!if
b0a0: 20 24 28 46 4f 53 53 49 4c 5f 44 59 4e 41 4d 49   $(FOSSIL_DYNAMI
b0b0: 43 5f 42 55 49 4c 44 29 21 3d 30 0a 53 53 4c 4c  C_BUILD)!=0.SSLL
b0c0: 49 42 44 49 52 20 3d 20 24 28 53 53 4c 44 49 52  IBDIR = $(SSLDIR
b0d0: 29 0a 21 65 6c 73 65 0a 53 53 4c 4c 49 42 44 49  ).!else.SSLLIBDI
b0e0: 52 20 3d 20 24 28 53 53 4c 44 49 52 29 0a 21 65  R = $(SSLDIR).!e
b0f0: 6e 64 69 66 0a 53 53 4c 4c 46 4c 41 47 53 20 3d  ndif.SSLLFLAGS =
b100: 20 2f 6e 6f 6c 6f 67 6f 20 2f 6f 70 74 3a 72 65   /nologo /opt:re
b110: 66 20 2f 64 65 62 75 67 0a 53 53 4c 4c 49 42 20  f /debug.SSLLIB 
b120: 20 20 20 3d 20 6c 69 62 73 73 6c 2e 6c 69 62 20     = libssl.lib 
b130: 6c 69 62 63 72 79 70 74 6f 2e 6c 69 62 20 75 73  libcrypto.lib us
b140: 65 72 33 32 2e 6c 69 62 20 67 64 69 33 32 2e 6c  er32.lib gdi32.l
b150: 69 62 20 63 72 79 70 74 33 32 2e 6c 69 62 0a 21  ib crypt32.lib.!
b160: 69 66 20 22 24 28 50 4c 41 54 46 4f 52 4d 29 22  if "$(PLATFORM)"
b170: 3d 3d 22 61 6d 64 36 34 22 20 7c 7c 20 22 24 28  =="amd64" || "$(
b180: 50 4c 41 54 46 4f 52 4d 29 22 3d 3d 22 78 36 34  PLATFORM)"=="x64
b190: 22 0a 21 6d 65 73 73 61 67 65 20 55 73 69 6e 67  ".!message Using
b1a0: 20 27 78 36 34 27 20 70 6c 61 74 66 6f 72 6d 20   'x64' platform 
b1b0: 66 6f 72 20 4f 70 65 6e 53 53 4c 2e 2e 2e 0a 53  for OpenSSL....S
b1c0: 53 4c 43 4f 4e 46 49 47 20 3d 20 56 43 2d 57 49  SLCONFIG = VC-WI
b1d0: 4e 36 34 41 20 6e 6f 2d 61 73 6d 20 6e 6f 2d 73  N64A no-asm no-s
b1e0: 73 6c 33 20 6e 6f 2d 77 65 61 6b 2d 73 73 6c 2d  sl3 no-weak-ssl-
b1f0: 63 69 70 68 65 72 73 0a 21 69 66 20 24 28 46 4f  ciphers.!if $(FO
b200: 53 53 49 4c 5f 44 59 4e 41 4d 49 43 5f 42 55 49  SSIL_DYNAMIC_BUI
b210: 4c 44 29 21 3d 30 0a 53 53 4c 43 4f 4e 46 49 47  LD)!=0.SSLCONFIG
b220: 20 3d 20 24 28 53 53 4c 43 4f 4e 46 49 47 29 20   = $(SSLCONFIG) 
b230: 73 68 61 72 65 64 0a 21 65 6c 73 65 0a 53 53 4c  shared.!else.SSL
b240: 43 4f 4e 46 49 47 20 3d 20 24 28 53 53 4c 43 4f  CONFIG = $(SSLCO
b250: 4e 46 49 47 29 20 6e 6f 2d 73 68 61 72 65 64 0a  NFIG) no-shared.
b260: 21 65 6e 64 69 66 0a 21 65 6c 73 65 69 66 20 22  !endif.!elseif "
b270: 24 28 50 4c 41 54 46 4f 52 4d 29 22 3d 3d 22 69  $(PLATFORM)"=="i
b280: 61 36 34 22 0a 21 6d 65 73 73 61 67 65 20 55 73  a64".!message Us
b290: 69 6e 67 20 27 69 61 36 34 27 20 70 6c 61 74 66  ing 'ia64' platf
b2a0: 6f 72 6d 20 66 6f 72 20 4f 70 65 6e 53 53 4c 2e  orm for OpenSSL.
b2b0: 2e 2e 0a 53 53 4c 43 4f 4e 46 49 47 20 3d 20 56  ...SSLCONFIG = V
b2c0: 43 2d 57 49 4e 36 34 49 20 6e 6f 2d 61 73 6d 20  C-WIN64I no-asm 
b2d0: 6e 6f 2d 73 73 6c 33 20 6e 6f 2d 77 65 61 6b 2d  no-ssl3 no-weak-
b2e0: 73 73 6c 2d 63 69 70 68 65 72 73 0a 21 69 66 20  ssl-ciphers.!if 
b2f0: 24 28 46 4f 53 53 49 4c 5f 44 59 4e 41 4d 49 43  $(FOSSIL_DYNAMIC
b300: 5f 42 55 49 4c 44 29 21 3d 30 0a 53 53 4c 43 4f  _BUILD)!=0.SSLCO
b310: 4e 46 49 47 20 3d 20 24 28 53 53 4c 43 4f 4e 46  NFIG = $(SSLCONF
b320: 49 47 29 20 73 68 61 72 65 64 0a 21 65 6c 73 65  IG) shared.!else
b330: 0a 53 53 4c 43 4f 4e 46 49 47 20 3d 20 24 28 53  .SSLCONFIG = $(S
b340: 53 4c 43 4f 4e 46 49 47 29 20 6e 6f 2d 73 68 61  SLCONFIG) no-sha
b350: 72 65 64 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65  red.!endif.!else
b360: 0a 21 6d 65 73 73 61 67 65 20 41 73 73 75 6d 69  .!message Assumi
b370: 6e 67 20 27 78 38 36 27 20 70 6c 61 74 66 6f 72  ng 'x86' platfor
b380: 6d 20 66 6f 72 20 4f 70 65 6e 53 53 4c 2e 2e 2e  m for OpenSSL...
b390: 0a 53 53 4c 43 4f 4e 46 49 47 20 3d 20 56 43 2d  .SSLCONFIG = VC-
b3a0: 57 49 4e 33 32 20 6e 6f 2d 61 73 6d 20 6e 6f 2d  WIN32 no-asm no-
b3b0: 73 73 6c 33 20 6e 6f 2d 77 65 61 6b 2d 73 73 6c  ssl3 no-weak-ssl
b3c0: 2d 63 69 70 68 65 72 73 0a 21 69 66 20 24 28 46  -ciphers.!if $(F
b3d0: 4f 53 53 49 4c 5f 44 59 4e 41 4d 49 43 5f 42 55  OSSIL_DYNAMIC_BU
b3e0: 49 4c 44 29 21 3d 30 0a 53 53 4c 43 4f 4e 46 49  ILD)!=0.SSLCONFI
b3f0: 47 20 3d 20 24 28 53 53 4c 43 4f 4e 46 49 47 29  G = $(SSLCONFIG)
b400: 20 73 68 61 72 65 64 0a 21 65 6c 73 65 0a 53 53   shared.!else.SS
b410: 4c 43 4f 4e 46 49 47 20 3d 20 24 28 53 53 4c 43  LCONFIG = $(SSLC
b420: 4f 4e 46 49 47 29 20 6e 6f 2d 73 68 61 72 65 64  ONFIG) no-shared
b430: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21  .!endif.!endif.!
b440: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 46 4f 53  endif..!if $(FOS
b450: 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 29 21  SIL_ENABLE_TCL)!
b460: 3d 30 0a 54 43 4c 44 49 52 20 20 20 20 3d 20 24  =0.TCLDIR    = $
b470: 28 42 29 5c 63 6f 6d 70 61 74 5c 74 63 6c 2d 38  (B)\compat\tcl-8
b480: 2e 36 0a 54 43 4c 53 52 43 44 49 52 20 3d 20 24  .6.TCLSRCDIR = $
b490: 28 54 43 4c 44 49 52 29 0a 54 43 4c 49 4e 43 44  (TCLDIR).TCLINCD
b4a0: 49 52 20 3d 20 24 28 54 43 4c 53 52 43 44 49 52  IR = $(TCLSRCDIR
b4b0: 29 5c 67 65 6e 65 72 69 63 0a 21 65 6e 64 69 66  )\generic.!endif
b4c0: 0a 0a 23 20 7a 6c 69 62 20 6f 70 74 69 6f 6e 73  ..# zlib options
b4d0: 0a 5a 49 4e 43 44 49 52 20 20 20 3d 20 24 28 42  .ZINCDIR   = $(B
b4e0: 29 5c 63 6f 6d 70 61 74 5c 7a 6c 69 62 0a 5a 4c  )\compat\zlib.ZL
b4f0: 49 42 44 49 52 20 20 20 3d 20 24 28 42 29 5c 63  IBDIR   = $(B)\c
b500: 6f 6d 70 61 74 5c 7a 6c 69 62 0a 0a 21 69 66 20  ompat\zlib..!if 
b510: 24 28 46 4f 53 53 49 4c 5f 44 59 4e 41 4d 49 43  $(FOSSIL_DYNAMIC
b520: 5f 42 55 49 4c 44 29 21 3d 30 0a 5a 4c 49 42 20  _BUILD)!=0.ZLIB 
b530: 20 20 20 20 20 3d 20 7a 64 6c 6c 2e 6c 69 62 0a       = zdll.lib.
b540: 21 65 6c 73 65 0a 5a 4c 49 42 20 20 20 20 20 20  !else.ZLIB      
b550: 3d 20 7a 6c 69 62 2e 6c 69 62 0a 21 65 6e 64 69  = zlib.lib.!endi
b560: 66 0a 0a 49 4e 43 4c 20 20 20 20 20 20 3d 20 2f  f..INCL      = /
b570: 49 2e 20 2f 49 22 24 28 4f 58 29 22 20 2f 49 22  I. /I"$(OX)" /I"
b580: 24 28 53 52 43 44 49 52 29 22 20 2f 49 22 24 28  $(SRCDIR)" /I"$(
b590: 42 29 5c 77 69 6e 5c 69 6e 63 6c 75 64 65 22 0a  B)\win\include".
b5a0: 0a 21 69 66 20 24 28 46 4f 53 53 49 4c 5f 45 4e  .!if $(FOSSIL_EN
b5b0: 41 42 4c 45 5f 4d 49 4e 49 5a 29 3d 3d 30 0a 49  ABLE_MINIZ)==0.I
b5c0: 4e 43 4c 20 20 20 20 20 20 3d 20 24 28 49 4e 43  NCL      = $(INC
b5d0: 4c 29 20 2f 49 22 24 28 5a 49 4e 43 44 49 52 29  L) /I"$(ZINCDIR)
b5e0: 22 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28  ".!endif..!if $(
b5f0: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 53 53  FOSSIL_ENABLE_SS
b600: 4c 29 21 3d 30 0a 49 4e 43 4c 20 20 20 20 20 20  L)!=0.INCL      
b610: 3d 20 24 28 49 4e 43 4c 29 20 2f 49 22 24 28 53  = $(INCL) /I"$(S
b620: 53 4c 49 4e 43 44 49 52 29 22 0a 21 65 6e 64 69  SLINCDIR)".!endi
b630: 66 0a 0a 21 69 66 20 24 28 46 4f 53 53 49 4c 5f  f..!if $(FOSSIL_
b640: 45 4e 41 42 4c 45 5f 54 43 4c 29 21 3d 30 0a 49  ENABLE_TCL)!=0.I
b650: 4e 43 4c 20 20 20 20 20 20 3d 20 24 28 49 4e 43  NCL      = $(INC
b660: 4c 29 20 2f 49 22 24 28 54 43 4c 49 4e 43 44 49  L) /I"$(TCLINCDI
b670: 52 29 22 0a 21 65 6e 64 69 66 0a 0a 43 46 4c 41  R)".!endif..CFLA
b680: 47 53 20 20 20 20 3d 20 2f 6e 6f 6c 6f 67 6f 0a  GS    = /nologo.
b690: 4c 44 46 4c 41 47 53 20 20 20 3d 0a 0a 43 46 4c  LDFLAGS   =..CFL
b6a0: 41 47 53 20 20 20 20 3d 20 24 28 43 46 4c 41 47  AGS    = $(CFLAG
b6b0: 53 29 20 2f 44 5f 43 52 54 5f 53 45 43 55 52 45  S) /D_CRT_SECURE
b6c0: 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 20 2f 44  _NO_DEPRECATE /D
b6d0: 5f 43 52 54 5f 53 45 43 55 52 45 5f 4e 4f 5f 57  _CRT_SECURE_NO_W
b6e0: 41 52 4e 49 4e 47 53 0a 43 46 4c 41 47 53 20 20  ARNINGS.CFLAGS  
b6f0: 20 20 3d 20 24 28 43 46 4c 41 47 53 29 20 2f 44    = $(CFLAGS) /D
b700: 5f 43 52 54 5f 4e 4f 4e 53 54 44 43 5f 4e 4f 5f  _CRT_NONSTDC_NO_
b710: 44 45 50 52 45 43 41 54 45 20 2f 44 5f 43 52 54  DEPRECATE /D_CRT
b720: 5f 4e 4f 4e 53 54 44 43 5f 4e 4f 5f 57 41 52 4e  _NONSTDC_NO_WARN
b730: 49 4e 47 53 0a 0a 21 69 66 20 24 28 46 4f 53 53  INGS..!if $(FOSS
b740: 49 4c 5f 44 59 4e 41 4d 49 43 5f 42 55 49 4c 44  IL_DYNAMIC_BUILD
b750: 29 21 3d 30 0a 4c 44 46 4c 41 47 53 20 20 20 3d  )!=0.LDFLAGS   =
b760: 20 24 28 4c 44 46 4c 41 47 53 29 20 2f 4d 41 4e   $(LDFLAGS) /MAN
b770: 49 46 45 53 54 0a 21 65 6c 73 65 0a 4c 44 46 4c  IFEST.!else.LDFL
b780: 41 47 53 20 20 20 3d 20 24 28 4c 44 46 4c 41 47  AGS   = $(LDFLAG
b790: 53 29 20 2f 4e 4f 44 45 46 41 55 4c 54 4c 49 42  S) /NODEFAULTLIB
b7a0: 3a 6d 73 76 63 72 74 20 2f 4d 41 4e 49 46 45 53  :msvcrt /MANIFES
b7b0: 54 3a 4e 4f 0a 21 65 6e 64 69 66 0a 0a 21 69 66  T:NO.!endif..!if
b7c0: 20 24 28 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45   $(FOSSIL_ENABLE
b7d0: 5f 57 49 4e 58 50 29 21 3d 30 0a 58 50 43 46 4c  _WINXP)!=0.XPCFL
b7e0: 41 47 53 20 20 3d 20 24 28 58 50 43 46 4c 41 47  AGS  = $(XPCFLAG
b7f0: 53 29 20 2f 44 5f 57 49 4e 33 32 5f 57 49 4e 4e  S) /D_WIN32_WINN
b800: 54 3d 30 78 30 35 30 31 20 2f 44 5f 55 53 49 4e  T=0x0501 /D_USIN
b810: 47 5f 56 31 31 30 5f 53 44 4b 37 31 5f 3d 31 0a  G_V110_SDK71_=1.
b820: 43 46 4c 41 47 53 20 20 20 20 3d 20 24 28 43 46  CFLAGS    = $(CF
b830: 4c 41 47 53 29 20 24 28 58 50 43 46 4c 41 47 53  LAGS) $(XPCFLAGS
b840: 29 0a 21 69 66 20 22 24 28 50 4c 41 54 46 4f 52  ).!if "$(PLATFOR
b850: 4d 29 22 3d 3d 22 61 6d 64 36 34 22 20 7c 7c 20  M)"=="amd64" || 
b860: 22 24 28 50 4c 41 54 46 4f 52 4d 29 22 3d 3d 22  "$(PLATFORM)"=="
b870: 78 36 34 22 0a 58 50 4c 44 46 4c 41 47 53 20 3d  x64".XPLDFLAGS =
b880: 20 24 28 58 50 4c 44 46 4c 41 47 53 29 20 2f 53   $(XPLDFLAGS) /S
b890: 55 42 53 59 53 54 45 4d 3a 43 4f 4e 53 4f 4c 45  UBSYSTEM:CONSOLE
b8a0: 2c 35 2e 30 32 0a 21 65 6c 73 65 0a 58 50 4c 44  ,5.02.!else.XPLD
b8b0: 46 4c 41 47 53 20 3d 20 24 28 58 50 4c 44 46 4c  FLAGS = $(XPLDFL
b8c0: 41 47 53 29 20 2f 53 55 42 53 59 53 54 45 4d 3a  AGS) /SUBSYSTEM:
b8d0: 43 4f 4e 53 4f 4c 45 2c 35 2e 30 31 0a 21 65 6e  CONSOLE,5.01.!en
b8e0: 64 69 66 0a 4c 44 46 4c 41 47 53 20 20 20 3d 20  dif.LDFLAGS   = 
b8f0: 24 28 4c 44 46 4c 41 47 53 29 20 24 28 58 50 4c  $(LDFLAGS) $(XPL
b900: 44 46 4c 41 47 53 29 0a 21 65 6e 64 69 66 0a 0a  DFLAGS).!endif..
b910: 21 69 66 20 24 28 46 4f 53 53 49 4c 5f 44 59 4e  !if $(FOSSIL_DYN
b920: 41 4d 49 43 5f 42 55 49 4c 44 29 21 3d 30 0a 21  AMIC_BUILD)!=0.!
b930: 69 66 20 24 28 44 45 42 55 47 29 21 3d 30 0a 43  if $(DEBUG)!=0.C
b940: 52 54 46 4c 41 47 53 20 3d 20 2f 4d 44 64 0a 21  RTFLAGS = /MDd.!
b950: 65 6c 73 65 0a 43 52 54 46 4c 41 47 53 20 3d 20  else.CRTFLAGS = 
b960: 2f 4d 44 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65  /MD.!endif.!else
b970: 0a 21 69 66 20 24 28 44 45 42 55 47 29 21 3d 30  .!if $(DEBUG)!=0
b980: 0a 43 52 54 46 4c 41 47 53 20 3d 20 2f 4d 54 64  .CRTFLAGS = /MTd
b990: 0a 21 65 6c 73 65 0a 43 52 54 46 4c 41 47 53 20  .!else.CRTFLAGS 
b9a0: 3d 20 2f 4d 54 0a 21 65 6e 64 69 66 0a 21 65 6e  = /MT.!endif.!en
b9b0: 64 69 66 0a 0a 21 69 66 20 24 28 4f 50 54 49 4d  dif..!if $(OPTIM
b9c0: 49 5a 41 54 49 4f 4e 53 29 3e 33 0a 52 45 4c 4f  IZATIONS)>3.RELO
b9d0: 50 54 53 20 3d 20 2f 4f 73 0a 21 65 6c 73 65 69  PTS = /Os.!elsei
b9e0: 66 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e  f $(OPTIMIZATION
b9f0: 53 29 3e 32 0a 52 45 4c 4f 50 54 53 20 3d 20 2f  S)>2.RELOPTS = /
ba00: 4f 78 0a 21 65 6c 73 65 69 66 20 24 28 4f 50 54  Ox.!elseif $(OPT
ba10: 49 4d 49 5a 41 54 49 4f 4e 53 29 3e 31 0a 52 45  IMIZATIONS)>1.RE
ba20: 4c 4f 50 54 53 20 3d 20 2f 4f 32 0a 21 65 6c 73  LOPTS = /O2.!els
ba30: 65 69 66 20 24 28 4f 50 54 49 4d 49 5a 41 54 49  eif $(OPTIMIZATI
ba40: 4f 4e 53 29 3e 30 0a 52 45 4c 4f 50 54 53 20 3d  ONS)>0.RELOPTS =
ba50: 20 2f 4f 31 0a 21 65 6c 73 65 0a 52 45 4c 4f 50   /O1.!else.RELOP
ba60: 54 53 20 3d 0a 21 65 6e 64 69 66 0a 0a 21 69 66  TS =.!endif..!if
ba70: 20 24 28 44 45 42 55 47 29 21 3d 30 0a 43 46 4c   $(DEBUG)!=0.CFL
ba80: 41 47 53 20 20 20 20 3d 20 24 28 43 46 4c 41 47  AGS    = $(CFLAG
ba90: 53 29 20 2f 5a 69 20 24 28 43 52 54 46 4c 41 47  S) /Zi $(CRTFLAG
baa0: 53 29 20 24 28 44 42 47 4f 50 54 53 29 20 2f 44  S) $(DBGOPTS) /D
bab0: 46 4f 53 53 49 4c 5f 44 45 42 55 47 20 2f 44 54  FOSSIL_DEBUG /DT
bac0: 48 5f 4d 45 4d 44 45 42 55 47 0a 4c 44 46 4c 41  H_MEMDEBUG.LDFLA
bad0: 47 53 20 20 20 3d 20 24 28 4c 44 46 4c 41 47 53  GS   = $(LDFLAGS
bae0: 29 20 2f 44 45 42 55 47 0a 21 65 6c 73 65 0a 43  ) /DEBUG.!else.C
baf0: 46 4c 41 47 53 20 20 20 20 3d 20 24 28 43 46 4c  FLAGS    = $(CFL
bb00: 41 47 53 29 20 24 28 43 52 54 46 4c 41 47 53 29  AGS) $(CRTFLAGS)
bb10: 20 24 28 52 45 4c 4f 50 54 53 29 0a 21 65 6e 64   $(RELOPTS).!end
bb20: 69 66 0a 0a 42 43 43 20 20 20 20 20 20 20 3d 20  if..BCC       = 
bb30: 24 28 43 43 29 20 24 28 43 46 4c 41 47 53 29 0a  $(CC) $(CFLAGS).
bb40: 54 43 43 20 20 20 20 20 20 20 3d 20 24 28 43 43  TCC       = $(CC
bb50: 29 20 2f 63 20 24 28 43 46 4c 41 47 53 29 20 24  ) /c $(CFLAGS) $
bb60: 28 4d 53 43 44 45 46 29 20 24 28 49 4e 43 4c 29  (MSCDEF) $(INCL)
bb70: 0a 52 43 43 20 20 20 20 20 20 20 3d 20 24 28 52  .RCC       = $(R
bb80: 43 29 20 2f 44 5f 57 49 4e 33 32 20 2f 44 5f 4d  C) /D_WIN32 /D_M
bb90: 53 43 5f 56 45 52 20 24 28 4d 53 43 44 45 46 29  SC_VER $(MSCDEF)
bba0: 20 24 28 49 4e 43 4c 29 0a 4d 54 43 20 20 20 20   $(INCL).MTC    
bbb0: 20 20 20 3d 20 6d 74 0a 4c 49 42 53 20 20 20 20     = mt.LIBS    
bbc0: 20 20 3d 20 77 73 32 5f 33 32 2e 6c 69 62 20 61    = ws2_32.lib a
bbd0: 64 76 61 70 69 33 32 2e 6c 69 62 20 64 6e 73 61  dvapi32.lib dnsa
bbe0: 70 69 2e 6c 69 62 0a 4c 49 42 44 49 52 20 20 20  pi.lib.LIBDIR   
bbf0: 20 3d 0a 0a 21 69 66 20 24 28 46 4f 53 53 49 4c   =..!if $(FOSSIL
bc00: 5f 44 59 4e 41 4d 49 43 5f 42 55 49 4c 44 29 21  _DYNAMIC_BUILD)!
bc10: 3d 30 0a 54 43 43 20 20 20 20 20 20 20 3d 20 24  =0.TCC       = $
bc20: 28 54 43 43 29 20 2f 44 46 4f 53 53 49 4c 5f 44  (TCC) /DFOSSIL_D
bc30: 59 4e 41 4d 49 43 5f 42 55 49 4c 44 3d 31 0a 52  YNAMIC_BUILD=1.R
bc40: 43 43 20 20 20 20 20 20 20 3d 20 24 28 52 43 43  CC       = $(RCC
bc50: 29 20 2f 44 46 4f 53 53 49 4c 5f 44 59 4e 41 4d  ) /DFOSSIL_DYNAM
bc60: 49 43 5f 42 55 49 4c 44 3d 31 0a 21 65 6e 64 69  IC_BUILD=1.!endi
bc70: 66 0a 0a 21 69 66 20 24 28 46 4f 53 53 49 4c 5f  f..!if $(FOSSIL_
bc80: 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a 29 3d 3d 30  ENABLE_MINIZ)==0
bc90: 0a 4c 49 42 53 20 20 20 20 20 20 3d 20 24 28 4c  .LIBS      = $(L
bca0: 49 42 53 29 20 24 28 5a 4c 49 42 29 0a 4c 49 42  IBS) $(ZLIB).LIB
bcb0: 44 49 52 20 20 20 20 3d 20 24 28 4c 49 42 44 49  DIR    = $(LIBDI
bcc0: 52 29 20 2f 4c 49 42 50 41 54 48 3a 22 24 28 5a  R) /LIBPATH:"$(Z
bcd0: 4c 49 42 44 49 52 29 22 0a 21 65 6e 64 69 66 0a  LIBDIR)".!endif.
bce0: 0a 21 69 66 20 24 28 46 4f 53 53 49 4c 5f 45 4e  .!if $(FOSSIL_EN
bcf0: 41 42 4c 45 5f 4d 49 4e 49 5a 29 21 3d 30 0a 54  ABLE_MINIZ)!=0.T
bd00: 43 43 20 20 20 20 20 20 20 3d 20 24 28 54 43 43  CC       = $(TCC
bd10: 29 20 2f 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  ) /DFOSSIL_ENABL
bd20: 45 5f 4d 49 4e 49 5a 3d 31 0a 52 43 43 20 20 20  E_MINIZ=1.RCC   
bd30: 20 20 20 20 3d 20 24 28 52 43 43 29 20 2f 44 46      = $(RCC) /DF
bd40: 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49 4e  OSSIL_ENABLE_MIN
bd50: 49 5a 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66  IZ=1.!endif..!if
bd60: 20 24 28 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45   $(FOSSIL_ENABLE
bd70: 5f 4a 53 4f 4e 29 21 3d 30 0a 54 43 43 20 20 20  _JSON)!=0.TCC   
bd80: 20 20 20 20 3d 20 24 28 54 43 43 29 20 2f 44 46      = $(TCC) /DF
bd90: 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4a 53 4f  OSSIL_ENABLE_JSO
bda0: 4e 3d 31 0a 52 43 43 20 20 20 20 20 20 20 3d 20  N=1.RCC       = 
bdb0: 24 28 52 43 43 29 20 2f 44 46 4f 53 53 49 4c 5f  $(RCC) /DFOSSIL_
bdc0: 45 4e 41 42 4c 45 5f 4a 53 4f 4e 3d 31 0a 21 65  ENABLE_JSON=1.!e
bdd0: 6e 64 69 66 0a 0a 21 69 66 20 24 28 46 4f 53 53  ndif..!if $(FOSS
bde0: 49 4c 5f 45 4e 41 42 4c 45 5f 53 53 4c 29 21 3d  IL_ENABLE_SSL)!=
bdf0: 30 0a 54 43 43 20 20 20 20 20 20 20 3d 20 24 28  0.TCC       = $(
be00: 54 43 43 29 20 2f 44 46 4f 53 53 49 4c 5f 45 4e  TCC) /DFOSSIL_EN
be10: 41 42 4c 45 5f 53 53 4c 3d 31 0a 52 43 43 20 20  ABLE_SSL=1.RCC  
be20: 20 20 20 20 20 3d 20 24 28 52 43 43 29 20 2f 44       = $(RCC) /D
be30: 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 53 53  FOSSIL_ENABLE_SS
be40: 4c 3d 31 0a 4c 49 42 53 20 20 20 20 20 20 3d 20  L=1.LIBS      = 
be50: 24 28 4c 49 42 53 29 20 24 28 53 53 4c 4c 49 42  $(LIBS) $(SSLLIB
be60: 29 0a 4c 49 42 44 49 52 20 20 20 20 3d 20 24 28  ).LIBDIR    = $(
be70: 4c 49 42 44 49 52 29 20 2f 4c 49 42 50 41 54 48  LIBDIR) /LIBPATH
be80: 3a 22 24 28 53 53 4c 4c 49 42 44 49 52 29 22 0a  :"$(SSLLIBDIR)".
be90: 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 46 4f  !endif..!if $(FO
bea0: 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 45 58 45 43  SSIL_ENABLE_EXEC
beb0: 5f 52 45 4c 5f 50 41 54 48 53 29 21 3d 30 0a 54  _REL_PATHS)!=0.T
bec0: 43 43 20 20 20 20 20 20 20 3d 20 24 28 54 43 43  CC       = $(TCC
bed0: 29 20 2f 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  ) /DFOSSIL_ENABL
bee0: 45 5f 45 58 45 43 5f 52 45 4c 5f 50 41 54 48 53  E_EXEC_REL_PATHS
bef0: 3d 31 0a 52 43 43 20 20 20 20 20 20 20 3d 20 24  =1.RCC       = $
bf00: 28 52 43 43 29 20 2f 44 46 4f 53 53 49 4c 5f 45  (RCC) /DFOSSIL_E
bf10: 4e 41 42 4c 45 5f 45 58 45 43 5f 52 45 4c 5f 50  NABLE_EXEC_REL_P
bf20: 41 54 48 53 3d 31 0a 21 65 6e 64 69 66 0a 0a 21  ATHS=1.!endif..!
bf30: 69 66 20 24 28 46 4f 53 53 49 4c 5f 45 4e 41 42  if $(FOSSIL_ENAB
bf40: 4c 45 5f 54 48 31 5f 44 4f 43 53 29 21 3d 30 0a  LE_TH1_DOCS)!=0.
bf50: 54 43 43 20 20 20 20 20 20 20 3d 20 24 28 54 43  TCC       = $(TC
bf60: 43 29 20 2f 44 46 4f 53 53 49 4c 5f 45 4e 41 42  C) /DFOSSIL_ENAB
bf70: 4c 45 5f 54 48 31 5f 44 4f 43 53 3d 31 0a 52 43  LE_TH1_DOCS=1.RC
bf80: 43 20 20 20 20 20 20 20 3d 20 24 28 52 43 43 29  C       = $(RCC)
bf90: 20 2f 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45   /DFOSSIL_ENABLE
bfa0: 5f 54 48 31 5f 44 4f 43 53 3d 31 0a 21 65 6e 64  _TH1_DOCS=1.!end
bfb0: 69 66 0a 0a 21 69 66 20 24 28 46 4f 53 53 49 4c  if..!if $(FOSSIL
bfc0: 5f 45 4e 41 42 4c 45 5f 54 48 31 5f 48 4f 4f 4b  _ENABLE_TH1_HOOK
bfd0: 53 29 21 3d 30 0a 54 43 43 20 20 20 20 20 20 20  S)!=0.TCC       
bfe0: 3d 20 24 28 54 43 43 29 20 2f 44 46 4f 53 53 49  = $(TCC) /DFOSSI
bff0: 4c 5f 45 4e 41 42 4c 45 5f 54 48 31 5f 48 4f 4f  L_ENABLE_TH1_HOO
c000: 4b 53 3d 31 0a 52 43 43 20 20 20 20 20 20 20 3d  KS=1.RCC       =
c010: 20 24 28 52 43 43 29 20 2f 44 46 4f 53 53 49 4c   $(RCC) /DFOSSIL
c020: 5f 45 4e 41 42 4c 45 5f 54 48 31 5f 48 4f 4f 4b  _ENABLE_TH1_HOOK
c030: 53 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20  S=1.!endif..!if 
c040: 24 28 46 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f  $(FOSSIL_ENABLE_
c050: 54 43 4c 29 21 3d 30 0a 54 43 43 20 20 20 20 20  TCL)!=0.TCC     
c060: 20 20 3d 20 24 28 54 43 43 29 20 2f 44 46 4f 53    = $(TCC) /DFOS
c070: 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 3d 31  SIL_ENABLE_TCL=1
c080: 0a 52 43 43 20 20 20 20 20 20 20 3d 20 24 28 52  .RCC       = $(R
c090: 43 43 29 20 2f 44 46 4f 53 53 49 4c 5f 45 4e 41  CC) /DFOSSIL_ENA
c0a0: 42 4c 45 5f 54 43 4c 3d 31 0a 54 43 43 20 20 20  BLE_TCL=1.TCC   
c0b0: 20 20 20 20 3d 20 24 28 54 43 43 29 20 2f 44 46      = $(TCC) /DF
c0c0: 4f 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c  OSSIL_ENABLE_TCL
c0d0: 5f 53 54 55 42 53 3d 31 0a 52 43 43 20 20 20 20  _STUBS=1.RCC    
c0e0: 20 20 20 3d 20 24 28 52 43 43 29 20 2f 44 46 4f     = $(RCC) /DFO
c0f0: 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 5f  SSIL_ENABLE_TCL_
c100: 53 54 55 42 53 3d 31 0a 54 43 43 20 20 20 20 20  STUBS=1.TCC     
c110: 20 20 3d 20 24 28 54 43 43 29 20 2f 44 46 4f 53    = $(TCC) /DFOS
c120: 53 49 4c 5f 45 4e 41 42 4c 45 5f 54 43 4c 5f 50  SIL_ENABLE_TCL_P
c130: 52 49 56 41 54 45 5f 53 54 55 42 53 3d 31 0a 52  RIVATE_STUBS=1.R
c140: 43 43 20 20 20 20 20 20 20 3d 20 24 28 52 43 43  CC       = $(RCC
c150: 29 20 2f 44 46 4f 53 53 49 4c 5f 45 4e 41 42 4c  ) /DFOSSIL_ENABL
c160: 45 5f 54 43 4c 5f 50 52 49 56 41 54 45 5f 53 54  E_TCL_PRIVATE_ST
c170: 55 42 53 3d 31 0a 54 43 43 20 20 20 20 20 20 20  UBS=1.TCC       
c180: 3d 20 24 28 54 43 43 29 20 2f 44 55 53 45 5f 54  = $(TCC) /DUSE_T
c190: 43 4c 5f 53 54 55 42 53 3d 31 0a 52 43 43 20 20  CL_STUBS=1.RCC  
c1a0: 20 20 20 20 20 3d 20 24 28 52 43 43 29 20 2f 44       = $(RCC) /D
c1b0: 55 53 45 5f 54 43 4c 5f 53 54 55 42 53 3d 31 0a  USE_TCL_STUBS=1.
c1c0: 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 55 53  !endif..!if $(US
c1d0: 45 5f 53 45 45 29 21 3d 30 0a 54 43 43 20 20 20  E_SEE)!=0.TCC   
c1e0: 20 20 20 20 3d 20 24 28 54 43 43 29 20 2f 44 55      = $(TCC) /DU
c1f0: 53 45 5f 53 45 45 3d 31 0a 52 43 43 20 20 20 20  SE_SEE=1.RCC    
c200: 20 20 20 3d 20 24 28 52 43 43 29 20 2f 44 55 53     = $(RCC) /DUS
c210: 45 5f 53 45 45 3d 31 0a 21 65 6e 64 69 66 0a 7d  E_SEE=1.!endif.}
c220: 0a 72 65 67 73 75 62 20 2d 61 6c 6c 20 7b 5b 2d  .regsub -all {[-
c230: 5d 44 7d 20 5b 6a 6f 69 6e 20 24 53 51 4c 49 54  ]D} [join $SQLIT
c240: 45 5f 57 49 4e 33 32 5f 4f 50 54 49 4f 4e 53 20  E_WIN32_OPTIONS 
c250: 7b 20 7d 5d 20 7b 2f 44 7d 20 4d 53 43 5f 53 51  { }] {/D} MSC_SQ
c260: 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 0a 73 65 74  LITE_OPTIONS.set
c270: 20 6a 20 22 20 5c 5c 5c 6e 20 20 20 20 20 20 20   j " \\\n       
c280: 20 20 20 20 20 20 20 20 20 20 22 0a 77 72 69 74            ".writ
c290: 65 6c 6e 20 22 53 51 4c 49 54 45 5f 4f 50 54 49  eln "SQLITE_OPTI
c2a0: 4f 4e 53 20 3d 20 5b 6a 6f 69 6e 20 24 4d 53 43  ONS = [join $MSC
c2b0: 5f 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 20  _SQLITE_OPTIONS 
c2c0: 24 6a 5d 5c 6e 22 0a 0a 72 65 67 73 75 62 20 2d  $j]\n"..regsub -
c2d0: 61 6c 6c 20 7b 5b 2d 5d 44 7d 20 5b 6a 6f 69 6e  all {[-]D} [join
c2e0: 20 24 53 48 45 4c 4c 5f 57 49 4e 33 32 5f 4f 50   $SHELL_WIN32_OP
c2f0: 54 49 4f 4e 53 20 7b 20 7d 5d 20 7b 2f 44 7d 20  TIONS { }] {/D} 
c300: 4d 53 43 5f 53 48 45 4c 4c 5f 4f 50 54 49 4f 4e  MSC_SHELL_OPTION
c310: 53 0a 73 65 74 20 6a 20 22 20 5c 5c 5c 6e 20 20  S.set j " \\\n  
c320: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 0a                ".
c330: 77 72 69 74 65 6c 6e 20 22 53 48 45 4c 4c 5f 4f  writeln "SHELL_O
c340: 50 54 49 4f 4e 53 20 3d 20 5b 6a 6f 69 6e 20 24  PTIONS = [join $
c350: 4d 53 43 5f 53 48 45 4c 4c 5f 4f 50 54 49 4f 4e  MSC_SHELL_OPTION
c360: 53 20 24 6a 5d 5c 6e 22 0a 0a 72 65 67 73 75 62  S $j]\n"..regsub
c370: 20 2d 61 6c 6c 20 7b 5b 2d 5d 44 7d 20 5b 6a 6f   -all {[-]D} [jo
c380: 69 6e 20 24 4d 49 4e 49 5a 5f 57 49 4e 33 32 5f  in $MINIZ_WIN32_
c390: 4f 50 54 49 4f 4e 53 20 7b 20 7d 5d 20 7b 2f 44  OPTIONS { }] {/D
c3a0: 7d 20 4d 53 43 5f 4d 49 4e 49 5a 5f 4f 50 54 49  } MSC_MINIZ_OPTI
c3b0: 4f 4e 53 0a 73 65 74 20 6a 20 22 20 5c 5c 5c 6e  ONS.set j " \\\n
c3c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
c3d0: 22 0a 77 72 69 74 65 6c 6e 20 22 4d 49 4e 49 5a  ".writeln "MINIZ
c3e0: 5f 4f 50 54 49 4f 4e 53 20 3d 20 5b 6a 6f 69 6e  _OPTIONS = [join
c3f0: 20 24 4d 53 43 5f 4d 49 4e 49 5a 5f 4f 50 54 49   $MSC_MINIZ_OPTI
c400: 4f 4e 53 20 24 6a 5d 5c 6e 22 0a 0a 77 72 69 74  ONS $j]\n"..writ
c410: 65 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  eln -nonewline "
c420: 53 52 43 20 20 20 3d 20 22 0a 73 65 74 20 69 20  SRC   = ".set i 
c430: 30 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f  0.foreach s [lso
c440: 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 69 66 20  rt $src] {.  if 
c450: 7b 24 69 20 3e 20 30 7d 20 7b 0a 20 20 20 20 77  {$i > 0} {.    w
c460: 72 69 74 65 6c 6e 20 22 20 5c 5c 22 0a 20 20 20  riteln " \\".   
c470: 20 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e 65 77 6c   writeln -nonewl
c480: 69 6e 65 20 22 20 20 20 20 20 20 20 20 22 0a 20  ine "        ". 
c490: 20 7d 0a 20 20 77 72 69 74 65 6c 6e 20 2d 6e 6f   }.  writeln -no
c4a0: 6e 65 77 6c 69 6e 65 20 22 5c 22 5c 24 28 4f 58  newline "\"\$(OX
c4b0: 29 5c 5c 24 7b 73 7d 5f 2e 63 5c 22 22 3b 20 69  )\\${s}_.c\""; i
c4c0: 6e 63 72 20 69 0a 7d 0a 77 72 69 74 65 6c 6e 20  ncr i.}.writeln 
c4d0: 22 5c 6e 22 0a 77 72 69 74 65 6c 6e 20 2d 6e 6f  "\n".writeln -no
c4e0: 6e 65 77 6c 69 6e 65 20 22 45 58 54 52 41 5f 46  newline "EXTRA_F
c4f0: 49 4c 45 53 20 20 20 3d 20 22 0a 73 65 74 20 69  ILES   = ".set i
c500: 20 30 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73   0.foreach s [ls
c510: 6f 72 74 20 24 65 78 74 72 61 5f 66 69 6c 65 73  ort $extra_files
c520: 5d 20 7b 0a 20 20 69 66 20 7b 24 69 20 3e 20 30  ] {.  if {$i > 0
c530: 7d 20 7b 0a 20 20 20 20 77 72 69 74 65 6c 6e 20  } {.    writeln 
c540: 22 20 5c 5c 22 0a 20 20 20 20 77 72 69 74 65 6c  " \\".    writel
c550: 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 20  n -nonewline "  
c560: 20 20 20 20 20 20 22 0a 20 20 7d 0a 20 20 73 65        ".  }.  se
c570: 74 20 73 20 5b 72 65 67 73 75 62 20 2d 61 6c 6c  t s [regsub -all
c580: 20 2f 20 24 73 20 5c 5c 5d 0a 20 20 77 72 69 74   / $s \\].  writ
c590: 65 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  eln -nonewline "
c5a0: 5c 22 5c 24 28 53 52 43 44 49 52 29 5c 5c 24 7b  \"\$(SRCDIR)\\${
c5b0: 73 7d 5c 22 22 3b 20 69 6e 63 72 20 69 0a 7d 0a  s}\""; incr i.}.
c5c0: 77 72 69 74 65 6c 6e 20 22 5c 6e 22 0a 73 65 74  writeln "\n".set
c5d0: 20 41 64 64 69 74 69 6f 6e 61 6c 4f 62 6a 20 5b   AdditionalObj [
c5e0: 6c 69 73 74 20 73 68 65 6c 6c 20 73 71 6c 69 74  list shell sqlit
c5f0: 65 33 20 74 68 20 74 68 5f 6c 61 6e 67 20 74 68  e3 th th_lang th
c600: 5f 74 63 6c 20 63 73 6f 6e 5f 61 6d 61 6c 67 61  _tcl cson_amalga
c610: 6d 61 74 69 6f 6e 5d 0a 77 72 69 74 65 6c 6e 20  mation].writeln 
c620: 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 4f 42 4a 20  -nonewline "OBJ 
c630: 20 20 3d 20 22 0a 73 65 74 20 69 20 30 0a 66 6f    = ".set i 0.fo
c640: 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 5b  reach s [lsort [
c650: 63 6f 6e 63 61 74 20 24 73 72 63 20 24 41 64 64  concat $src $Add
c660: 69 74 69 6f 6e 61 6c 4f 62 6a 5d 5d 20 7b 0a 20  itionalObj]] {. 
c670: 20 69 66 20 7b 24 69 20 3e 20 30 7d 20 7b 0a 20   if {$i > 0} {. 
c680: 20 20 20 77 72 69 74 65 6c 6e 20 22 20 5c 5c 22     writeln " \\"
c690: 0a 20 20 20 20 77 72 69 74 65 6c 6e 20 2d 6e 6f  .    writeln -no
c6a0: 6e 65 77 6c 69 6e 65 20 22 20 20 20 20 20 20 20  newline "       
c6b0: 20 22 0a 20 20 7d 0a 20 20 77 72 69 74 65 6c 6e   ".  }.  writeln
c6c0: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 5c 22 5c   -nonewline "\"\
c6d0: 24 28 4f 58 29 5c 5c 24 73 5c 24 4f 5c 22 22 3b  $(OX)\\$s\$O\"";
c6e0: 20 69 6e 63 72 20 69 0a 7d 0a 69 66 20 7b 24 69   incr i.}.if {$i
c6f0: 20 3e 20 30 7d 20 7b 0a 20 20 77 72 69 74 65 6c   > 0} {.  writel
c700: 6e 20 22 20 5c 5c 22 0a 7d 0a 77 72 69 74 65 6c  n " \\".}.writel
c710: 6e 20 22 21 69 66 20 5c 24 28 46 4f 53 53 49 4c  n "!if \$(FOSSIL
c720: 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a 29 21 3d  _ENABLE_MINIZ)!=
c730: 30 22 0a 77 72 69 74 65 6c 6e 20 2d 6e 6f 6e 65  0".writeln -none
c740: 77 6c 69 6e 65 20 22 20 20 20 20 20 20 20 20 22  wline "        "
c750: 0a 77 72 69 74 65 6c 6e 20 22 5c 22 5c 24 28 4f  .writeln "\"\$(O
c760: 58 29 5c 5c 6d 69 6e 69 7a 5c 24 4f 5c 22 20 5c  X)\\miniz\$O\" \
c770: 5c 22 3b 20 69 6e 63 72 20 69 0a 77 72 69 74 65  \"; incr i.write
c780: 6c 6e 20 22 21 65 6e 64 69 66 22 0a 77 72 69 74  ln "!endif".writ
c790: 65 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  eln -nonewline "
c7a0: 20 20 20 20 20 20 20 20 5c 22 5c 24 28 4f 58 29          \"\$(OX)
c7b0: 5c 5c 66 6f 73 73 69 6c 2e 72 65 73 5c 22 5c 6e  \\fossil.res\"\n
c7c0: 5c 6e 22 0a 77 72 69 74 65 6c 6e 20 5b 73 74 72  \n".writeln [str
c7d0: 69 6e 67 20 6d 61 70 20 5b 6c 69 73 74 20 3c 3c  ing map [list <<
c7e0: 3c 4e 45 58 54 5f 4c 49 4e 45 3e 3e 3e 20 5c 5c  <NEXT_LINE>>> \\
c7f0: 5d 20 7b 0a 21 69 66 6e 64 65 66 20 42 41 53 45  ] {.!ifndef BASE
c800: 41 50 50 4e 41 4d 45 0a 42 41 53 45 41 50 50 4e  APPNAME.BASEAPPN
c810: 41 4d 45 20 3d 20 66 6f 73 73 69 6c 0a 21 65 6e  AME = fossil.!en
c820: 64 69 66 0a 0a 41 50 50 4e 41 4d 45 20 20 20 20  dif..APPNAME    
c830: 20 3d 20 24 28 4f 58 29 5c 24 28 42 41 53 45 41   = $(OX)\$(BASEA
c840: 50 50 4e 41 4d 45 29 24 28 45 29 0a 50 44 42 4e  PPNAME)$(E).PDBN
c850: 41 4d 45 20 20 20 20 20 3d 20 24 28 4f 58 29 5c  AME     = $(OX)\
c860: 24 28 42 41 53 45 41 50 50 4e 41 4d 45 29 24 28  $(BASEAPPNAME)$(
c870: 50 29 0a 41 50 50 54 41 52 47 45 54 53 20 20 3d  P).APPTARGETS  =
c880: 0a 0a 61 6c 6c 3a 20 22 24 28 4f 58 29 22 20 22  ..all: "$(OX)" "
c890: 24 28 41 50 50 4e 41 4d 45 29 22 0a 0a 24 28 42  $(APPNAME)"..$(B
c8a0: 41 53 45 41 50 50 4e 41 4d 45 29 3a 20 22 24 28  ASEAPPNAME): "$(
c8b0: 41 50 50 4e 41 4d 45 29 22 0a 0a 24 28 42 41 53  APPNAME)"..$(BAS
c8c0: 45 41 50 50 4e 41 4d 45 29 24 28 45 29 3a 20 22  EAPPNAME)$(E): "
c8d0: 24 28 41 50 50 4e 41 4d 45 29 22 0a 0a 69 6e 73  $(APPNAME)"..ins
c8e0: 74 61 6c 6c 3a 20 22 24 28 41 50 50 4e 41 4d 45  tall: "$(APPNAME
c8f0: 29 22 0a 09 65 63 68 6f 20 46 20 7c 20 78 63 6f  )"..echo F | xco
c900: 70 79 20 2f 59 20 22 24 28 41 50 50 4e 41 4d 45  py /Y "$(APPNAME
c910: 29 22 20 22 24 28 49 4e 53 54 41 4c 4c 44 49 52  )" "$(INSTALLDIR
c920: 29 22 5c 2a 0a 21 69 66 20 24 28 44 45 42 55 47  )"\*.!if $(DEBUG
c930: 29 21 3d 30 0a 09 65 63 68 6f 20 46 20 7c 20 78  )!=0..echo F | x
c940: 63 6f 70 79 20 2f 59 20 22 24 28 50 44 42 4e 41  copy /Y "$(PDBNA
c950: 4d 45 29 22 20 22 24 28 49 4e 53 54 41 4c 4c 44  ME)" "$(INSTALLD
c960: 49 52 29 22 5c 2a 0a 21 65 6e 64 69 66 0a 0a 24  IR)"\*.!endif..$
c970: 28 4f 58 29 3a 0a 09 40 2d 6d 6b 64 69 72 20 24  (OX):..@-mkdir $
c980: 40 0a 0a 7a 6c 69 62 3a 0a 09 40 65 63 68 6f 20  @..zlib:..@echo 
c990: 42 75 69 6c 64 69 6e 67 20 7a 6c 69 62 20 66 72  Building zlib fr
c9a0: 6f 6d 20 22 24 28 5a 4c 49 42 44 49 52 29 22 2e  om "$(ZLIBDIR)".
c9b0: 2e 2e 0a 21 69 66 20 24 28 46 4f 53 53 49 4c 5f  ...!if $(FOSSIL_
c9c0: 45 4e 41 42 4c 45 5f 57 49 4e 58 50 29 21 3d 30  ENABLE_WINXP)!=0
c9d0: 0a 09 40 70 75 73 68 64 20 22 24 28 5a 4c 49 42  ..@pushd "$(ZLIB
c9e0: 44 49 52 29 22 20 26 26 20 24 28 4d 41 4b 45 29  DIR)" && $(MAKE)
c9f0: 20 2f 66 20 77 69 6e 33 32 5c 4d 61 6b 65 66 69   /f win32\Makefi
ca00: 6c 65 2e 6d 73 63 20 24 28 5a 4c 49 42 29 20 22  le.msc $(ZLIB) "
ca10: 43 43 3d 63 6c 20 24 28 58 50 43 46 4c 41 47 53  CC=cl $(XPCFLAGS
ca20: 29 22 20 22 4c 44 3d 6c 69 6e 6b 20 24 28 58 50  )" "LD=link $(XP
ca30: 4c 44 46 4c 41 47 53 29 22 20 26 26 20 70 6f 70  LDFLAGS)" && pop
ca40: 64 0a 21 65 6c 73 65 0a 09 40 70 75 73 68 64 20  d.!else..@pushd 
ca50: 22 24 28 5a 4c 49 42 44 49 52 29 22 20 26 26 20  "$(ZLIBDIR)" && 
ca60: 24 28 4d 41 4b 45 29 20 2f 66 20 77 69 6e 33 32  $(MAKE) /f win32
ca70: 5c 4d 61 6b 65 66 69 6c 65 2e 6d 73 63 20 24 28  \Makefile.msc $(
ca80: 5a 4c 49 42 29 20 26 26 20 70 6f 70 64 0a 21 65  ZLIB) && popd.!e
ca90: 6e 64 69 66 0a 0a 63 6c 65 61 6e 2d 7a 6c 69 62  ndif..clean-zlib
caa0: 3a 0a 09 40 70 75 73 68 64 20 22 24 28 5a 4c 49  :..@pushd "$(ZLI
cab0: 42 44 49 52 29 22 20 26 26 20 24 28 4d 41 4b 45  BDIR)" && $(MAKE
cac0: 29 20 2f 66 20 77 69 6e 33 32 5c 4d 61 6b 65 66  ) /f win32\Makef
cad0: 69 6c 65 2e 6d 73 63 20 63 6c 65 61 6e 20 26 26  ile.msc clean &&
cae0: 20 70 6f 70 64 0a 0a 21 69 66 20 24 28 46 4f 53   popd..!if $(FOS
caf0: 53 49 4c 5f 45 4e 41 42 4c 45 5f 53 53 4c 29 21  SIL_ENABLE_SSL)!
cb00: 3d 30 0a 6f 70 65 6e 73 73 6c 3a 0a 09 40 65 63  =0.openssl:..@ec
cb10: 68 6f 20 42 75 69 6c 64 69 6e 67 20 4f 70 65 6e  ho Building Open
cb20: 53 53 4c 20 66 72 6f 6d 20 22 24 28 53 53 4c 44  SSL from "$(SSLD
cb30: 49 52 29 22 2e 2e 2e 0a 21 69 66 64 65 66 20 50  IR)"....!ifdef P
cb40: 45 52 4c 44 49 52 0a 09 40 70 75 73 68 64 20 22  ERLDIR..@pushd "
cb50: 24 28 53 53 4c 44 49 52 29 22 20 26 26 20 22 24  $(SSLDIR)" && "$
cb60: 28 50 45 52 4c 44 49 52 29 5c 24 28 50 45 52 4c  (PERLDIR)\$(PERL
cb70: 29 22 20 43 6f 6e 66 69 67 75 72 65 20 24 28 53  )" Configure $(S
cb80: 53 4c 43 4f 4e 46 49 47 29 20 26 26 20 70 6f 70  SLCONFIG) && pop
cb90: 64 0a 21 65 6c 73 65 0a 09 40 70 75 73 68 64 20  d.!else..@pushd 
cba0: 22 24 28 53 53 4c 44 49 52 29 22 20 26 26 20 22  "$(SSLDIR)" && "
cbb0: 24 28 50 45 52 4c 29 22 20 43 6f 6e 66 69 67 75  $(PERL)" Configu
cbc0: 72 65 20 24 28 53 53 4c 43 4f 4e 46 49 47 29 20  re $(SSLCONFIG) 
cbd0: 26 26 20 70 6f 70 64 0a 21 65 6e 64 69 66 0a 21  && popd.!endif.!
cbe0: 69 66 20 24 28 46 4f 53 53 49 4c 5f 45 4e 41 42  if $(FOSSIL_ENAB
cbf0: 4c 45 5f 57 49 4e 58 50 29 21 3d 30 0a 09 40 70  LE_WINXP)!=0..@p
cc00: 75 73 68 64 20 22 24 28 53 53 4c 44 49 52 29 22  ushd "$(SSLDIR)"
cc10: 20 26 26 20 24 28 4d 41 4b 45 29 20 22 43 43 3d   && $(MAKE) "CC=
cc20: 63 6c 20 24 28 58 50 43 46 4c 41 47 53 29 22 20  cl $(XPCFLAGS)" 
cc30: 22 4c 46 4c 41 47 53 3d 24 28 58 50 4c 44 46 4c  "LFLAGS=$(XPLDFL
cc40: 41 47 53 29 22 20 26 26 20 70 6f 70 64 0a 21 65  AGS)" && popd.!e
cc50: 6c 73 65 0a 09 40 70 75 73 68 64 20 22 24 28 53  lse..@pushd "$(S
cc60: 53 4c 44 49 52 29 22 20 26 26 20 24 28 4d 41 4b  SLDIR)" && $(MAK
cc70: 45 29 20 26 26 20 70 6f 70 64 0a 21 65 6e 64 69  E) && popd.!endi
cc80: 66 0a 0a 63 6c 65 61 6e 2d 6f 70 65 6e 73 73 6c  f..clean-openssl
cc90: 3a 0a 09 40 70 75 73 68 64 20 22 24 28 53 53 4c  :..@pushd "$(SSL
cca0: 44 49 52 29 22 20 26 26 20 24 28 4d 41 4b 45 29  DIR)" && $(MAKE)
ccb0: 20 63 6c 65 61 6e 20 26 26 20 70 6f 70 64 0a 21   clean && popd.!
ccc0: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 46 4f 53  endif..!if $(FOS
ccd0: 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49 5a  SIL_ENABLE_MINIZ
cce0: 29 3d 3d 30 0a 21 69 66 20 24 28 46 4f 53 53 49  )==0.!if $(FOSSI
ccf0: 4c 5f 42 55 49 4c 44 5f 5a 4c 49 42 29 21 3d 30  L_BUILD_ZLIB)!=0
cd00: 0a 41 50 50 54 41 52 47 45 54 53 20 3d 20 24 28  .APPTARGETS = $(
cd10: 41 50 50 54 41 52 47 45 54 53 29 20 7a 6c 69 62  APPTARGETS) zlib
cd20: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a  .!endif.!endif..
cd30: 21 69 66 20 24 28 46 4f 53 53 49 4c 5f 45 4e 41  !if $(FOSSIL_ENA
cd40: 42 4c 45 5f 53 53 4c 29 21 3d 30 0a 21 69 66 20  BLE_SSL)!=0.!if 
cd50: 24 28 46 4f 53 53 49 4c 5f 42 55 49 4c 44 5f 53  $(FOSSIL_BUILD_S
cd60: 53 4c 29 21 3d 30 0a 41 50 50 54 41 52 47 45 54  SL)!=0.APPTARGET
cd70: 53 20 3d 20 24 28 41 50 50 54 41 52 47 45 54 53  S = $(APPTARGETS
cd80: 29 20 6f 70 65 6e 73 73 6c 0a 21 65 6e 64 69 66  ) openssl.!endif
cd90: 0a 21 65 6e 64 69 66 0a 0a 22 24 28 41 50 50 4e  .!endif.."$(APPN
cda0: 41 4d 45 29 22 20 3a 20 24 28 41 50 50 54 41 52  AME)" : $(APPTAR
cdb0: 47 45 54 53 29 20 22 24 28 4f 42 4a 44 49 52 29  GETS) "$(OBJDIR)
cdc0: 5c 74 72 61 6e 73 6c 61 74 65 24 45 22 20 22 24  \translate$E" "$
cdd0: 28 4f 42 4a 44 49 52 29 5c 6d 6b 69 6e 64 65 78  (OBJDIR)\mkindex
cde0: 24 45 22 20 22 24 28 4f 42 4a 44 49 52 29 5c 63  $E" "$(OBJDIR)\c
cdf0: 6f 64 65 63 68 65 63 6b 31 24 45 22 20 22 24 28  odecheck1$E" "$(
ce00: 4f 58 29 5c 68 65 61 64 65 72 73 22 20 24 28 4f  OX)\headers" $(O
ce10: 42 4a 29 20 22 24 28 4f 58 29 5c 6c 69 6e 6b 6f  BJ) "$(OX)\linko
ce20: 70 74 73 22 0a 09 22 24 28 4f 42 4a 44 49 52 29  pts".."$(OBJDIR)
ce30: 5c 63 6f 64 65 63 68 65 63 6b 31 24 45 22 20 24  \codecheck1$E" $
ce40: 28 53 52 43 29 0a 09 6c 69 6e 6b 20 24 28 4c 44  (SRC)..link $(LD
ce50: 46 4c 41 47 53 29 20 2f 4f 55 54 3a 24 40 20 2f  FLAGS) /OUT:$@ /
ce60: 50 44 42 3a 24 28 40 44 29 5c 20 24 28 4c 49 42  PDB:$(@D)\ $(LIB
ce70: 44 49 52 29 20 57 73 65 74 61 72 67 76 2e 6f 62  DIR) Wsetargv.ob
ce80: 6a 20 22 24 28 4f 58 29 5c 66 6f 73 73 69 6c 2e  j "$(OX)\fossil.
ce90: 72 65 73 22 20 40 22 24 28 4f 58 29 5c 6c 69 6e  res" @"$(OX)\lin
cea0: 6b 6f 70 74 73 22 0a 09 69 66 20 65 78 69 73 74  kopts"..if exist
ceb0: 20 22 24 28 42 29 5c 77 69 6e 5c 66 6f 73 73 69   "$(B)\win\fossi
cec0: 6c 2e 65 78 65 2e 6d 61 6e 69 66 65 73 74 22 20  l.exe.manifest" 
ced0: 3c 3c 3c 4e 45 58 54 5f 4c 49 4e 45 3e 3e 3e 0a  <<<NEXT_LINE>>>.
cee0: 09 09 24 28 4d 54 43 29 20 2d 6e 6f 6c 6f 67 6f  ..$(MTC) -nologo
cef0: 20 2d 6d 61 6e 69 66 65 73 74 20 22 24 28 42 29   -manifest "$(B)
cf00: 5c 77 69 6e 5c 66 6f 73 73 69 6c 2e 65 78 65 2e  \win\fossil.exe.
cf10: 6d 61 6e 69 66 65 73 74 22 20 2d 6f 75 74 70 75  manifest" -outpu
cf20: 74 72 65 73 6f 75 72 63 65 3a 24 40 3b 31 0a 0a  tresource:$@;1..
cf30: 22 24 28 4f 58 29 5c 6c 69 6e 6b 6f 70 74 73 22  "$(OX)\linkopts"
cf40: 3a 20 22 24 28 42 29 5c 77 69 6e 5c 4d 61 6b 65  : "$(B)\win\Make
cf50: 66 69 6c 65 2e 6d 73 63 22 7d 5d 0a 73 65 74 20  file.msc"}].set 
cf60: 72 65 64 69 72 20 7b 3e 7d 0a 66 6f 72 65 61 63  redir {>}.foreac
cf70: 68 20 73 20 5b 6c 73 6f 72 74 20 5b 63 6f 6e 63  h s [lsort [conc
cf80: 61 74 20 24 73 72 63 20 24 41 64 64 69 74 69 6f  at $src $Additio
cf90: 6e 61 6c 4f 62 6a 5d 5d 20 7b 0a 20 20 77 72 69  nalObj]] {.  wri
cfa0: 74 65 6c 6e 20 22 5c 74 65 63 68 6f 20 5c 22 5c  teln "\techo \"\
cfb0: 24 28 4f 58 29 5c 5c 24 73 2e 6f 62 6a 5c 22 20  $(OX)\\$s.obj\" 
cfc0: 24 72 65 64 69 72 20 5c 24 40 22 0a 20 20 73 65  $redir \$@".  se
cfd0: 74 20 72 65 64 69 72 20 7b 3e 3e 7d 0a 7d 0a 73  t redir {>>}.}.s
cfe0: 65 74 20 72 65 64 69 72 20 7b 3e 3e 7d 0a 77 72  et redir {>>}.wr
cff0: 69 74 65 6c 6e 20 22 21 69 66 20 5c 24 28 46 4f  iteln "!if \$(FO
d000: 53 53 49 4c 5f 45 4e 41 42 4c 45 5f 4d 49 4e 49  SSIL_ENABLE_MINI
d010: 5a 29 21 3d 30 22 0a 77 72 69 74 65 6c 6e 20 22  Z)!=0".writeln "
d020: 5c 74 65 63 68 6f 20 5c 22 5c 24 28 4f 58 29 5c  \techo \"\$(OX)\
d030: 5c 6d 69 6e 69 7a 2e 6f 62 6a 5c 22 20 24 72 65  \miniz.obj\" $re
d040: 64 69 72 20 5c 24 40 22 0a 77 72 69 74 65 6c 6e  dir \$@".writeln
d050: 20 22 21 65 6e 64 69 66 22 0a 77 72 69 74 65 6c   "!endif".writel
d060: 6e 20 22 5c 74 65 63 68 6f 20 5c 24 28 4c 49 42  n "\techo \$(LIB
d070: 53 29 20 24 72 65 64 69 72 20 5c 24 40 22 0a 77  S) $redir \$@".w
d080: 72 69 74 65 6c 6e 20 7b 0a 22 24 28 4f 42 4a 44  riteln {."$(OBJD
d090: 49 52 29 5c 74 72 61 6e 73 6c 61 74 65 24 45 22  IR)\translate$E"
d0a0: 3a 20 22 24 28 53 52 43 44 49 52 29 5c 74 72 61  : "$(SRCDIR)\tra
d0b0: 6e 73 6c 61 74 65 2e 63 22 0a 09 24 28 42 43 43  nslate.c"..$(BCC
d0c0: 29 20 2f 46 65 24 40 20 2f 46 6f 24 28 40 44 29  ) /Fe$@ /Fo$(@D)
d0d0: 5c 20 2f 46 64 24 28 40 44 29 5c 20 24 2a 2a 0a  \ /Fd$(@D)\ $**.
d0e0: 0a 22 24 28 4f 42 4a 44 49 52 29 5c 6d 61 6b 65  ."$(OBJDIR)\make
d0f0: 68 65 61 64 65 72 73 24 45 22 3a 20 22 24 28 53  headers$E": "$(S
d100: 52 43 44 49 52 29 5c 6d 61 6b 65 68 65 61 64 65  RCDIR)\makeheade
d110: 72 73 2e 63 22 0a 09 24 28 42 43 43 29 20 2f 46  rs.c"..$(BCC) /F
d120: 65 24 40 20 2f 46 6f 24 28 40 44 29 5c 20 2f 46  e$@ /Fo$(@D)\ /F
d130: 64 24 28 40 44 29 5c 20 24 2a 2a 0a 0a 22 24 28  d$(@D)\ $**.."$(
d140: 4f 42 4a 44 49 52 29 5c 6d 6b 69 6e 64 65 78 24  OBJDIR)\mkindex$
d150: 45 22 3a 20 22 24 28 53 52 43 44 49 52 29 5c 6d  E": "$(SRCDIR)\m
d160: 6b 69 6e 64 65 78 2e 63 22 0a 09 24 28 42 43 43  kindex.c"..$(BCC
d170: 29 20 2f 46 65 24 40 20 2f 46 6f 24 28 40 44 29  ) /Fe$@ /Fo$(@D)
d180: 5c 20 2f 46 64 24 28 40 44 29 5c 20 24 2a 2a 0a  \ /Fd$(@D)\ $**.
d190: 0a 22 24 28 4f 42 4a 44 49 52 29 5c 6d 6b 62 75  ."$(OBJDIR)\mkbu
d1a0: 69 6c 74 69 6e 24 45 22 3a 20 22 24 28 53 52 43  iltin$E": "$(SRC
d1b0: 44 49 52 29 5c 6d 6b 62 75 69 6c 74 69 6e 2e 63  DIR)\mkbuiltin.c
d1c0: 22 0a 09 24 28 42 43 43 29 20 2f 46 65 24 40 20  "..$(BCC) /Fe$@ 
d1d0: 2f 46 6f 24 28 40 44 29 5c 20 2f 46 64 24 28 40  /Fo$(@D)\ /Fd$(@
d1e0: 44 29 5c 20 24 2a 2a 0a 0a 22 24 28 4f 42 4a 44  D)\ $**.."$(OBJD
d1f0: 49 52 29 5c 6d 6b 76 65 72 73 69 6f 6e 24 45 22  IR)\mkversion$E"
d200: 3a 20 22 24 28 53 52 43 44 49 52 29 5c 6d 6b 76  : "$(SRCDIR)\mkv
d210: 65 72 73 69 6f 6e 2e 63 22 0a 09 24 28 42 43 43  ersion.c"..$(BCC
d220: 29 20 2f 46 65 24 40 20 2f 46 6f 24 28 40 44 29  ) /Fe$@ /Fo$(@D)
d230: 5c 20 2f 46 64 24 28 40 44 29 5c 20 24 2a 2a 0a  \ /Fd$(@D)\ $**.
d240: 0a 22 24 28 4f 42 4a 44 49 52 29 5c 63 6f 64 65  ."$(OBJDIR)\code
d250: 63 68 65 63 6b 31 24 45 22 3a 20 22 24 28 53 52  check1$E": "$(SR
d260: 43 44 49 52 29 5c 63 6f 64 65 63 68 65 63 6b 31  CDIR)\codecheck1
d270: 2e 63 22 0a 09 24 28 42 43 43 29 20 2f 46 65 24  .c"..$(BCC) /Fe$
d280: 40 20 2f 46 6f 24 28 40 44 29 5c 20 2f 46 64 24  @ /Fo$(@D)\ /Fd$
d290: 28 40 44 29 5c 20 24 2a 2a 0a 0a 21 69 66 20 24  (@D)\ $**..!if $
d2a0: 28 55 53 45 5f 53 45 45 29 21 3d 30 0a 53 45 45  (USE_SEE)!=0.SEE
d2b0: 5f 46 4c 41 47 53 20 3d 20 2f 44 53 51 4c 49 54  _FLAGS = /DSQLIT
d2c0: 45 5f 48 41 53 5f 43 4f 44 45 43 3d 31 20 2f 44  E_HAS_CODEC=1 /D
d2d0: 53 51 4c 49 54 45 5f 53 48 45 4c 4c 5f 44 42 4b  SQLITE_SHELL_DBK
d2e0: 45 59 5f 50 52 4f 43 3d 66 6f 73 73 69 6c 5f 6b  EY_PROC=fossil_k
d2f0: 65 79 0a 53 51 4c 49 54 45 33 5f 53 48 45 4c 4c  ey.SQLITE3_SHELL
d300: 5f 53 52 43 20 3d 20 24 28 53 52 43 44 49 52 29  _SRC = $(SRCDIR)
d310: 5c 73 68 65 6c 6c 2d 73 65 65 2e 63 0a 53 51 4c  \shell-see.c.SQL
d320: 49 54 45 33 5f 53 52 43 20 3d 20 24 28 53 52 43  ITE3_SRC = $(SRC
d330: 44 49 52 29 5c 73 71 6c 69 74 65 33 2d 73 65 65  DIR)\sqlite3-see
d340: 2e 63 0a 21 65 6c 73 65 0a 53 45 45 5f 46 4c 41  .c.!else.SEE_FLA
d350: 47 53 20 3d 0a 53 51 4c 49 54 45 33 5f 53 48 45  GS =.SQLITE3_SHE
d360: 4c 4c 5f 53 52 43 20 3d 20 24 28 53 52 43 44 49  LL_SRC = $(SRCDI
d370: 52 29 5c 73 68 65 6c 6c 2e 63 0a 53 51 4c 49 54  R)\shell.c.SQLIT
d380: 45 33 5f 53 52 43 20 3d 20 24 28 53 52 43 44 49  E3_SRC = $(SRCDI
d390: 52 29 5c 73 71 6c 69 74 65 33 2e 63 0a 21 65 6e  R)\sqlite3.c.!en
d3a0: 64 69 66 0a 0a 22 24 28 4f 58 29 5c 73 68 65 6c  dif.."$(OX)\shel
d3b0: 6c 24 4f 22 20 3a 20 22 24 28 53 51 4c 49 54 45  l$O" : "$(SQLITE
d3c0: 33 5f 53 48 45 4c 4c 5f 53 52 43 29 22 20 22 24  3_SHELL_SRC)" "$
d3d0: 28 42 29 5c 77 69 6e 5c 4d 61 6b 65 66 69 6c 65  (B)\win\Makefile
d3e0: 2e 6d 73 63 22 0a 09 24 28 54 43 43 29 20 2f 46  .msc"..$(TCC) /F
d3f0: 6f 24 40 20 2f 46 64 24 28 40 44 29 5c 20 24 28  o$@ /Fd$(@D)\ $(
d400: 53 48 45 4c 4c 5f 4f 50 54 49 4f 4e 53 29 20 24  SHELL_OPTIONS) $
d410: 28 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e 53 29  (SQLITE_OPTIONS)
d420: 20 24 28 53 48 45 4c 4c 5f 43 46 4c 41 47 53 29   $(SHELL_CFLAGS)
d430: 20 24 28 53 45 45 5f 46 4c 41 47 53 29 20 2d 63   $(SEE_FLAGS) -c
d440: 20 22 24 28 53 51 4c 49 54 45 33 5f 53 48 45 4c   "$(SQLITE3_SHEL
d450: 4c 5f 53 52 43 29 22 0a 0a 22 24 28 4f 58 29 5c  L_SRC)".."$(OX)\
d460: 73 71 6c 69 74 65 33 24 4f 22 20 3a 20 22 24 28  sqlite3$O" : "$(
d470: 53 51 4c 49 54 45 33 5f 53 52 43 29 22 20 22 24  SQLITE3_SRC)" "$
d480: 28 42 29 5c 77 69 6e 5c 4d 61 6b 65 66 69 6c 65  (B)\win\Makefile
d490: 2e 6d 73 63 22 0a 09 24 28 54 43 43 29 20 2f 46  .msc"..$(TCC) /F
d4a0: 6f 24 40 20 2f 46 64 24 28 40 44 29 5c 20 2d 63  o$@ /Fd$(@D)\ -c
d4b0: 20 24 28 53 51 4c 49 54 45 5f 4f 50 54 49 4f 4e   $(SQLITE_OPTION
d4c0: 53 29 20 24 28 53 51 4c 49 54 45 5f 43 46 4c 41  S) $(SQLITE_CFLA
d4d0: 47 53 29 20 24 28 53 45 45 5f 46 4c 41 47 53 29  GS) $(SEE_FLAGS)
d4e0: 20 22 24 28 53 51 4c 49 54 45 33 5f 53 52 43 29   "$(SQLITE3_SRC)
d4f0: 22 0a 0a 22 24 28 4f 58 29 5c 74 68 24 4f 22 20  ".."$(OX)\th$O" 
d500: 3a 20 22 24 28 53 52 43 44 49 52 29 5c 74 68 2e  : "$(SRCDIR)\th.
d510: 63 22 0a 09 24 28 54 43 43 29 20 2f 46 6f 24 40  c"..$(TCC) /Fo$@
d520: 20 2f 46 64 24 28 40 44 29 5c 20 2d 63 20 24 2a   /Fd$(@D)\ -c $*
d530: 2a 0a 0a 22 24 28 4f 58 29 5c 74 68 5f 6c 61 6e  *.."$(OX)\th_lan
d540: 67 24 4f 22 20 3a 20 22 24 28 53 52 43 44 49 52  g$O" : "$(SRCDIR
d550: 29 5c 74 68 5f 6c 61 6e 67 2e 63 22 0a 09 24 28  )\th_lang.c"..$(
d560: 54 43 43 29 20 2f 46 6f 24 40 20 2f 46 64 24 28  TCC) /Fo$@ /Fd$(
d570: 40 44 29 5c 20 2d 63 20 24 2a 2a 0a 0a 22 24 28  @D)\ -c $**.."$(
d580: 4f 58 29 5c 74 68 5f 74 63 6c 24 4f 22 20 3a 20  OX)\th_tcl$O" : 
d590: 22 24 28 53 52 43 44 49 52 29 5c 74 68 5f 74 63  "$(SRCDIR)\th_tc
d5a0: 6c 2e 63 22 0a 09 24 28 54 43 43 29 20 2f 46 6f  l.c"..$(TCC) /Fo
d5b0: 24 40 20 2f 46 64 24 28 40 44 29 5c 20 2d 63 20  $@ /Fd$(@D)\ -c 
d5c0: 24 2a 2a 0a 0a 22 24 28 4f 58 29 5c 6d 69 6e 69  $**.."$(OX)\mini
d5d0: 7a 24 4f 22 20 3a 20 22 24 28 53 52 43 44 49 52  z$O" : "$(SRCDIR
d5e0: 29 5c 6d 69 6e 69 7a 2e 63 22 0a 09 24 28 54 43  )\miniz.c"..$(TC
d5f0: 43 29 20 2f 46 6f 24 40 20 2f 46 64 24 28 40 44  C) /Fo$@ /Fd$(@D
d600: 29 5c 20 2d 63 20 24 28 4d 49 4e 49 5a 5f 4f 50  )\ -c $(MINIZ_OP
d610: 54 49 4f 4e 53 29 20 24 2a 2a 0a 0a 22 24 28 4f  TIONS) $**.."$(O
d620: 58 29 5c 56 45 52 53 49 4f 4e 2e 68 22 20 3a 20  X)\VERSION.h" : 
d630: 22 24 28 4f 42 4a 44 49 52 29 5c 6d 6b 76 65 72  "$(OBJDIR)\mkver
d640: 73 69 6f 6e 24 45 22 20 22 24 28 42 29 5c 6d 61  sion$E" "$(B)\ma
d650: 6e 69 66 65 73 74 2e 75 75 69 64 22 20 22 24 28  nifest.uuid" "$(
d660: 42 29 5c 6d 61 6e 69 66 65 73 74 22 20 22 24 28  B)\manifest" "$(
d670: 42 29 5c 56 45 52 53 49 4f 4e 22 20 22 24 28 42  B)\VERSION" "$(B
d680: 29 5c 70 68 6f 6e 79 2e 68 22 0a 09 22 24 28 4f  )\phony.h".."$(O
d690: 42 4a 44 49 52 29 5c 6d 6b 76 65 72 73 69 6f 6e  BJDIR)\mkversion
d6a0: 24 45 22 20 22 24 28 42 29 5c 6d 61 6e 69 66 65  $E" "$(B)\manife
d6b0: 73 74 2e 75 75 69 64 22 20 22 24 28 42 29 5c 6d  st.uuid" "$(B)\m
d6c0: 61 6e 69 66 65 73 74 22 20 22 24 28 42 29 5c 56  anifest" "$(B)\V
d6d0: 45 52 53 49 4f 4e 22 20 3e 20 24 40 0a 0a 22 24  ERSION" > $@.."$
d6e0: 28 42 29 5c 70 68 6f 6e 79 2e 68 22 20 3a 0a 09  (B)\phony.h" :..
d6f0: 72 65 6d 20 46 6f 72 63 65 20 72 65 62 75 69 6c  rem Force rebuil
d700: 64 20 6f 66 20 56 45 52 53 49 4f 4e 2e 68 20 77  d of VERSION.h w
d710: 68 65 6e 65 76 65 72 20 6e 6d 61 6b 65 20 69 73  henever nmake is
d720: 20 72 75 6e 0a 0a 22 24 28 4f 58 29 5c 63 73 6f   run.."$(OX)\cso
d730: 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f 6e 24 4f  n_amalgamation$O
d740: 22 20 3a 20 22 24 28 53 52 43 44 49 52 29 5c 63  " : "$(SRCDIR)\c
d750: 73 6f 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f 6e  son_amalgamation
d760: 2e 63 22 0a 09 24 28 54 43 43 29 20 2f 46 6f 24  .c"..$(TCC) /Fo$
d770: 40 20 2f 46 64 24 28 40 44 29 5c 20 2d 63 20 24  @ /Fd$(@D)\ -c $
d780: 2a 2a 0a 0a 22 24 28 4f 58 29 5c 70 61 67 65 5f  **.."$(OX)\page_
d790: 69 6e 64 65 78 2e 68 22 3a 20 22 24 28 4f 42 4a  index.h": "$(OBJ
d7a0: 44 49 52 29 5c 6d 6b 69 6e 64 65 78 24 45 22 20  DIR)\mkindex$E" 
d7b0: 24 28 53 52 43 29 0a 09 24 2a 2a 20 3e 20 24 40  $(SRC)..$** > $@
d7c0: 0a 0a 22 24 28 4f 58 29 5c 62 75 69 6c 74 69 6e  .."$(OX)\builtin
d7d0: 5f 64 61 74 61 2e 68 22 3a 09 22 24 28 4f 42 4a  _data.h":."$(OBJ
d7e0: 44 49 52 29 5c 6d 6b 62 75 69 6c 74 69 6e 24 45  DIR)\mkbuiltin$E
d7f0: 22 20 22 24 28 4f 58 29 5c 62 75 69 6c 74 69 6e  " "$(OX)\builtin
d800: 5f 64 61 74 61 2e 72 65 73 6c 69 73 74 22 0a 09  _data.reslist"..
d810: 22 24 28 4f 42 4a 44 49 52 29 5c 6d 6b 62 75 69  "$(OBJDIR)\mkbui
d820: 6c 74 69 6e 24 45 22 20 2d 2d 70 72 65 66 69 78  ltin$E" --prefix
d830: 20 22 24 28 53 52 43 44 49 52 29 2f 22 20 2d 2d   "$(SRCDIR)/" --
d840: 72 65 73 6c 69 73 74 20 22 24 28 4f 58 29 5c 62  reslist "$(OX)\b
d850: 75 69 6c 74 69 6e 5f 64 61 74 61 2e 72 65 73 6c  uiltin_data.resl
d860: 69 73 74 22 20 3e 20 24 40 0a 0a 63 6c 65 61 6e  ist" > $@..clean
d870: 78 3a 0a 09 2d 64 65 6c 20 22 24 28 4f 58 29 5c  x:..-del "$(OX)\
d880: 2a 2e 6f 62 6a 22 20 32 3e 4e 55 4c 0a 09 2d 64  *.obj" 2>NUL..-d
d890: 65 6c 20 22 24 28 4f 42 4a 44 49 52 29 5c 2a 2e  el "$(OBJDIR)\*.
d8a0: 6f 62 6a 22 20 32 3e 4e 55 4c 0a 09 2d 64 65 6c  obj" 2>NUL..-del
d8b0: 20 22 24 28 4f 58 29 5c 2a 5f 2e 63 22 20 32 3e   "$(OX)\*_.c" 2>
d8c0: 4e 55 4c 0a 09 2d 64 65 6c 20 22 24 28 4f 58 29  NUL..-del "$(OX)
d8d0: 5c 2a 2e 68 22 20 32 3e 4e 55 4c 0a 09 2d 64 65  \*.h" 2>NUL..-de
d8e0: 6c 20 22 24 28 4f 58 29 5c 2a 2e 69 6c 6b 22 20  l "$(OX)\*.ilk" 
d8f0: 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20 22 24 28 4f  2>NUL..-del "$(O
d900: 58 29 5c 2a 2e 6d 61 70 22 20 32 3e 4e 55 4c 0a  X)\*.map" 2>NUL.
d910: 09 2d 64 65 6c 20 22 24 28 4f 58 29 5c 2a 2e 72  .-del "$(OX)\*.r
d920: 65 73 22 20 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20  es" 2>NUL..-del 
d930: 22 24 28 4f 58 29 5c 2a 2e 72 65 73 6c 69 73 74  "$(OX)\*.reslist
d940: 22 20 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20 22 24  " 2>NUL..-del "$
d950: 28 4f 58 29 5c 68 65 61 64 65 72 73 22 20 32 3e  (OX)\headers" 2>
d960: 4e 55 4c 0a 09 2d 64 65 6c 20 22 24 28 4f 58 29  NUL..-del "$(OX)
d970: 5c 6c 69 6e 6b 6f 70 74 73 22 20 32 3e 4e 55 4c  \linkopts" 2>NUL
d980: 0a 09 2d 64 65 6c 20 22 24 28 4f 58 29 5c 76 63  ..-del "$(OX)\vc
d990: 2a 2e 70 64 62 22 20 32 3e 4e 55 4c 0a 0a 63 6c  *.pdb" 2>NUL..cl
d9a0: 65 61 6e 3a 20 63 6c 65 61 6e 78 0a 09 2d 64 65  ean: cleanx..-de
d9b0: 6c 20 22 24 28 41 50 50 4e 41 4d 45 29 22 20 32  l "$(APPNAME)" 2
d9c0: 3e 4e 55 4c 0a 09 2d 64 65 6c 20 22 24 28 50 44  >NUL..-del "$(PD
d9d0: 42 4e 41 4d 45 29 22 20 32 3e 4e 55 4c 0a 09 2d  BNAME)" 2>NUL..-
d9e0: 64 65 6c 20 22 24 28 4f 42 4a 44 49 52 29 5c 74  del "$(OBJDIR)\t
d9f0: 72 61 6e 73 6c 61 74 65 24 45 22 20 32 3e 4e 55  ranslate$E" 2>NU
da00: 4c 0a 09 2d 64 65 6c 20 22 24 28 4f 42 4a 44 49  L..-del "$(OBJDI
da10: 52 29 5c 74 72 61 6e 73 6c 61 74 65 24 50 22 20  R)\translate$P" 
da20: 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20 22 24 28 4f  2>NUL..-del "$(O
da30: 42 4a 44 49 52 29 5c 6d 6b 69 6e 64 65 78 24 45  BJDIR)\mkindex$E
da40: 22 20 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20 22 24  " 2>NUL..-del "$
da50: 28 4f 42 4a 44 49 52 29 5c 6d 6b 69 6e 64 65 78  (OBJDIR)\mkindex
da60: 24 50 22 20 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20  $P" 2>NUL..-del 
da70: 22 24 28 4f 42 4a 44 49 52 29 5c 6d 61 6b 65 68  "$(OBJDIR)\makeh
da80: 65 61 64 65 72 73 24 45 22 20 32 3e 4e 55 4c 0a  eaders$E" 2>NUL.
da90: 09 2d 64 65 6c 20 22 24 28 4f 42 4a 44 49 52 29  .-del "$(OBJDIR)
daa0: 5c 6d 61 6b 65 68 65 61 64 65 72 73 24 50 22 20  \makeheaders$P" 
dab0: 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20 22 24 28 4f  2>NUL..-del "$(O
dac0: 42 4a 44 49 52 29 5c 6d 6b 76 65 72 73 69 6f 6e  BJDIR)\mkversion
dad0: 24 45 22 20 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20  $E" 2>NUL..-del 
dae0: 22 24 28 4f 42 4a 44 49 52 29 5c 6d 6b 76 65 72  "$(OBJDIR)\mkver
daf0: 73 69 6f 6e 24 50 22 20 32 3e 4e 55 4c 0a 09 2d  sion$P" 2>NUL..-
db00: 64 65 6c 20 22 24 28 4f 42 4a 44 49 52 29 5c 6d  del "$(OBJDIR)\m
db10: 6b 63 73 73 24 45 22 20 32 3e 4e 55 4c 0a 09 2d  kcss$E" 2>NUL..-
db20: 64 65 6c 20 22 24 28 4f 42 4a 44 49 52 29 5c 6d  del "$(OBJDIR)\m
db30: 6b 63 73 73 24 50 22 20 32 3e 4e 55 4c 0a 09 2d  kcss$P" 2>NUL..-
db40: 64 65 6c 20 22 24 28 4f 42 4a 44 49 52 29 5c 63  del "$(OBJDIR)\c
db50: 6f 64 65 63 68 65 63 6b 31 24 45 22 20 32 3e 4e  odecheck1$E" 2>N
db60: 55 4c 0a 09 2d 64 65 6c 20 22 24 28 4f 42 4a 44  UL..-del "$(OBJD
db70: 49 52 29 5c 63 6f 64 65 63 68 65 63 6b 31 24 50  IR)\codecheck1$P
db80: 22 20 32 3e 4e 55 4c 0a 09 2d 64 65 6c 20 22 24  " 2>NUL..-del "$
db90: 28 4f 42 4a 44 49 52 29 5c 6d 6b 62 75 69 6c 74  (OBJDIR)\mkbuilt
dba0: 69 6e 24 45 22 20 32 3e 4e 55 4c 0a 09 2d 64 65  in$E" 2>NUL..-de
dbb0: 6c 20 22 24 28 4f 42 4a 44 49 52 29 5c 6d 6b 62  l "$(OBJDIR)\mkb
dbc0: 75 69 6c 74 69 6e 24 50 22 20 32 3e 4e 55 4c 0a  uiltin$P" 2>NUL.
dbd0: 0a 72 65 61 6c 63 6c 65 61 6e 3a 20 63 6c 65 61  .realclean: clea
dbe0: 6e 0a 0a 22 24 28 4f 42 4a 44 49 52 29 5c 6a 73  n.."$(OBJDIR)\js
dbf0: 6f 6e 24 4f 22 20 3a 20 22 24 28 53 52 43 44 49  on$O" : "$(SRCDI
dc00: 52 29 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68  R)\json_detail.h
dc10: 22 0a 22 24 28 4f 42 4a 44 49 52 29 5c 6a 73 6f  "."$(OBJDIR)\jso
dc20: 6e 5f 61 72 74 69 66 61 63 74 24 4f 22 20 3a 20  n_artifact$O" : 
dc30: 22 24 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f  "$(SRCDIR)\json_
dc40: 64 65 74 61 69 6c 2e 68 22 0a 22 24 28 4f 42 4a  detail.h"."$(OBJ
dc50: 44 49 52 29 5c 6a 73 6f 6e 5f 62 72 61 6e 63 68  DIR)\json_branch
dc60: 24 4f 22 20 3a 20 22 24 28 53 52 43 44 49 52 29  $O" : "$(SRCDIR)
dc70: 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68 22 0a  \json_detail.h".
dc80: 22 24 28 4f 42 4a 44 49 52 29 5c 6a 73 6f 6e 5f  "$(OBJDIR)\json_
dc90: 63 6f 6e 66 69 67 24 4f 22 20 3a 20 22 24 28 53  config$O" : "$(S
dca0: 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74 61  RCDIR)\json_deta
dcb0: 69 6c 2e 68 22 0a 22 24 28 4f 42 4a 44 49 52 29  il.h"."$(OBJDIR)
dcc0: 5c 6a 73 6f 6e 5f 64 69 66 66 24 4f 22 20 3a 20  \json_diff$O" : 
dcd0: 22 24 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f  "$(SRCDIR)\json_
dce0: 64 65 74 61 69 6c 2e 68 22 0a 22 24 28 4f 42 4a  detail.h"."$(OBJ
dcf0: 44 49 52 29 5c 6a 73 6f 6e 5f 64 69 72 24 4f 22  DIR)\json_dir$O"
dd00: 20 3a 20 22 24 28 53 52 43 44 49 52 29 5c 6a 73   : "$(SRCDIR)\js
dd10: 6f 6e 5f 64 65 74 61 69 6c 2e 68 22 0a 22 24 28  on_detail.h"."$(
dd20: 4f 42 4a 44 49 52 29 5c 6a 73 6f 6e 5f 66 69 6e  OBJDIR)\json_fin
dd30: 66 6f 24 4f 22 20 3a 20 22 24 28 53 52 43 44 49  fo$O" : "$(SRCDI
dd40: 52 29 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68  R)\json_detail.h
dd50: 22 0a 22 24 28 4f 42 4a 44 49 52 29 5c 6a 73 6f  "."$(OBJDIR)\jso
dd60: 6e 5f 6c 6f 67 69 6e 24 4f 22 20 3a 20 22 24 28  n_login$O" : "$(
dd70: 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74  SRCDIR)\json_det
dd80: 61 69 6c 2e 68 22 0a 22 24 28 4f 42 4a 44 49 52  ail.h"."$(OBJDIR
dd90: 29 5c 6a 73 6f 6e 5f 71 75 65 72 79 24 4f 22 20  )\json_query$O" 
dda0: 3a 20 22 24 28 53 52 43 44 49 52 29 5c 6a 73 6f  : "$(SRCDIR)\jso
ddb0: 6e 5f 64 65 74 61 69 6c 2e 68 22 0a 22 24 28 4f  n_detail.h"."$(O
ddc0: 42 4a 44 49 52 29 5c 6a 73 6f 6e 5f 72 65 70 6f  BJDIR)\json_repo
ddd0: 72 74 24 4f 22 20 3a 20 22 24 28 53 52 43 44 49  rt$O" : "$(SRCDI
dde0: 52 29 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e 68  R)\json_detail.h
ddf0: 22 0a 22 24 28 4f 42 4a 44 49 52 29 5c 6a 73 6f  "."$(OBJDIR)\jso
de00: 6e 5f 73 74 61 74 75 73 24 4f 22 20 3a 20 22 24  n_status$O" : "$
de10: 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65  (SRCDIR)\json_de
de20: 74 61 69 6c 2e 68 22 0a 22 24 28 4f 42 4a 44 49  tail.h"."$(OBJDI
de30: 52 29 5c 6a 73 6f 6e 5f 74 61 67 24 4f 22 20 3a  R)\json_tag$O" :
de40: 20 22 24 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e   "$(SRCDIR)\json
de50: 5f 64 65 74 61 69 6c 2e 68 22 0a 22 24 28 4f 42  _detail.h"."$(OB
de60: 4a 44 49 52 29 5c 6a 73 6f 6e 5f 74 69 6d 65 6c  JDIR)\json_timel
de70: 69 6e 65 24 4f 22 20 3a 20 22 24 28 53 52 43 44  ine$O" : "$(SRCD
de80: 49 52 29 5c 6a 73 6f 6e 5f 64 65 74 61 69 6c 2e  IR)\json_detail.
de90: 68 22 0a 22 24 28 4f 42 4a 44 49 52 29 5c 6a 73  h"."$(OBJDIR)\js
dea0: 6f 6e 5f 75 73 65 72 24 4f 22 20 3a 20 22 24 28  on_user$O" : "$(
deb0: 53 52 43 44 49 52 29 5c 6a 73 6f 6e 5f 64 65 74  SRCDIR)\json_det
dec0: 61 69 6c 2e 68 22 0a 22 24 28 4f 42 4a 44 49 52  ail.h"."$(OBJDIR
ded0: 29 5c 6a 73 6f 6e 5f 77 69 6b 69 24 4f 22 20 3a  )\json_wiki$O" :
dee0: 20 22 24 28 53 52 43 44 49 52 29 5c 6a 73 6f 6e   "$(SRCDIR)\json
def0: 5f 64 65 74 61 69 6c 2e 68 22 0a 7d 0a 0a 77 72  _detail.h".}..wr
df00: 69 74 65 6c 6e 20 7b 22 24 28 4f 58 29 5c 62 75  iteln {"$(OX)\bu
df10: 69 6c 74 69 6e 5f 64 61 74 61 2e 72 65 73 6c 69  iltin_data.resli
df20: 73 74 22 3a 20 24 28 45 58 54 52 41 5f 46 49 4c  st": $(EXTRA_FIL
df30: 45 53 29 20 22 24 28 42 29 5c 77 69 6e 5c 4d 61  ES) "$(B)\win\Ma
df40: 6b 65 66 69 6c 65 2e 6d 73 63 22 7d 0a 73 65 74  kefile.msc"}.set
df50: 20 72 65 64 69 72 20 7b 3e 7d 0a 66 6f 72 65 61   redir {>}.forea
df60: 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 65 78 74  ch s [lsort $ext
df70: 72 61 5f 66 69 6c 65 73 5d 20 7b 0a 20 20 77 72  ra_files] {.  wr
df80: 69 74 65 6c 6e 20 22 5c 74 65 63 68 6f 20 5c 22  iteln "\techo \"
df90: 5c 24 28 53 52 43 44 49 52 29 5c 5c 24 7b 73 7d  \$(SRCDIR)\\${s}
dfa0: 5c 22 20 24 72 65 64 69 72 20 5c 24 40 22 0a 20  \" $redir \$@". 
dfb0: 20 73 65 74 20 72 65 64 69 72 20 7b 3e 3e 7d 0a   set redir {>>}.
dfc0: 7d 0a 0a 77 72 69 74 65 6c 6e 20 22 22 0a 66 6f  }..writeln "".fo
dfd0: 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24  reach s [lsort $
dfe0: 73 72 63 5d 20 7b 0a 20 20 77 72 69 74 65 6c 6e  src] {.  writeln
dff0: 20 22 5c 22 5c 24 28 4f 58 29 5c 5c 24 73 5c 24   "\"\$(OX)\\$s\$
e000: 4f 5c 22 20 3a 20 5c 22 5c 24 28 4f 58 29 5c 5c  O\" : \"\$(OX)\\
e010: 24 7b 73 7d 5f 2e 63 5c 22 20 5c 22 5c 24 28 4f  ${s}_.c\" \"\$(O
e020: 58 29 5c 5c 24 7b 73 7d 2e 68 5c 22 22 0a 20 20  X)\\${s}.h\"".  
e030: 77 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 54 43  writeln "\t\$(TC
e040: 43 29 20 2f 46 6f 5c 24 40 20 2f 46 64 5c 24 28  C) /Fo\$@ /Fd\$(
e050: 40 44 29 5c 5c 20 2d 63 20 5c 22 5c 24 28 4f 58  @D)\\ -c \"\$(OX
e060: 29 5c 5c 24 7b 73 7d 5f 2e 63 5c 22 5c 6e 22 0a  )\\${s}_.c\"\n".
e070: 20 20 77 72 69 74 65 6c 6e 20 22 5c 22 5c 24 28    writeln "\"\$(
e080: 4f 58 29 5c 5c 24 7b 73 7d 5f 2e 63 5c 22 20 3a  OX)\\${s}_.c\" :
e090: 20 5c 22 5c 24 28 53 52 43 44 49 52 29 5c 5c 24   \"\$(SRCDIR)\\$
e0a0: 73 2e 63 5c 22 22 0a 20 20 77 72 69 74 65 6c 6e  s.c\"".  writeln
e0b0: 20 22 5c 74 5c 22 5c 24 28 4f 42 4a 44 49 52 29   "\t\"\$(OBJDIR)
e0c0: 5c 5c 74 72 61 6e 73 6c 61 74 65 5c 24 45 5c 22  \\translate\$E\"
e0d0: 20 5c 24 2a 2a 20 3e 20 5c 24 40 5c 6e 22 0a 7d   \$** > \$@\n".}
e0e0: 0a 0a 77 72 69 74 65 6c 6e 20 22 5c 22 5c 24 28  ..writeln "\"\$(
e0f0: 4f 58 29 5c 5c 66 6f 73 73 69 6c 2e 72 65 73 5c  OX)\\fossil.res\
e100: 22 20 3a 20 5c 22 5c 24 28 42 29 5c 5c 77 69 6e  " : \"\$(B)\\win
e110: 5c 5c 66 6f 73 73 69 6c 2e 72 63 5c 22 22 0a 77  \\fossil.rc\"".w
e120: 72 69 74 65 6c 6e 20 22 5c 74 5c 24 28 52 43 43  riteln "\t\$(RCC
e130: 29 20 2f 66 6f 20 5c 24 40 20 5c 24 2a 2a 5c 6e  ) /fo \$@ \$**\n
e140: 22 0a 0a 77 72 69 74 65 6c 6e 20 22 5c 22 5c 24  "..writeln "\"\$
e150: 28 4f 58 29 5c 5c 68 65 61 64 65 72 73 5c 22 3a  (OX)\\headers\":
e160: 20 5c 22 5c 24 28 4f 42 4a 44 49 52 29 5c 5c 6d   \"\$(OBJDIR)\\m
e170: 61 6b 65 68 65 61 64 65 72 73 5c 24 45 5c 22 20  akeheaders\$E\" 
e180: 5c 22 5c 24 28 4f 58 29 5c 5c 70 61 67 65 5f 69  \"\$(OX)\\page_i
e190: 6e 64 65 78 2e 68 5c 22 20 5c 22 5c 24 28 4f 58  ndex.h\" \"\$(OX
e1a0: 29 5c 5c 62 75 69 6c 74 69 6e 5f 64 61 74 61 2e  )\\builtin_data.
e1b0: 68 5c 22 20 5c 22 5c 24 28 4f 58 29 5c 5c 56 45  h\" \"\$(OX)\\VE
e1c0: 52 53 49 4f 4e 2e 68 5c 22 22 0a 77 72 69 74 65  RSION.h\"".write
e1d0: 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 5c  ln -nonewline "\
e1e0: 74 5c 22 5c 24 28 4f 42 4a 44 49 52 29 5c 5c 6d  t\"\$(OBJDIR)\\m
e1f0: 61 6b 65 68 65 61 64 65 72 73 5c 24 45 5c 22 20  akeheaders\$E\" 
e200: 22 0a 73 65 74 20 69 20 30 0a 66 6f 72 65 61 63  ".set i 0.foreac
e210: 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d  h s [lsort $src]
e220: 20 7b 0a 20 20 69 66 20 7b 24 69 20 3e 20 30 7d   {.  if {$i > 0}
e230: 20 7b 0a 20 20 20 20 77 72 69 74 65 6c 6e 20 22   {.    writeln "
e240: 20 5c 5c 22 0a 20 20 20 20 77 72 69 74 65 6c 6e   \\".    writeln
e250: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 5c 74 5c   -nonewline "\t\
e260: 74 5c 74 22 0a 20 20 7d 0a 20 20 77 72 69 74 65  t\t".  }.  write
e270: 6c 6e 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 5c  ln -nonewline "\
e280: 22 5c 24 28 4f 58 29 5c 5c 24 7b 73 7d 5f 2e 63  "\$(OX)\\${s}_.c
e290: 5c 22 3a 5c 22 5c 24 28 4f 58 29 5c 5c 24 73 2e  \":\"\$(OX)\\$s.
e2a0: 68 5c 22 22 3b 20 69 6e 63 72 20 69 0a 7d 0a 77  h\""; incr i.}.w
e2b0: 72 69 74 65 6c 6e 20 22 20 5c 5c 5c 6e 5c 74 5c  riteln " \\\n\t\
e2c0: 74 5c 74 5c 22 5c 24 28 53 52 43 44 49 52 29 5c  t\t\"\$(SRCDIR)\
e2d0: 5c 73 71 6c 69 74 65 33 2e 68 5c 22 20 5c 5c 22  \sqlite3.h\" \\"
e2e0: 0a 77 72 69 74 65 6c 6e 20 22 5c 74 5c 74 5c 74  .writeln "\t\t\t
e2f0: 5c 22 5c 24 28 53 52 43 44 49 52 29 5c 5c 74 68  \"\$(SRCDIR)\\th
e300: 2e 68 5c 22 20 5c 5c 22 0a 77 72 69 74 65 6c 6e  .h\" \\".writeln
e310: 20 22 5c 74 5c 74 5c 74 5c 22 5c 24 28 4f 58 29   "\t\t\t\"\$(OX)
e320: 5c 5c 56 45 52 53 49 4f 4e 2e 68 5c 22 20 5c 5c  \\VERSION.h\" \\
e330: 22 0a 77 72 69 74 65 6c 6e 20 22 5c 74 5c 74 5c  ".writeln "\t\t\
e340: 74 5c 22 5c 24 28 53 52 43 44 49 52 29 5c 5c 63  t\"\$(SRCDIR)\\c
e350: 73 6f 6e 5f 61 6d 61 6c 67 61 6d 61 74 69 6f 6e  son_amalgamation
e360: 2e 68 5c 22 22 0a 77 72 69 74 65 6c 6e 20 22 5c  .h\"".writeln "\
e370: 74 40 63 6f 70 79 20 2f 59 20 6e 75 6c 3a 20 24  t@copy /Y nul: $
e380: 40 22 0a 0a 0a 63 6c 6f 73 65 20 24 6f 75 74 70  @"...close $outp
e390: 75 74 5f 66 69 6c 65 0a 23 0a 23 20 45 6e 64 20  ut_file.#.# End 
e3a0: 6f 66 20 74 68 65 20 77 69 6e 2f 4d 61 6b 65 66  of the win/Makef
e3b0: 69 6c 65 2e 6d 73 63 20 6f 75 74 70 75 74 0a 23  ile.msc output.#
e3c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e3d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e3e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e3f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e400: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 23  #############.##
e410: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e420: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e430: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e440: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e450: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 23 23  ############.###
e460: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e470: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e480: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e490: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e4a0: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 42 65  ###########.# Be
e4b0: 67 69 6e 20 77 69 6e 2f 4d 61 6b 65 66 69 6c 65  gin win/Makefile
e4c0: 2e 50 65 6c 6c 65 73 43 47 4d 61 6b 65 20 6f 75  .PellesCGMake ou
e4d0: 74 70 75 74 0a 23 0a 70 75 74 73 20 22 62 75 69  tput.#.puts "bui
e4e0: 6c 64 69 6e 67 20 2e 2e 2f 77 69 6e 2f 4d 61 6b  lding ../win/Mak
e4f0: 65 66 69 6c 65 2e 50 65 6c 6c 65 73 43 47 4d 61  efile.PellesCGMa
e500: 6b 65 22 0a 73 65 74 20 6f 75 74 70 75 74 5f 66  ke".set output_f
e510: 69 6c 65 20 5b 6f 70 65 6e 20 2e 2e 2f 77 69 6e  ile [open ../win
e520: 2f 4d 61 6b 65 66 69 6c 65 2e 50 65 6c 6c 65 73  /Makefile.Pelles
e530: 43 47 4d 61 6b 65 20 77 5d 0a 66 63 6f 6e 66 69  CGMake w].fconfi
e540: 67 75 72 65 20 24 6f 75 74 70 75 74 5f 66 69 6c  gure $output_fil
e550: 65 20 2d 74 72 61 6e 73 6c 61 74 69 6f 6e 20 62  e -translation b
e560: 69 6e 61 72 79 0a 0a 77 72 69 74 65 6c 6e 20 5b  inary..writeln [
e570: 73 74 72 69 6e 67 20 6d 61 70 20 5b 6c 69 73 74  string map [list
e580: 20 5c 0a 20 20 20 20 3c 3c 3c 53 51 4c 49 54 45   \.    <<<SQLITE
e590: 5f 4f 50 54 49 4f 4e 53 3e 3e 3e 20 5b 6a 6f 69  _OPTIONS>>> [joi
e5a0: 6e 20 24 53 51 4c 49 54 45 5f 57 49 4e 33 32 5f  n $SQLITE_WIN32_
e5b0: 4f 50 54 49 4f 4e 53 20 7b 20 7d 5d 20 5c 0a 20  OPTIONS { }] \. 
e5c0: 20 20 20 3c 3c 3c 53 48 45 4c 4c 5f 4f 50 54 49     <<<SHELL_OPTI
e5d0: 4f 4e 53 3e 3e 3e 20 5b 6a 6f 69 6e 20 24 53 48  ONS>>> [join $SH
e5e0: 45 4c 4c 5f 57 49 4e 33 32 5f 4f 50 54 49 4f 4e  ELL_WIN32_OPTION
e5f0: 53 20 7b 20 7d 5d 5d 20 7b 23 0a 23 23 23 23 23  S { }]] {#.#####
e600: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e610: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e620: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e630: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e640: 23 23 23 23 23 23 23 23 23 0a 23 20 57 41 52 4e  #########.# WARN
e650: 49 4e 47 3a 20 44 4f 20 4e 4f 54 20 45 44 49 54  ING: DO NOT EDIT
e660: 2c 20 41 55 54 4f 4d 41 54 49 43 41 4c 4c 59 20  , AUTOMATICALLY 
e670: 47 45 4e 45 52 41 54 45 44 20 46 49 4c 45 20 28  GENERATED FILE (
e680: 53 45 45 20 22 73 72 63 2f 6d 61 6b 65 6d 61 6b  SEE "src/makemak
e690: 65 2e 74 63 6c 22 29 0a 23 23 23 23 23 23 23 23  e.tcl").########
e6a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e6b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e6c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e6d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
e6e0: 23 23 23 23 23 23 0a 23 0a 23 20 54 68 69 73 20  ######.#.# This 
e6f0: 66 69 6c 65 20 69 73 20 61 75 74 6f 6d 61 74 69  file is automati
e700: 63 61 6c 6c 79 20 67 65 6e 65 72 61 74 65 64 2e  cally generated.
e710: 20 20 49 6e 73 74 65 61 64 20 6f 66 20 65 64 69    Instead of edi
e720: 74 69 6e 67 20 74 68 69 73 0a 23 20 66 69 6c 65  ting this.# file
e730: 2c 20 65 64 69 74 20 22 6d 61 6b 65 6d 61 6b 65  , edit "makemake
e740: 2e 74 63 6c 22 20 74 68 65 6e 20 72 75 6e 20 22  .tcl" then run "
e750: 74 63 6c 73 68 20 6d 61 6b 65 6d 61 6b 65 2e 74  tclsh makemake.t
e760: 63 6c 22 0a 23 20 74 6f 20 72 65 67 65 6e 65 72  cl".# to regener
e770: 61 74 65 20 74 68 69 73 20 66 69 6c 65 2e 0a 23  ate this file..#
e780: 0a 23 20 48 6f 77 54 6f 0a 23 20 2d 2d 2d 2d 2d  .# HowTo.# -----
e790: 0a 23 0a 23 20 54 68 69 73 20 69 73 20 61 20 4d  .#.# This is a M
e7a0: 61 6b 65 66 69 6c 65 20 74 6f 20 63 6f 6d 70 69  akefile to compi
e7b0: 6c 65 20 66 6f 73 73 69 6c 20 77 69 74 68 20 50  le fossil with P
e7c0: 65 6c 6c 65 73 43 20 66 72 6f 6d 0a 23 20 20 68  ellesC from.#  h
e7d0: 74 74 70 3a 2f 2f 77 77 77 2e 73 6d 6f 72 67 61  ttp://www.smorga
e7e0: 73 62 6f 72 64 65 74 2e 63 6f 6d 2f 70 65 6c 6c  sbordet.com/pell
e7f0: 65 73 63 2f 69 6e 64 65 78 2e 68 74 6d 0a 23 20  esc/index.htm.# 
e800: 49 6e 20 61 64 64 69 74 69 6f 6e 20 74 6f 20 74  In addition to t
e810: 68 65 20 43 6f 6d 70 69 6c 65 72 20 65 6e 76 72  he Compiler envr
e820: 69 6f 6e 6d 65 6e 74 2c 20 79 6f 75 20 6e 65 65  ionment, you nee
e830: 64 0a 23 20 20 67 6d 61 6b 65 20 66 72 6f 6d 20  d.#  gmake from 
e840: 68 74 74 70 3a 2f 2f 73 6f 75 72 63 65 66 6f 72  http://sourcefor
e850: 67 65 2e 6e 65 74 2f 70 72 6f 6a 65 63 74 73 2f  ge.net/projects/
e860: 75 6e 78 75 74 69 6c 73 2f 2c 20 50 65 6c 6c 65  unxutils/, Pelle
e870: 73 20 6d 61 6b 65 20 76 65 72 73 69 6f 6e 0a 23  s make version.#
e880: 20 20 20 20 20 20 20 20 63 6f 75 6c 64 6e 27 74          couldn't
e890: 20 68 61 6e 64 6c 65 20 74 68 65 20 63 6f 6d 70   handle the comp
e8a0: 6c 65 78 20 64 65 70 65 6e 64 65 6e 63 69 65 73  lex dependencies
e8b0: 20 69 6e 20 74 68 69 73 20 62 75 69 6c 64 0a 23   in this build.#
e8c0: 20 20 7a 6c 69 62 20 73 6f 75 72 63 65 73 0a 23    zlib sources.#
e8d0: 20 54 68 65 6e 20 79 6f 75 20 64 6f 0a 23 20 31   Then you do.# 1
e8e0: 2e 20 63 72 65 61 74 65 20 61 20 64 69 72 65 63  . create a direc
e8f0: 74 6f 72 79 20 50 65 6c 6c 65 73 43 20 69 6e 20  tory PellesC in 
e900: 74 68 65 20 70 72 6f 6a 65 63 74 20 72 6f 6f 74  the project root
e910: 20 64 69 72 65 63 74 6f 72 79 0a 23 20 32 2e 20   directory.# 2. 
e920: 43 68 61 6e 67 65 20 74 68 65 20 76 61 72 69 61  Change the varia
e930: 62 6c 65 73 20 50 65 6c 6c 65 73 43 44 69 72 2f  bles PellesCDir/
e940: 5a 4c 49 42 53 52 43 44 49 52 20 74 6f 20 74 68  ZLIBSRCDIR to th
e950: 65 20 70 61 74 68 20 6f 66 20 79 6f 75 72 20 69  e path of your i
e960: 6e 73 74 61 6c 6c 61 74 69 6f 6e 0a 23 20 33 2e  nstallation.# 3.
e970: 20 6f 70 65 6e 20 61 20 64 6f 73 20 70 72 6f 6d   open a dos prom
e980: 70 74 20 77 69 6e 64 6f 77 20 61 6e 64 20 63 68  pt window and ch
e990: 61 6e 67 65 20 77 6f 72 6b 69 6e 67 20 64 69 72  ange working dir
e9a0: 65 63 74 6f 72 79 20 69 6e 74 6f 20 50 65 6c 6c  ectory into Pell
e9b0: 65 73 43 20 28 73 74 65 70 20 31 29 0a 23 20 34  esC (step 1).# 4
e9c0: 2e 20 72 75 6e 20 67 6d 61 6b 65 20 2d 66 20 2e  . run gmake -f .
e9d0: 2e 5c 77 69 6e 5c 4d 61 6b 65 66 69 6c 65 2e 50  .\win\Makefile.P
e9e0: 65 6c 6c 65 73 43 47 4d 61 6b 65 0a 23 0a 23 20  ellesCGMake.#.# 
e9f0: 74 68 69 73 20 66 69 6c 65 20 69 73 20 74 65 73  this file is tes
ea00: 74 65 64 20 77 69 74 68 0a 23 20 20 20 50 65 6c  ted with.#   Pel
ea10: 6c 65 73 43 20 20 20 20 20 20 20 20 20 35 2e 30  lesC         5.0
ea20: 30 2e 31 33 0a 23 20 20 20 67 6d 61 6b 65 20 20  0.13.#   gmake  
ea30: 20 20 20 20 20 20 20 20 20 33 2e 38 30 0a 23 20           3.80.# 
ea40: 20 20 7a 6c 69 62 20 73 6f 75 72 63 65 73 20 20    zlib sources  
ea50: 20 20 31 2e 32 2e 35 0a 23 20 20 20 57 69 6e 64    1.2.5.#   Wind
ea60: 6f 77 73 20 58 50 20 53 50 20 32 0a 23 20 61 6e  ows XP SP 2.# an
ea70: 64 0a 23 20 20 20 50 65 6c 6c 65 73 43 20 20 20  d.#   PellesC   
ea80: 20 20 20 20 20 20 36 2e 30 30 2e 34 0a 23 20 20        6.00.4.#  
ea90: 20 67 6d 61 6b 65 20 20 20 20 20 20 20 20 20 20   gmake          
eaa0: 20 33 2e 38 30 0a 23 20 20 20 7a 6c 69 62 20 73   3.80.#   zlib s
eab0: 6f 75 72 63 65 73 20 20 20 20 31 2e 32 2e 35 0a  ources    1.2.5.
eac0: 23 20 20 20 57 69 6e 64 6f 77 73 20 37 20 48 6f  #   Windows 7 Ho
ead0: 6d 65 20 50 72 65 6d 69 75 6d 0a 23 0a 0a 23 0a  me Premium.#..#.
eae0: 50 65 6c 6c 65 73 43 44 69 72 3d 63 3a 5c 50 72  PellesCDir=c:\Pr
eaf0: 6f 67 72 61 6d 6d 65 5c 50 65 6c 6c 65 73 43 0a  ogramme\PellesC.
eb00: 0a 23 20 53 65 6c 65 63 74 20 62 65 74 77 65 65  .# Select betwee
eb10: 6e 20 33 32 2f 36 34 20 62 69 74 20 63 6f 64 65  n 32/64 bit code
eb20: 2c 20 64 65 66 61 75 6c 74 20 69 73 20 33 32 20  , default is 32 
eb30: 62 69 74 0a 23 54 41 52 47 45 54 56 45 52 53 49  bit.#TARGETVERSI
eb40: 4f 4e 3d 36 34 0a 0a 69 66 65 71 20 28 24 28 54  ON=64..ifeq ($(T
eb50: 41 52 47 45 54 56 45 52 53 49 4f 4e 29 2c 36 34  ARGETVERSION),64
eb60: 29 0a 23 20 36 34 20 62 69 74 20 76 65 72 73 69  ).# 64 bit versi
eb70: 6f 6e 0a 54 41 52 47 45 54 4d 41 43 48 49 4e 45  on.TARGETMACHINE
eb80: 5f 43 43 3d 61 6d 64 36 34 0a 54 41 52 47 45 54  _CC=amd64.TARGET
eb90: 4d 41 43 48 49 4e 45 5f 4c 4e 3d 61 6d 64 36 34  MACHINE_LN=amd64
eba0: 0a 54 41 52 47 45 54 45 58 54 45 4e 44 3d 36 34  .TARGETEXTEND=64
ebb0: 0a 65 6c 73 65 0a 23 20 33 32 20 62 69 74 20 76  .else.# 32 bit v
ebc0: 65 72 73 69 6f 6e 0a 54 41 52 47 45 54 4d 41 43  ersion.TARGETMAC
ebd0: 48 49 4e 45 5f 43 43 3d 78 38 36 0a 54 41 52 47  HINE_CC=x86.TARG
ebe0: 45 54 4d 41 43 48 49 4e 45 5f 4c 4e 3d 69 78 38  ETMACHINE_LN=ix8
ebf0: 36 0a 54 41 52 47 45 54 45 58 54 45 4e 44 3d 0a  6.TARGETEXTEND=.
ec00: 65 6e 64 69 66 0a 0a 23 20 64 65 66 69 6e 65 20  endif..# define 
ec10: 74 68 65 20 70 72 6f 6a 65 63 74 20 64 69 72 65  the project dire
ec20: 63 74 6f 72 69 65 73 0a 42 3d 2e 2e 0a 53 52 43  ctories.B=...SRC
ec30: 44 49 52 3d 24 28 42 29 2f 73 72 63 2f 0a 57 49  DIR=$(B)/src/.WI
ec40: 4e 44 49 52 3d 24 28 42 29 2f 77 69 6e 2f 0a 5a  NDIR=$(B)/win/.Z
ec50: 4c 49 42 53 52 43 44 49 52 3d 2e 2e 2f 2e 2e 2f  LIBSRCDIR=../../
ec60: 7a 6c 69 62 2f 0a 0a 23 20 64 65 66 69 6e 65 20  zlib/..# define 
ec70: 6c 69 6e 6b 65 72 20 63 6f 6d 6d 61 6e 64 20 61  linker command a
ec80: 6e 64 20 6f 70 74 69 6f 6e 73 0a 4c 49 4e 4b 3d  nd options.LINK=
ec90: 24 28 50 65 6c 6c 65 73 43 44 69 72 29 2f 62 69  $(PellesCDir)/bi
eca0: 6e 2f 70 6f 6c 69 6e 6b 2e 65 78 65 0a 4c 49 4e  n/polink.exe.LIN
ecb0: 4b 46 4c 41 47 53 3d 2d 73 75 62 73 79 73 74 65  KFLAGS=-subsyste
ecc0: 6d 3a 63 6f 6e 73 6f 6c 65 20 2d 6d 61 63 68 69  m:console -machi
ecd0: 6e 65 3a 24 28 54 41 52 47 45 54 4d 41 43 48 49  ne:$(TARGETMACHI
ece0: 4e 45 5f 4c 4e 29 20 2f 4c 49 42 50 41 54 48 3a  NE_LN) /LIBPATH:
ecf0: 24 28 50 65 6c 6c 65 73 43 44 69 72 29 5c 6c 69  $(PellesCDir)\li
ed00: 62 5c 77 69 6e 24 28 54 41 52 47 45 54 45 58 54  b\win$(TARGETEXT
ed10: 45 4e 44 29 20 2f 4c 49 42 50 41 54 48 3a 24 28  END) /LIBPATH:$(
ed20: 50 65 6c 6c 65 73 43 44 69 72 29 5c 6c 69 62 20  PellesCDir)\lib 
ed30: 6b 65 72 6e 65 6c 33 32 2e 6c 69 62 20 61 64 76  kernel32.lib adv
ed40: 61 70 69 33 32 2e 6c 69 62 20 64 65 6c 61 79 69  api32.lib delayi
ed50: 6d 70 24 28 54 41 52 47 45 54 45 58 54 45 4e 44  mp$(TARGETEXTEND
ed60: 29 2e 6c 69 62 20 57 73 6f 63 6b 33 32 2e 6c 69  ).lib Wsock32.li
ed70: 62 20 64 6e 73 61 70 69 2e 6c 69 62 20 43 72 74  b dnsapi.lib Crt
ed80: 6d 74 24 28 54 41 52 47 45 54 45 58 54 45 4e 44  mt$(TARGETEXTEND
ed90: 29 2e 6c 69 62 0a 0a 23 20 64 65 66 69 6e 65 20  ).lib..# define 
eda0: 73 74 61 6e 64 61 72 64 20 43 2d 63 6f 6d 70 69  standard C-compi
edb0: 6c 65 72 20 61 6e 64 20 66 6c 61 67 73 2c 20 75  ler and flags, u
edc0: 73 65 64 20 74 6f 20 63 6f 6d 70 69 6c 65 0a 23  sed to compile.#
edd0: 20 74 68 65 20 66 6f 73 73 69 6c 20 62 69 6e 61   the fossil bina
ede0: 72 79 2e 20 53 6f 6d 65 20 73 70 65 63 69 61 6c  ry. Some special
edf0: 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 66 6f 6c   definitions fol
ee00: 6c 6f 77 20 66 6f 72 0a 23 20 73 70 65 63 69 61  low for.# specia
ee10: 6c 20 66 69 6c 65 73 20 66 6f 6c 6c 6f 77 0a 43  l files follow.C
ee20: 43 3d 24 28 50 65 6c 6c 65 73 43 44 69 72 29 5c  C=$(PellesCDir)\
ee30: 62 69 6e 5c 70 6f 63 63 2e 65 78 65 0a 44 45 46  bin\pocc.exe.DEF
ee40: 49 4e 45 53 3d 2d 44 5f 70 67 6d 70 74 72 3d 67  INES=-D_pgmptr=g
ee50: 2e 61 72 67 76 5b 30 5d 0a 43 43 46 4c 41 47 53  .argv[0].CCFLAGS
ee60: 3d 2d 54 24 28 54 41 52 47 45 54 4d 41 43 48 49  =-T$(TARGETMACHI
ee70: 4e 45 5f 43 43 29 2d 63 6f 66 66 20 2d 4f 74 20  NE_CC)-coff -Ot 
ee80: 2d 57 32 20 2d 47 64 20 2d 47 6f 20 2d 5a 65 20  -W2 -Gd -Go -Ze 
ee90: 2d 4d 54 20 24 28 44 45 46 49 4e 45 53 29 0a 49  -MT $(DEFINES).I
eea0: 4e 43 4c 55 44 45 3d 2f 49 20 24 28 50 65 6c 6c  NCLUDE=/I $(Pell
eeb0: 65 73 43 44 69 72 29 5c 49 6e 63 6c 75 64 65 5c  esCDir)\Include\
eec0: 57 69 6e 20 2f 49 20 24 28 50 65 6c 6c 65 73 43  Win /I $(PellesC
eed0: 44 69 72 29 5c 49 6e 63 6c 75 64 65 20 2f 49 20  Dir)\Include /I 
eee0: 24 28 5a 4c 49 42 53 52 43 44 49 52 29 20 2f 49  $(ZLIBSRCDIR) /I
eef0: 20 24 28 53 52 43 44 49 52 29 0a 0a 23 20 64 65   $(SRCDIR)..# de
ef00: 66 69 6e 65 20 63 6f 6d 6d 61 6e 64 73 20 66 6f  fine commands fo
ef10: 72 20 62 75 69 6c 64 69 6e 67 20 74 68 65 20 77  r building the w
ef20: 69 6e 64 6f 77 73 20 72 65 73 6f 75 72 63 65 20  indows resource 
ef30: 66 69 6c 65 73 0a 52 45 53 4f 55 52 43 45 3d 66  files.RESOURCE=f
ef40: 6f 73 73 69 6c 2e 72 65 73 0a 52 43 3d 24 28 50  ossil.res.RC=$(P
ef50: 65 6c 6c 65 73 43 44 69 72 29 5c 62 69 6e 5c 70  ellesCDir)\bin\p
ef60: 6f 72 63 2e 65 78 65 0a 52 43 46 4c 41 47 53 3d  orc.exe.RCFLAGS=
ef70: 24 28 49 4e 43 4c 55 44 45 29 20 2d 44 5f 5f 50  $(INCLUDE) -D__P
ef80: 4f 43 43 5f 5f 3d 31 20 2d 44 5f 4d 5f 58 24 28  OCC__=1 -D_M_X$(
ef90: 54 41 52 47 45 54 56 45 52 53 49 4f 4e 29 0a 0a  TARGETVERSION)..
efa0: 23 20 64 65 66 69 6e 65 20 74 68 65 20 73 70 65  # define the spe
efb0: 63 69 61 6c 20 75 74 69 6c 69 74 69 65 73 20 66  cial utilities f
efc0: 69 6c 65 73 2c 20 6e 65 65 64 65 64 20 74 6f 20  iles, needed to 
efd0: 67 65 6e 65 72 61 74 65 0a 23 20 74 68 65 20 61  generate.# the a
efe0: 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 67 65 6e  utomatically gen
eff0: 65 72 61 74 65 64 20 73 6f 75 72 63 65 20 66 69  erated source fi
f000: 6c 65 73 0a 55 54 49 4c 53 3d 74 72 61 6e 73 6c  les.UTILS=transl
f010: 61 74 65 2e 65 78 65 20 6d 6b 69 6e 64 65 78 2e  ate.exe mkindex.
f020: 65 78 65 20 6d 61 6b 65 68 65 61 64 65 72 73 2e  exe makeheaders.
f030: 65 78 65 20 6d 6b 62 75 69 6c 74 69 6e 2e 65 78  exe mkbuiltin.ex
f040: 65 0a 55 54 49 4c 53 5f 4f 42 4a 3d 24 28 55 54  e.UTILS_OBJ=$(UT
f050: 49 4c 53 3a 2e 65 78 65 3d 2e 6f 62 6a 29 0a 55  ILS:.exe=.obj).U
f060: 54 49 4c 53 5f 53 52 43 3d 24 28 66 6f 72 65 61  TILS_SRC=$(forea
f070: 63 68 20 75 66 2c 24 28 55 54 49 4c 53 29 2c 24  ch uf,$(UTILS),$
f080: 28 53 52 43 44 49 52 29 24 28 75 66 3a 2e 65 78  (SRCDIR)$(uf:.ex
f090: 65 3d 2e 63 29 29 0a 0a 23 20 64 65 66 69 6e 65  e=.c))..# define
f0a0: 20 74 68 65 20 53 51 4c 69 74 65 20 66 69 6c 65   the SQLite file
f0b0: 73 2c 20 77 68 69 63 68 20 6e 65 65 64 20 73 70  s, which need sp
f0c0: 65 63 69 61 6c 20 66 6c 61 67 73 20 6f 6e 20 63  ecial flags on c
f0d0: 6f 6d 70 69 6c 65 0a 53 51 4c 49 54 45 53 52 43  ompile.SQLITESRC
f0e0: 3d 73 71 6c 69 74 65 33 2e 63 0a 4f 52 49 47 53  =sqlite3.c.ORIGS
f0f0: 51 4c 49 54 45 53 52 43 3d 24 28 66 6f 72 65 61  QLITESRC=$(forea
f100: 63 68 20 73 66 2c 24 28 53 51 4c 49 54 45 53 52  ch sf,$(SQLITESR
f110: 43 29 2c 24 28 53 52 43 44 49 52 29 24 28 73 66  C),$(SRCDIR)$(sf
f120: 29 29 0a 53 51 4c 49 54 45 4f 42 4a 3d 24 28 66  )).SQLITEOBJ=$(f
f130: 6f 72 65 61 63 68 20 73 66 2c 24 28 53 51 4c 49  oreach sf,$(SQLI
f140: 54 45 53 52 43 29 2c 24 28 73 66 3a 2e 63 3d 2e  TESRC),$(sf:.c=.
f150: 6f 62 6a 29 29 0a 53 51 4c 49 54 45 44 45 46 49  obj)).SQLITEDEFI
f160: 4e 45 53 3d 3c 3c 3c 53 51 4c 49 54 45 5f 4f 50  NES=<<<SQLITE_OP
f170: 54 49 4f 4e 53 3e 3e 3e 0a 0a 23 20 64 65 66 69  TIONS>>>..# defi
f180: 6e 65 20 74 68 65 20 53 51 4c 69 74 65 20 73 68  ne the SQLite sh
f190: 65 6c 6c 20 66 69 6c 65 73 2c 20 77 68 69 63 68  ell files, which
f1a0: 20 6e 65 65 64 20 73 70 65 63 69 61 6c 20 66 6c   need special fl
f1b0: 61 67 73 20 6f 6e 20 63 6f 6d 70 69 6c 65 0a 53  ags on compile.S
f1c0: 51 4c 49 54 45 53 48 45 4c 4c 53 52 43 3d 73 68  QLITESHELLSRC=sh
f1d0: 65 6c 6c 2e 63 0a 4f 52 49 47 53 51 4c 49 54 45  ell.c.ORIGSQLITE
f1e0: 53 48 45 4c 4c 53 52 43 3d 24 28 66 6f 72 65 61  SHELLSRC=$(forea
f1f0: 63 68 20 73 66 2c 24 28 53 51 4c 49 54 45 53 48  ch sf,$(SQLITESH
f200: 45 4c 4c 53 52 43 29 2c 24 28 53 52 43 44 49 52  ELLSRC),$(SRCDIR
f210: 29 24 28 73 66 29 29 0a 53 51 4c 49 54 45 53 48  )$(sf)).SQLITESH
f220: 45 4c 4c 4f 42 4a 3d 24 28 66 6f 72 65 61 63 68  ELLOBJ=$(foreach
f230: 20 73 66 2c 24 28 53 51 4c 49 54 45 53 48 45 4c   sf,$(SQLITESHEL
f240: 4c 53 52 43 29 2c 24 28 73 66 3a 2e 63 3d 2e 6f  LSRC),$(sf:.c=.o
f250: 62 6a 29 29 0a 53 51 4c 49 54 45 53 48 45 4c 4c  bj)).SQLITESHELL
f260: 44 45 46 49 4e 45 53 3d 3c 3c 3c 53 48 45 4c 4c  DEFINES=<<<SHELL
f270: 5f 4f 50 54 49 4f 4e 53 3e 3e 3e 0a 0a 23 20 64  _OPTIONS>>>..# d
f280: 65 66 69 6e 65 20 74 68 65 20 74 68 20 73 63 72  efine the th scr
f290: 69 70 74 69 6e 67 20 66 69 6c 65 73 2c 20 77 68  ipting files, wh
f2a0: 69 63 68 20 6e 65 65 64 20 73 70 65 63 69 61 6c  ich need special
f2b0: 20 66 6c 61 67 73 20 6f 6e 20 63 6f 6d 70 69 6c   flags on compil
f2c0: 65 0a 54 48 53 52 43 3d 74 68 2e 63 20 74 68 5f  e.THSRC=th.c th_
f2d0: 6c 61 6e 67 2e 63 0a 4f 52 49 47 54 48 53 52 43  lang.c.ORIGTHSRC
f2e0: 3d 24 28 66 6f 72 65 61 63 68 20 73 66 2c 24 28  =$(foreach sf,$(
f2f0: 54 48 53 52 43 29 2c 24 28 53 52 43 44 49 52 29  THSRC),$(SRCDIR)
f300: 24 28 73 66 29 29 0a 54 48 4f 42 4a 3d 24 28 66  $(sf)).THOBJ=$(f
f310: 6f 72 65 61 63 68 20 73 66 2c 24 28 54 48 53 52  oreach sf,$(THSR
f320: 43 29 2c 24 28 73 66 3a 2e 63 3d 2e 6f 62 6a 29  C),$(sf:.c=.obj)
f330: 29 0a 0a 23 20 64 65 66 69 6e 65 20 74 68 65 20  )..# define the 
f340: 7a 6c 69 62 20 66 69 6c 65 73 2c 20 6e 65 65 64  zlib files, need
f350: 65 64 20 62 79 20 74 68 69 73 20 63 6f 6d 70 69  ed by this compi
f360: 6c 65 0a 5a 4c 49 42 53 52 43 3d 61 64 6c 65 72  le.ZLIBSRC=adler
f370: 33 32 2e 63 20 63 6f 6d 70 72 65 73 73 2e 63 20  32.c compress.c 
f380: 63 72 63 33 32 2e 63 20 64 65 66 6c 61 74 65 2e  crc32.c deflate.
f390: 63 20 67 7a 63 6c 6f 73 65 2e 63 20 67 7a 6c 69  c gzclose.c gzli
f3a0: 62 2e 63 20 67 7a 72 65 61 64 2e 63 20 67 7a 77  b.c gzread.c gzw
f3b0: 72 69 74 65 2e 63 20 69 6e 66 62 61 63 6b 2e 63  rite.c infback.c
f3c0: 20 69 6e 66 66 61 73 74 2e 63 20 69 6e 66 6c 61   inffast.c infla
f3d0: 74 65 2e 63 20 69 6e 66 74 72 65 65 73 2e 63 20  te.c inftrees.c 
f3e0: 74 72 65 65 73 2e 63 20 75 6e 63 6f 6d 70 72 2e  trees.c uncompr.
f3f0: 63 20 7a 75 74 69 6c 2e 63 0a 4f 52 49 47 5a 4c  c zutil.c.ORIGZL
f400: 49 42 53 52 43 3d 24 28 66 6f 72 65 61 63 68 20  IBSRC=$(foreach 
f410: 73 66 2c 24 28 5a 4c 49 42 53 52 43 29 2c 24 28  sf,$(ZLIBSRC),$(
f420: 5a 4c 49 42 53 52 43 44 49 52 29 24 28 73 66 29  ZLIBSRCDIR)$(sf)
f430: 29 0a 5a 4c 49 42 4f 42 4a 3d 24 28 66 6f 72 65  ).ZLIBOBJ=$(fore
f440: 61 63 68 20 73 66 2c 24 28 5a 4c 49 42 53 52 43  ach sf,$(ZLIBSRC
f450: 29 2c 24 28 73 66 3a 2e 63 3d 2e 6f 62 6a 29 29  ),$(sf:.c=.obj))
f460: 0a 0a 23 20 64 65 66 69 6e 65 20 61 6c 6c 20 66  ..# define all f
f470: 6f 73 73 69 6c 20 73 6f 75 72 63 65 73 2c 20 75  ossil sources, u
f480: 73 69 6e 67 20 74 68 65 20 73 74 61 6e 64 61 72  sing the standar
f490: 64 20 63 6f 6d 70 69 6c 65 20 61 6e 64 0a 23 20  d compile and.# 
f4a0: 73 6f 75 72 63 65 20 67 65 6e 65 72 61 74 69 6f  source generatio
f4b0: 6e 2e 20 54 68 65 73 65 20 61 72 65 20 61 6c 6c  n. These are all
f4c0: 20 66 69 6c 65 73 20 69 6e 20 53 52 43 44 49 52   files in SRCDIR
f4d0: 2c 20 77 68 69 63 68 20 61 72 65 20 6e 6f 74 0a  , which are not.
f4e0: 23 20 6d 65 6e 74 69 6f 6e 65 64 20 61 73 20 73  # mentioned as s
f4f0: 70 65 63 69 61 6c 20 66 69 6c 65 73 20 61 62 6f  pecial files abo
f500: 76 65 3a 0a 4f 52 49 47 53 52 43 3d 24 28 66 69  ve:.ORIGSRC=$(fi
f510: 6c 74 65 72 2d 6f 75 74 20 24 28 55 54 49 4c 53  lter-out $(UTILS
f520: 5f 53 52 43 29 20 24 28 4f 52 49 47 54 48 53 52  _SRC) $(ORIGTHSR
f530: 43 29 20 24 28 4f 52 49 47 53 51 4c 49 54 45 53  C) $(ORIGSQLITES
f540: 52 43 29 20 24 28 4f 52 49 47 53 51 4c 49 54 45  RC) $(ORIGSQLITE
f550: 53 48 45 4c 4c 53 52 43 29 2c 24 28 77 69 6c 64  SHELLSRC),$(wild
f560: 63 61 72 64 20 24 28 53 52 43 44 49 52 29 2a 2e  card $(SRCDIR)*.
f570: 63 29 29 0a 53 52 43 3d 24 28 73 75 62 73 74 20  c)).SRC=$(subst 
f580: 24 28 53 52 43 44 49 52 29 2c 2c 24 28 4f 52 49  $(SRCDIR),,$(ORI
f590: 47 53 52 43 29 29 0a 54 52 41 4e 53 4c 41 54 45  GSRC)).TRANSLATE
f5a0: 44 53 52 43 3d 24 28 53 52 43 3a 2e 63 3d 5f 2e  DSRC=$(SRC:.c=_.
f5b0: 63 29 0a 54 52 41 4e 53 4c 41 54 45 44 4f 42 4a  c).TRANSLATEDOBJ
f5c0: 3d 24 28 54 52 41 4e 53 4c 41 54 45 44 53 52 43  =$(TRANSLATEDSRC
f5d0: 3a 2e 63 3d 2e 6f 62 6a 29 0a 0a 23 20 6d 61 69  :.c=.obj)..# mai
f5e0: 6e 20 74 61 72 67 65 74 20 66 69 6c 65 20 69 73  n target file is
f5f0: 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e   the application
f600: 0a 41 50 50 4c 49 43 41 54 49 4f 4e 3d 66 6f 73  .APPLICATION=fos
f610: 73 69 6c 2e 65 78 65 0a 0a 23 20 64 65 66 69 6e  sil.exe..# defin
f620: 65 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 6d  e the standard m
f630: 61 6b 65 20 74 61 72 67 65 74 0a 2e 50 48 4f 4e  ake target..PHON
f640: 59 3a 09 64 65 66 61 75 6c 74 0a 64 65 66 61 75  Y:.default.defau
f650: 6c 74 3a 09 70 61 67 65 5f 69 6e 64 65 78 2e 68  lt:.page_index.h
f660: 20 62 75 69 6c 74 69 6e 5f 64 61 74 61 2e 68 20   builtin_data.h 
f670: 68 65 61 64 65 72 73 20 24 28 41 50 50 4c 49 43  headers $(APPLIC
f680: 41 54 49 4f 4e 29 0a 0a 23 20 73 79 6d 62 6f 6c  ATION)..# symbol
f690: 69 63 20 74 61 72 67 65 74 20 74 6f 20 67 65 6e  ic target to gen
f6a0: 65 72 61 74 65 20 74 68 65 20 73 6f 75 72 63 65  erate the source
f6b0: 20 67 65 6e 65 72 61 74 65 20 75 74 69 6c 73 0a   generate utils.
f6c0: 2e 50 48 4f 4e 59 3a 09 75 74 69 6c 73 0a 75 74  .PHONY:.utils.ut
f6d0: 69 6c 73 3a 09 24 28 55 54 49 4c 53 29 0a 0a 23  ils:.$(UTILS)..#
f6e0: 20 6c 69 6e 6b 20 75 74 69 6c 73 0a 24 28 55 54   link utils.$(UT
f6f0: 49 4c 53 29 20 76 65 72 73 69 6f 6e 2e 65 78 65  ILS) version.exe
f700: 3a 09 25 2e 65 78 65 3a 09 25 2e 6f 62 6a 0a 09  :.%.exe:.%.obj..
f710: 24 28 4c 49 4e 4b 29 20 24 28 4c 49 4e 4b 46 4c  $(LINK) $(LINKFL
f720: 41 47 53 29 20 2d 6f 75 74 3a 22 24 40 22 20 24  AGS) -out:"$@" $
f730: 3c 0a 0a 23 20 63 6f 6d 70 69 6c 69 6e 67 20 73  <..# compiling s
f740: 74 61 6e 64 61 72 64 20 66 6f 73 73 69 6c 20 75  tandard fossil u
f750: 74 69 6c 73 0a 24 28 55 54 49 4c 53 5f 4f 42 4a  tils.$(UTILS_OBJ
f760: 29 3a 09 25 2e 6f 62 6a 3a 09 24 28 53 52 43 44  ):.%.obj:.$(SRCD
f770: 49 52 29 25 2e 63 0a 09 24 28 43 43 29 20 24 28  IR)%.c..$(CC) $(
f780: 43 43 46 4c 41 47 53 29 20 24 28 49 4e 43 4c 55  CCFLAGS) $(INCLU
f790: 44 45 29 20 22 24 3c 22 20 2d 46 6f 22 24 40 22  DE) "$<" -Fo"$@"
f7a0: 0a 0a 23 20 63 6f 6d 70 69 6c 65 20 73 70 65 63  ..# compile spec
f7b0: 69 61 6c 20 77 69 6e 64 6f 77 73 20 75 74 69 6c  ial windows util
f7c0: 73 0a 76 65 72 73 69 6f 6e 2e 6f 62 6a 3a 09 24  s.version.obj:.$
f7d0: 28 53 52 43 44 49 52 29 6d 6b 76 65 72 73 69 6f  (SRCDIR)mkversio
f7e0: 6e 2e 63 0a 09 24 28 43 43 29 20 24 28 43 43 46  n.c..$(CC) $(CCF
f7f0: 4c 41 47 53 29 20 24 28 49 4e 43 4c 55 44 45 29  LAGS) $(INCLUDE)
f800: 20 22 24 3c 22 20 2d 46 6f 22 24 40 22 0a 0a 23   "$<" -Fo"$@"..#
f810: 20 67 65 6e 65 72 61 74 65 20 74 68 65 20 74 72   generate the tr
f820: 61 6e 73 6c 61 74 65 64 20 63 2d 73 6f 75 72 63  anslated c-sourc
f830: 65 20 66 69 6c 65 73 0a 24 28 54 52 41 4e 53 4c  e files.$(TRANSL
f840: 41 54 45 44 53 52 43 29 3a 09 25 5f 2e 63 3a 09  ATEDSRC):.%_.c:.
f850: 24 28 53 52 43 44 49 52 29 25 2e 63 20 74 72 61  $(SRCDIR)%.c tra
f860: 6e 73 6c 61 74 65 2e 65 78 65 0a 09 74 72 61 6e  nslate.exe..tran
f870: 73 6c 61 74 65 2e 65 78 65 20 24 3c 20 3e 24 40  slate.exe $< >$@
f880: 0a 0a 23 20 67 65 6e 65 72 61 74 65 20 74 68 65  ..# generate the
f890: 20 69 6e 64 65 78 20 73 6f 75 72 63 65 2c 20 63   index source, c
f8a0: 6f 6e 74 61 69 6e 69 6e 67 20 61 6c 6c 20 77 65  ontaining all we
f8b0: 62 20 72 65 66 65 72 65 6e 63 65 73 2c 2e 2e 0a  b references,...
f8c0: 70 61 67 65 5f 69 6e 64 65 78 2e 68 3a 09 24 28  page_index.h:.$(
f8d0: 54 52 41 4e 53 4c 41 54 45 44 53 52 43 29 20 6d  TRANSLATEDSRC) m
f8e0: 6b 69 6e 64 65 78 2e 65 78 65 0a 09 6d 6b 69 6e  kindex.exe..mkin
f8f0: 64 65 78 2e 65 78 65 20 24 28 54 52 41 4e 53 4c  dex.exe $(TRANSL
f900: 41 54 45 44 53 52 43 29 20 3e 24 40 0a 0a 62 75  ATEDSRC) >$@..bu
f910: 69 6c 74 69 6e 5f 64 61 74 61 2e 68 3a 09 24 28  iltin_data.h:.$(
f920: 45 58 54 52 41 5f 46 49 4c 45 53 29 20 6d 6b 62  EXTRA_FILES) mkb
f930: 75 69 6c 74 69 6e 2e 65 78 65 0a 09 6d 6b 62 75  uiltin.exe..mkbu
f940: 69 6c 74 69 6e 2e 65 78 65 20 2d 2d 70 72 65 66  iltin.exe --pref
f950: 69 78 20 24 28 53 52 43 44 49 52 29 2f 20 24 28  ix $(SRCDIR)/ $(
f960: 45 58 54 52 41 5f 46 49 4c 45 53 29 20 3e 24 40  EXTRA_FILES) >$@
f970: 0a 0a 23 20 65 78 74 72 61 63 74 69 6e 67 20 76  ..# extracting v
f980: 65 72 73 69 6f 6e 20 69 6e 66 6f 20 66 72 6f 6d  ersion info from
f990: 20 6d 61 6e 69 66 65 73 74 0a 56 45 52 53 49 4f   manifest.VERSIO
f9a0: 4e 2e 68 3a 09 76 65 72 73 69 6f 6e 2e 65 78 65  N.h:.version.exe
f9b0: 20 2e 2e 5c 6d 61 6e 69 66 65 73 74 2e 75 75 69   ..\manifest.uui
f9c0: 64 20 2e 2e 5c 6d 61 6e 69 66 65 73 74 20 2e 2e  d ..\manifest ..
f9d0: 5c 56 45 52 53 49 4f 4e 0a 09 76 65 72 73 69 6f  \VERSION..versio
f9e0: 6e 2e 65 78 65 20 2e 2e 5c 6d 61 6e 69 66 65 73  n.exe ..\manifes
f9f0: 74 2e 75 75 69 64 20 2e 2e 5c 6d 61 6e 69 66 65  t.uuid ..\manife
fa00: 73 74 20 2e 2e 5c 56 45 52 53 49 4f 4e 20 20 3e  st ..\VERSION  >
fa10: 24 40 0a 0a 23 20 67 65 6e 65 72 61 74 65 20 74  $@..# generate t
fa20: 68 65 20 73 69 6d 70 6c 69 66 69 65 64 20 68 65  he simplified he
fa30: 61 64 65 72 73 0a 68 65 61 64 65 72 73 3a 20 6d  aders.headers: m
fa40: 61 6b 65 68 65 61 64 65 72 73 2e 65 78 65 20 70  akeheaders.exe p
fa50: 61 67 65 5f 69 6e 64 65 78 2e 68 20 62 75 69 6c  age_index.h buil
fa60: 74 69 6e 5f 64 61 74 61 2e 68 20 56 45 52 53 49  tin_data.h VERSI
fa70: 4f 4e 2e 68 20 2e 2e 2f 73 72 63 2f 73 71 6c 69  ON.h ../src/sqli
fa80: 74 65 33 2e 68 20 2e 2e 2f 73 72 63 2f 74 68 2e  te3.h ../src/th.
fa90: 68 0a 09 6d 61 6b 65 68 65 61 64 65 72 73 2e 65  h..makeheaders.e
faa0: 78 65 20 24 28 66 6f 72 65 61 63 68 20 74 73 2c  xe $(foreach ts,
fab0: 24 28 54 52 41 4e 53 4c 41 54 45 44 53 52 43 29  $(TRANSLATEDSRC)
fac0: 2c 24 28 74 73 29 3a 24 28 74 73 3a 5f 2e 63 3d  ,$(ts):$(ts:_.c=
fad0: 2e 68 29 29 20 2e 2e 2f 73 72 63 2f 73 71 6c 69  .h)) ../src/sqli
fae0: 74 65 33 2e 68 20 2e 2e 2f 73 72 63 2f 74 68 2e  te3.h ../src/th.
faf0: 68 20 56 45 52 53 49 4f 4e 2e 68 0a 09 65 63 68  h VERSION.h..ech
fb00: 6f 20 44 6f 6e 65 20 3e 24 40 0a 0a 23 20 63 6f  o Done >$@..# co
fb10: 6d 70 69 6c 65 20 43 20 73 6f 75 72 63 65 73 20  mpile C sources 
fb20: 77 69 74 68 20 72 65 6c 65 76 61 6e 74 20 6f 70  with relevant op
fb30: 74 69 6f 6e 73 0a 0a 24 28 54 52 41 4e 53 4c 41  tions..$(TRANSLA
fb40: 54 45 44 4f 42 4a 29 3a 09 25 5f 2e 6f 62 6a 3a  TEDOBJ):.%_.obj:
fb50: 09 25 5f 2e 63 20 25 2e 68 0a 09 24 28 43 43 29  .%_.c %.h..$(CC)
fb60: 20 24 28 43 43 46 4c 41 47 53 29 20 24 28 49 4e   $(CCFLAGS) $(IN
fb70: 43 4c 55 44 45 29 20 22 24 3c 22 20 2d 46 6f 22  CLUDE) "$<" -Fo"
fb80: 24 40 22 0a 0a 24 28 53 51 4c 49 54 45 4f 42 4a  $@"..$(SQLITEOBJ
fb90: 29 3a 09 25 2e 6f 62 6a 3a 09 24 28 53 52 43 44  ):.%.obj:.$(SRCD
fba0: 49 52 29 25 2e 63 20 24 28 53 52 43 44 49 52 29  IR)%.c $(SRCDIR)
fbb0: 25 2e 68 0a 09 24 28 43 43 29 20 24 28 43 43 46  %.h..$(CC) $(CCF
fbc0: 4c 41 47 53 29 20 24 28 53 51 4c 49 54 45 44 45  LAGS) $(SQLITEDE
fbd0: 46 49 4e 45 53 29 20 24 28 49 4e 43 4c 55 44 45  FINES) $(INCLUDE
fbe0: 29 20 22 24 3c 22 20 2d 46 6f 22 24 40 22 0a 0a  ) "$<" -Fo"$@"..
fbf0: 24 28 53 51 4c 49 54 45 53 48 45 4c 4c 4f 42 4a  $(SQLITESHELLOBJ
fc00: 29 3a 09 25 2e 6f 62 6a 3a 09 24 28 53 52 43 44  ):.%.obj:.$(SRCD
fc10: 49 52 29 25 2e 63 0a 09 24 28 43 43 29 20 24 28  IR)%.c..$(CC) $(
fc20: 43 43 46 4c 41 47 53 29 20 24 28 53 51 4c 49 54  CCFLAGS) $(SQLIT
fc30: 45 53 48 45 4c 4c 44 45 46 49 4e 45 53 29 20 24  ESHELLDEFINES) $
fc40: 28 49 4e 43 4c 55 44 45 29 20 22 24 3c 22 20 2d  (INCLUDE) "$<" -
fc50: 46 6f 22 24 40 22 0a 0a 24 28 54 48 4f 42 4a 29  Fo"$@"..$(THOBJ)
fc60: 3a 09 25 2e 6f 62 6a 3a 09 24 28 53 52 43 44 49  :.%.obj:.$(SRCDI
fc70: 52 29 25 2e 63 20 24 28 53 52 43 44 49 52 29 74  R)%.c $(SRCDIR)t
fc80: 68 2e 68 0a 09 24 28 43 43 29 20 24 28 43 43 46  h.h..$(CC) $(CCF
fc90: 4c 41 47 53 29 20 24 28 49 4e 43 4c 55 44 45 29  LAGS) $(INCLUDE)
fca0: 20 22 24 3c 22 20 2d 46 6f 22 24 40 22 0a 0a 24   "$<" -Fo"$@"..$
fcb0: 28 5a 4c 49 42 4f 42 4a 29 3a 09 25 2e 6f 62 6a  (ZLIBOBJ):.%.obj
fcc0: 3a 09 24 28 5a 4c 49 42 53 52 43 44 49 52 29 25  :.$(ZLIBSRCDIR)%
fcd0: 2e 63 0a 09 24 28 43 43 29 20 24 28 43 43 46 4c  .c..$(CC) $(CCFL
fce0: 41 47 53 29 20 24 28 49 4e 43 4c 55 44 45 29 20  AGS) $(INCLUDE) 
fcf0: 22 24 3c 22 20 2d 46 6f 22 24 40 22 0a 0a 23 20  "$<" -Fo"$@"..# 
fd00: 63 72 65 61 74 65 20 74 68 65 20 77 69 6e 64 6f  create the windo
fd10: 77 73 20 72 65 73 6f 75 72 63 65 20 77 69 74 68  ws resource with
fd20: 20 69 63 6f 6e 20 61 6e 64 20 76 65 72 73 69 6f   icon and versio
fd30: 6e 20 69 6e 66 6f 0a 24 28 52 45 53 4f 55 52 43  n info.$(RESOURC
fd40: 45 29 3a 09 25 2e 72 65 73 3a 09 2e 2e 2f 77 69  E):.%.res:.../wi
fd50: 6e 2f 25 2e 72 63 20 2e 2e 2f 77 69 6e 2f 2a 2e  n/%.rc ../win/*.
fd60: 69 63 6f 0a 09 24 28 52 43 29 20 24 28 52 43 46  ico..$(RC) $(RCF
fd70: 4c 41 47 53 29 20 24 3c 20 2d 46 6f 22 24 40 22  LAGS) $< -Fo"$@"
fd80: 0a 0a 23 20 6c 69 6e 6b 20 74 68 65 20 61 70 70  ..# link the app
fd90: 6c 69 63 61 74 69 6f 6e 0a 24 28 41 50 50 4c 49  lication.$(APPLI
fda0: 43 41 54 49 4f 4e 29 3a 09 24 28 54 52 41 4e 53  CATION):.$(TRANS
fdb0: 4c 41 54 45 44 4f 42 4a 29 20 24 28 53 51 4c 49  LATEDOBJ) $(SQLI
fdc0: 54 45 4f 42 4a 29 20 24 28 53 51 4c 49 54 45 53  TEOBJ) $(SQLITES
fdd0: 48 45 4c 4c 4f 42 4a 29 20 24 28 54 48 4f 42 4a  HELLOBJ) $(THOBJ
fde0: 29 20 24 28 5a 4c 49 42 4f 42 4a 29 20 68 65 61  ) $(ZLIBOBJ) hea
fdf0: 64 65 72 73 20 24 28 52 45 53 4f 55 52 43 45 29  ders $(RESOURCE)
fe00: 0a 09 24 28 4c 49 4e 4b 29 20 24 28 4c 49 4e 4b  ..$(LINK) $(LINK
fe10: 46 4c 41 47 53 29 20 2d 6f 75 74 3a 22 24 40 22  FLAGS) -out:"$@"
fe20: 20 24 28 54 52 41 4e 53 4c 41 54 45 44 4f 42 4a   $(TRANSLATEDOBJ
fe30: 29 20 24 28 53 51 4c 49 54 45 4f 42 4a 29 20 24  ) $(SQLITEOBJ) $
fe40: 28 53 51 4c 49 54 45 53 48 45 4c 4c 4f 42 4a 29  (SQLITESHELLOBJ)
fe50: 20 24 28 54 48 4f 42 4a 29 20 24 28 5a 4c 49 42   $(THOBJ) $(ZLIB
fe60: 4f 42 4a 29 20 24 28 52 45 53 4f 55 52 43 45 29  OBJ) $(RESOURCE)
fe70: 0a 0a 23 20 63 6c 65 61 6e 75 70 0a 0a 2e 50 48  ..# cleanup...PH
fe80: 4f 4e 59 3a 20 63 6c 65 61 6e 0a 63 6c 65 61 6e  ONY: clean.clean
fe90: 3a 0a 09 2d 64 65 6c 20 2f 46 20 24 28 54 52 41  :..-del /F $(TRA
fea0: 4e 53 4c 41 54 45 44 4f 42 4a 29 20 24 28 53 51  NSLATEDOBJ) $(SQ
feb0: 4c 49 54 45 4f 42 4a 29 20 24 28 54 48 4f 42 4a  LITEOBJ) $(THOBJ
fec0: 29 20 24 28 5a 4c 49 42 4f 42 4a 29 20 24 28 55  ) $(ZLIBOBJ) $(U
fed0: 54 49 4c 53 5f 4f 42 4a 29 20 76 65 72 73 69 6f  TILS_OBJ) versio
fee0: 6e 2e 6f 62 6a 0a 09 2d 64 65 6c 20 2f 46 20 24  n.obj..-del /F $
fef0: 28 54 52 41 4e 53 4c 41 54 45 44 53 52 43 29 0a  (TRANSLATEDSRC).
ff00: 09 2d 64 65 6c 20 2f 46 20 2a 2e 68 20 68 65 61  .-del /F *.h hea
ff10: 64 65 72 73 0a 09 2d 64 65 6c 20 2f 46 20 24 28  ders..-del /F $(
ff20: 52 45 53 4f 55 52 43 45 29 0a 0a 2e 50 48 4f 4e  RESOURCE)...PHON
ff30: 59 3a 20 63 6c 6f 62 62 65 72 0a 63 6c 6f 62 62  Y: clobber.clobb
ff40: 65 72 3a 20 63 6c 65 61 6e 0a 09 2d 64 65 6c 20  er: clean..-del 
ff50: 2f 46 20 2a 2e 65 78 65 0a 7d 5d 0a              /F *.exe.}].