Fossil

Check-in [c00f79d0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added the msvc sdk compiler
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | windowscompilers
Files: files | file ages | folders
SHA1:c00f79d054e2610cb154b24d479803eddbd6a0cf
User & Date: renez 2010-08-28 09:20:35
Context
2010-08-28
10:54
The generated makefiles expect dat you do mkdir build cd build nmake -f ..\win\Makefile.msc This will put all the files in build. So no polution of the root of the source tree and you can build for the different compilers check-in: 99e0a29e user: renez tags: windowscompilers
09:20
Added the msvc sdk compiler check-in: c00f79d0 user: renez tags: windowscompilers
06:59
This is the first check-in on the windowscompilers branch and it adds the Digital Mars C compiler
The user should have dmc installed in c:\DM with zlib in c:\DM\extra\lib and c:\DM\extra\include.
typing c:\DM\bin\make -f win\Makefile.dmc builds fossil.exe in dmcobj
The following files were edited or added:

Checks if one of the windows compilers is used. If so we define _WIN32. Defining _WIN32 is normally done by
#include <windows.h>
However most of the time we don't use windows.h.

Adding an other windows compiler is done by adding
"|| defined(__COMPILER_IDENTIFIER__)"
and maybe some special things in the files below. Like

     

These have all __MINGW32__ replaced by _WIN32. And in some places special processing for either MINGW32 or DMC

In popen2 the _open_osfHandle call first parameter is cast to a long. DMC refused to compile without the cast.

DMC complained that it didn't knew of time_t in rss.h. time.h came after rss.h. Switching the two solved it!

added tcl code to generate Makefile.dmc. tclsh src/makemake.tcl dmc prints to stdout the makefile. As a convienience to the end-user I added the win/Makefile.dm...

check-in: f66f414f user: renez tags: windowscompilers
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/config.h.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#if defined( __MINGW32__) ||  defined(__DMC__)
#  if defined(__DMC__)
     typedef int socklen_t;
#  endif
#  ifndef _WIN32
#    define _WIN32
#  endif
#else
# include <sys/types.h>







|
|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#if defined( __MINGW32__) ||  defined(__DMC__) || defined(_MSC_VER)
#  if defined(__DMC__)  || defined(_MSC_VER)
     typedef int socklen_t;
#  endif
#  ifndef _WIN32
#    define _WIN32
#  endif
#else
# include <sys/types.h>

Changes to src/file.c.

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
** Return TRUE if the named file is an executable.  Return false
** for directories, devices, fifos, symlinks, etc.
*/
int file_isexe(const char *zFilename){
  if( getStat(zFilename) || !S_ISREG(fileStat.st_mode) ) return 0;
#if defined(_WIN32)
#  if defined(__DMC__)
#    define S_IXUSR  _S_IEXEC
#  endif
  return ((S_IXUSR)&fileStat.st_mode)!=0;
#else
  return ((S_IXUSR|S_IXGRP|S_IXOTH)&fileStat.st_mode)!=0;
#endif
}







|







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
** Return TRUE if the named file is an executable.  Return false
** for directories, devices, fifos, symlinks, etc.
*/
int file_isexe(const char *zFilename){
  if( getStat(zFilename) || !S_ISREG(fileStat.st_mode) ) return 0;
#if defined(_WIN32)
#  if defined(__DMC__) || defined(_MSC_VER)
#    define S_IXUSR  _S_IEXEC
#  endif
  return ((S_IXUSR)&fileStat.st_mode)!=0;
#else
  return ((S_IXUSR|S_IXGRP|S_IXOTH)&fileStat.st_mode)!=0;
#endif
}

Changes to src/login.c.

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
** logs and downloading diffs of very version of the archive that
** has ever existed, and things like that.
*/
#include "config.h"
#include "login.h"
#if defined(_WIN32)  
#  include <windows.h>           /* for Sleep */
#  if defined(_MINGW32__)
#    define sleep Sleep            /* windows does not have sleep, but Sleep */
#  endif
#endif
#include <time.h>

/*
** Return the name of the login cookie







|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
** logs and downloading diffs of very version of the archive that
** has ever existed, and things like that.
*/
#include "config.h"
#include "login.h"
#if defined(_WIN32)  
#  include <windows.h>           /* for Sleep */
#  if defined(_MINGW32__) || defined(_MSC_VER)
#    define sleep Sleep            /* windows does not have sleep, but Sleep */
#  endif
#endif
#include <time.h>

/*
** Return the name of the login cookie

Changes to src/makeheaders.c.

11
12
13
14
15
16
17

18


19
20
21
22
23
24
25
26
27
28
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <memory.h>
#include <sys/stat.h>
#include <assert.h>

#ifndef WIN32


# include <unistd.h>
#else
# include <string.h>
#endif

/*
** Macros for debugging.
*/
#ifdef DEBUG
static int debugMask = 0;







>
|
>
>
|

|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <memory.h>
#include <sys/stat.h>
#include <assert.h>
#if defined( __MINGW32__) ||  defined(__DMC__) || defined(_MSC_VER)
#  ifndef WIN32
#    define WIN32
#  endif
# include <string.h>
#else
# include <unistd.h>
#endif

/*
** Macros for debugging.
*/
#ifdef DEBUG
static int debugMask = 0;

Changes to src/makemake.tcl.

318
319
320
321
322
323
324

325
326


















































































































puts -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E "
foreach s [lsort $src] {
  puts -nonewline "${s}_.c:$s.h "
}
puts "src\\sqlite3.h src\\th.h VERSION.h"
puts "\tcopy nul headers"

	
}
























































































































>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440

puts -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E "
foreach s [lsort $src] {
  puts -nonewline "${s}_.c:$s.h "
}
puts "src\\sqlite3.h src\\th.h VERSION.h"
puts "\tcopy nul headers"
exit
}

if { "msc" == [lindex $argv 0] } {

puts {# DO NOT EDIT
#
# This file is automatically generated.  Instead of editing this
# file, edit "makemake.tcl" then run
# "tclsh src/makemake.tcl msc > win/Makefile.msc"
# to regenerate this file.
SRCDIR = src
OBJDIR = mscobj
O      = .obj
E      = .exe


# Maybe MSCDIR, SSL or INCL needs adjustment
MSCDIR = c:\msc
INCL   = -I. -I$(SRCDIR) -Iwin\include -I$(MSCDIR)\extra\include

#SSL   =  -DFOSSIL_ENABLE_SSL=1
SSL    =

MSCDEF =  -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp
I18N   =  -DFOSSIL_I18N=0

CFLAGS = -nologo -MD -O2 -Oy- -Zi
BCC    = $(CC) $(CFLAGS)
TCC    = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
LIBS   = zlib.lib ws2_32.lib
}
puts -nonewline "SRC   = "
foreach s [lsort $src] {
  puts -nonewline "${s}_.c "
}
puts "\n"
puts -nonewline "OBJ   = "
foreach s [lsort $src] {
  puts -nonewline "\$(OBJDIR)\\$s\$O "
}
puts "\$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
puts {

APPNAME = $(OBJDIR)\fossil$(E)

all: $(OBJDIR) $(APPNAME)

$(APPNAME) : translate$E mkindex$E headers  $(OBJ) $(OBJDIR)\link
	cd $(OBJDIR) 
	link -LINK -OUT:fossil$E -LIBPATH:$(MSCDIR)\extra\lib @link

$(OBJDIR)\link:}
puts -nonewline "\techo "
foreach s [lsort $src] {
  puts -nonewline "$s "
}
puts "sqlite3 th th_lang > \$@"
puts "\techo \$(LIBS) >> \$@\n\n"

puts {


$(OBJDIR):
	@-mkdir $@

translate$E: $(SRCDIR)/translate.c
	$(BCC) $**

makeheaders$E: $(SRCDIR)/makeheaders.c
	$(BCC) $**

mkindex$E: $(SRCDIR)/mkindex.c
	$(BCC) $**

version$E: win/version.c
	$(BCC) $**

$(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
	$(TCC) /Fo$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**

$(OBJDIR)\th$O : $(SRCDIR)\th.c
	$(TCC) /Fo$@ -c $**

$(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c
	$(TCC) /Fo$@ -c $**

VERSION.h : version$E manifest.uuid manifest
	$** > $@

page_index.h: mkindex$E $(SRC) 
	$** > $@

clean:
	-del $(OBJDIR)\*.obj
	-del *.obj *_.c *.h *.map

realclean:
	-del $(APPNAME) translate$E mkindex$E makeheaders$E version$E

}
foreach s [lsort $src] {
  puts "\$(OBJDIR)\\$s\$O : ${s}_.c"
  puts "\t\$(TCC) /Fo\$@ -c \$**\n"
  puts "${s}_.c : \$(SRCDIR)\\$s.c"
  puts "\ttranslate\$E \$** > \$@\n"
}

puts -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t makeheaders\$E "
foreach s [lsort $src] {
  puts -nonewline "${s}_.c:$s.h "
}
puts "src\\sqlite3.h src\\th.h VERSION.h"
puts "\tcopy /Y nul: headers"
	
}

Changes to src/sha1.c.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
** contained in RFC-3174.
*/
/*
 * If you do not have the ISO standard stdint.h header file, then you
 * must typdef the following:
 *    name              meaning
 *  */
#if defined(__DMC__)
  typedef  unsigned long uint32_t; //unsigned 32 bit integer
  typedef  unsigned char  uint8_t; //unsigned  8 bit integer (i.e., unsigned char)
#else
#  include <stdint.h>
#endif
#include <sys/types.h>
#include "config.h"







|







3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
** contained in RFC-3174.
*/
/*
 * If you do not have the ISO standard stdint.h header file, then you
 * must typdef the following:
 *    name              meaning
 *  */
#if defined(__DMC__) || defined(_MSC_VER)
  typedef  unsigned long uint32_t; //unsigned 32 bit integer
  typedef  unsigned char  uint8_t; //unsigned  8 bit integer (i.e., unsigned char)
#else
#  include <stdint.h>
#endif
#include <sys/types.h>
#include "config.h"

Changes to src/winhttp.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
**   http://www.hwaci.com/drh/
**
*******************************************************************************
**
** This file implements a very simple (and low-performance) HTTP server
** for windows.
*/
#if defined( __MINGW32__) ||  defined(__DMC__)
/* This code is for win32 only */
#include "config.h"
#include "winhttp.h"
#include <windows.h>

/*
** The HttpRequest structure holds information about each incoming







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
**   http://www.hwaci.com/drh/
**
*******************************************************************************
**
** This file implements a very simple (and low-performance) HTTP server
** for windows.
*/
#if defined( __MINGW32__) ||  defined(__DMC__) || defined(_MSC_VER)
/* This code is for win32 only */
#include "config.h"
#include "winhttp.h"
#include <windows.h>

/*
** The HttpRequest structure holds information about each incoming

Added win/Makefile.msc.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# DO NOT EDIT
#
# This file is automatically generated.  Instead of editing this
# file, edit "makemake.tcl" then run
# "tclsh src/makemake.tcl msc > win/Makefile.msc"
# to regenerate this file.
SRCDIR = src
OBJDIR = mscobj
O      = .obj
E      = .exe


# Maybe MSCDIR, SSL or INCL needs adjustment
MSCDIR = c:\msc
INCL   = -I. -I$(SRCDIR) -Iwin\include -I$(MSCDIR)\extra\include

#SSL   =  -DFOSSIL_ENABLE_SSL=1
SSL    =

MSCDEF =  -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp
I18N   =  -DFOSSIL_I18N=0

CFLAGS = -nologo -MD -O2 -Oy- -Zi
BCC    = $(CC) $(CFLAGS)
TCC    = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
LIBS   = zlib.lib ws2_32.lib

SRC   = add_.c allrepo_.c attach_.c bag_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c 

OBJ   = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O 


APPNAME = $(OBJDIR)\fossil$(E)

all: $(OBJDIR) $(APPNAME)

$(APPNAME) : translate$E mkindex$E headers  $(OBJ) $(OBJDIR)\link
	cd $(OBJDIR) 
	link -LINK -OUT:fossil$E -LIBPATH:$(MSCDIR)\extra\lib @link

$(OBJDIR)\link:
	echo add allrepo attach bag blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode file finfo graph http http_socket http_ssl http_transport info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
	echo $(LIBS) >> $@





$(OBJDIR):
	@-mkdir $@

translate$E: $(SRCDIR)/translate.c
	$(BCC) $**

makeheaders$E: $(SRCDIR)/makeheaders.c
	$(BCC) $**

mkindex$E: $(SRCDIR)/mkindex.c
	$(BCC) $**

version$E: win/version.c
	$(BCC) $**

$(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
	$(TCC) /Fo$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**

$(OBJDIR)\th$O : $(SRCDIR)\th.c
	$(TCC) /Fo$@ -c $**

$(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c
	$(TCC) /Fo$@ -c $**

VERSION.h : version$E manifest.uuid manifest
	$** > $@

page_index.h: mkindex$E $(SRC) 
	$** > $@

clean:
	-del $(OBJDIR)\*.obj
	-del *.obj *_.c *.h *.map

realclean:
	-del $(APPNAME) translate$E mkindex$E makeheaders$E version$E


$(OBJDIR)\add$O : add_.c
	$(TCC) /Fo$@ -c $**

add_.c : $(SRCDIR)\add.c
	translate$E $** > $@

$(OBJDIR)\allrepo$O : allrepo_.c
	$(TCC) /Fo$@ -c $**

allrepo_.c : $(SRCDIR)\allrepo.c
	translate$E $** > $@

$(OBJDIR)\attach$O : attach_.c
	$(TCC) /Fo$@ -c $**

attach_.c : $(SRCDIR)\attach.c
	translate$E $** > $@

$(OBJDIR)\bag$O : bag_.c
	$(TCC) /Fo$@ -c $**

bag_.c : $(SRCDIR)\bag.c
	translate$E $** > $@

$(OBJDIR)\blob$O : blob_.c
	$(TCC) /Fo$@ -c $**

blob_.c : $(SRCDIR)\blob.c
	translate$E $** > $@

$(OBJDIR)\branch$O : branch_.c
	$(TCC) /Fo$@ -c $**

branch_.c : $(SRCDIR)\branch.c
	translate$E $** > $@

$(OBJDIR)\browse$O : browse_.c
	$(TCC) /Fo$@ -c $**

browse_.c : $(SRCDIR)\browse.c
	translate$E $** > $@

$(OBJDIR)\captcha$O : captcha_.c
	$(TCC) /Fo$@ -c $**

captcha_.c : $(SRCDIR)\captcha.c
	translate$E $** > $@

$(OBJDIR)\cgi$O : cgi_.c
	$(TCC) /Fo$@ -c $**

cgi_.c : $(SRCDIR)\cgi.c
	translate$E $** > $@

$(OBJDIR)\checkin$O : checkin_.c
	$(TCC) /Fo$@ -c $**

checkin_.c : $(SRCDIR)\checkin.c
	translate$E $** > $@

$(OBJDIR)\checkout$O : checkout_.c
	$(TCC) /Fo$@ -c $**

checkout_.c : $(SRCDIR)\checkout.c
	translate$E $** > $@

$(OBJDIR)\clearsign$O : clearsign_.c
	$(TCC) /Fo$@ -c $**

clearsign_.c : $(SRCDIR)\clearsign.c
	translate$E $** > $@

$(OBJDIR)\clone$O : clone_.c
	$(TCC) /Fo$@ -c $**

clone_.c : $(SRCDIR)\clone.c
	translate$E $** > $@

$(OBJDIR)\comformat$O : comformat_.c
	$(TCC) /Fo$@ -c $**

comformat_.c : $(SRCDIR)\comformat.c
	translate$E $** > $@

$(OBJDIR)\configure$O : configure_.c
	$(TCC) /Fo$@ -c $**

configure_.c : $(SRCDIR)\configure.c
	translate$E $** > $@

$(OBJDIR)\content$O : content_.c
	$(TCC) /Fo$@ -c $**

content_.c : $(SRCDIR)\content.c
	translate$E $** > $@

$(OBJDIR)\db$O : db_.c
	$(TCC) /Fo$@ -c $**

db_.c : $(SRCDIR)\db.c
	translate$E $** > $@

$(OBJDIR)\delta$O : delta_.c
	$(TCC) /Fo$@ -c $**

delta_.c : $(SRCDIR)\delta.c
	translate$E $** > $@

$(OBJDIR)\deltacmd$O : deltacmd_.c
	$(TCC) /Fo$@ -c $**

deltacmd_.c : $(SRCDIR)\deltacmd.c
	translate$E $** > $@

$(OBJDIR)\descendants$O : descendants_.c
	$(TCC) /Fo$@ -c $**

descendants_.c : $(SRCDIR)\descendants.c
	translate$E $** > $@

$(OBJDIR)\diff$O : diff_.c
	$(TCC) /Fo$@ -c $**

diff_.c : $(SRCDIR)\diff.c
	translate$E $** > $@

$(OBJDIR)\diffcmd$O : diffcmd_.c
	$(TCC) /Fo$@ -c $**

diffcmd_.c : $(SRCDIR)\diffcmd.c
	translate$E $** > $@

$(OBJDIR)\doc$O : doc_.c
	$(TCC) /Fo$@ -c $**

doc_.c : $(SRCDIR)\doc.c
	translate$E $** > $@

$(OBJDIR)\encode$O : encode_.c
	$(TCC) /Fo$@ -c $**

encode_.c : $(SRCDIR)\encode.c
	translate$E $** > $@

$(OBJDIR)\file$O : file_.c
	$(TCC) /Fo$@ -c $**

file_.c : $(SRCDIR)\file.c
	translate$E $** > $@

$(OBJDIR)\finfo$O : finfo_.c
	$(TCC) /Fo$@ -c $**

finfo_.c : $(SRCDIR)\finfo.c
	translate$E $** > $@

$(OBJDIR)\graph$O : graph_.c
	$(TCC) /Fo$@ -c $**

graph_.c : $(SRCDIR)\graph.c
	translate$E $** > $@

$(OBJDIR)\http$O : http_.c
	$(TCC) /Fo$@ -c $**

http_.c : $(SRCDIR)\http.c
	translate$E $** > $@

$(OBJDIR)\http_socket$O : http_socket_.c
	$(TCC) /Fo$@ -c $**

http_socket_.c : $(SRCDIR)\http_socket.c
	translate$E $** > $@

$(OBJDIR)\http_ssl$O : http_ssl_.c
	$(TCC) /Fo$@ -c $**

http_ssl_.c : $(SRCDIR)\http_ssl.c
	translate$E $** > $@

$(OBJDIR)\http_transport$O : http_transport_.c
	$(TCC) /Fo$@ -c $**

http_transport_.c : $(SRCDIR)\http_transport.c
	translate$E $** > $@

$(OBJDIR)\info$O : info_.c
	$(TCC) /Fo$@ -c $**

info_.c : $(SRCDIR)\info.c
	translate$E $** > $@

$(OBJDIR)\login$O : login_.c
	$(TCC) /Fo$@ -c $**

login_.c : $(SRCDIR)\login.c
	translate$E $** > $@

$(OBJDIR)\main$O : main_.c
	$(TCC) /Fo$@ -c $**

main_.c : $(SRCDIR)\main.c
	translate$E $** > $@

$(OBJDIR)\manifest$O : manifest_.c
	$(TCC) /Fo$@ -c $**

manifest_.c : $(SRCDIR)\manifest.c
	translate$E $** > $@

$(OBJDIR)\md5$O : md5_.c
	$(TCC) /Fo$@ -c $**

md5_.c : $(SRCDIR)\md5.c
	translate$E $** > $@

$(OBJDIR)\merge$O : merge_.c
	$(TCC) /Fo$@ -c $**

merge_.c : $(SRCDIR)\merge.c
	translate$E $** > $@

$(OBJDIR)\merge3$O : merge3_.c
	$(TCC) /Fo$@ -c $**

merge3_.c : $(SRCDIR)\merge3.c
	translate$E $** > $@

$(OBJDIR)\name$O : name_.c
	$(TCC) /Fo$@ -c $**

name_.c : $(SRCDIR)\name.c
	translate$E $** > $@

$(OBJDIR)\pivot$O : pivot_.c
	$(TCC) /Fo$@ -c $**

pivot_.c : $(SRCDIR)\pivot.c
	translate$E $** > $@

$(OBJDIR)\popen$O : popen_.c
	$(TCC) /Fo$@ -c $**

popen_.c : $(SRCDIR)\popen.c
	translate$E $** > $@

$(OBJDIR)\pqueue$O : pqueue_.c
	$(TCC) /Fo$@ -c $**

pqueue_.c : $(SRCDIR)\pqueue.c
	translate$E $** > $@

$(OBJDIR)\printf$O : printf_.c
	$(TCC) /Fo$@ -c $**

printf_.c : $(SRCDIR)\printf.c
	translate$E $** > $@

$(OBJDIR)\rebuild$O : rebuild_.c
	$(TCC) /Fo$@ -c $**

rebuild_.c : $(SRCDIR)\rebuild.c
	translate$E $** > $@

$(OBJDIR)\report$O : report_.c
	$(TCC) /Fo$@ -c $**

report_.c : $(SRCDIR)\report.c
	translate$E $** > $@

$(OBJDIR)\rss$O : rss_.c
	$(TCC) /Fo$@ -c $**

rss_.c : $(SRCDIR)\rss.c
	translate$E $** > $@

$(OBJDIR)\schema$O : schema_.c
	$(TCC) /Fo$@ -c $**

schema_.c : $(SRCDIR)\schema.c
	translate$E $** > $@

$(OBJDIR)\search$O : search_.c
	$(TCC) /Fo$@ -c $**

search_.c : $(SRCDIR)\search.c
	translate$E $** > $@

$(OBJDIR)\setup$O : setup_.c
	$(TCC) /Fo$@ -c $**

setup_.c : $(SRCDIR)\setup.c
	translate$E $** > $@

$(OBJDIR)\sha1$O : sha1_.c
	$(TCC) /Fo$@ -c $**

sha1_.c : $(SRCDIR)\sha1.c
	translate$E $** > $@

$(OBJDIR)\shun$O : shun_.c
	$(TCC) /Fo$@ -c $**

shun_.c : $(SRCDIR)\shun.c
	translate$E $** > $@

$(OBJDIR)\skins$O : skins_.c
	$(TCC) /Fo$@ -c $**

skins_.c : $(SRCDIR)\skins.c
	translate$E $** > $@

$(OBJDIR)\stat$O : stat_.c
	$(TCC) /Fo$@ -c $**

stat_.c : $(SRCDIR)\stat.c
	translate$E $** > $@

$(OBJDIR)\style$O : style_.c
	$(TCC) /Fo$@ -c $**

style_.c : $(SRCDIR)\style.c
	translate$E $** > $@

$(OBJDIR)\sync$O : sync_.c
	$(TCC) /Fo$@ -c $**

sync_.c : $(SRCDIR)\sync.c
	translate$E $** > $@

$(OBJDIR)\tag$O : tag_.c
	$(TCC) /Fo$@ -c $**

tag_.c : $(SRCDIR)\tag.c
	translate$E $** > $@

$(OBJDIR)\th_main$O : th_main_.c
	$(TCC) /Fo$@ -c $**

th_main_.c : $(SRCDIR)\th_main.c
	translate$E $** > $@

$(OBJDIR)\timeline$O : timeline_.c
	$(TCC) /Fo$@ -c $**

timeline_.c : $(SRCDIR)\timeline.c
	translate$E $** > $@

$(OBJDIR)\tkt$O : tkt_.c
	$(TCC) /Fo$@ -c $**

tkt_.c : $(SRCDIR)\tkt.c
	translate$E $** > $@

$(OBJDIR)\tktsetup$O : tktsetup_.c
	$(TCC) /Fo$@ -c $**

tktsetup_.c : $(SRCDIR)\tktsetup.c
	translate$E $** > $@

$(OBJDIR)\undo$O : undo_.c
	$(TCC) /Fo$@ -c $**

undo_.c : $(SRCDIR)\undo.c
	translate$E $** > $@

$(OBJDIR)\update$O : update_.c
	$(TCC) /Fo$@ -c $**

update_.c : $(SRCDIR)\update.c
	translate$E $** > $@

$(OBJDIR)\url$O : url_.c
	$(TCC) /Fo$@ -c $**

url_.c : $(SRCDIR)\url.c
	translate$E $** > $@

$(OBJDIR)\user$O : user_.c
	$(TCC) /Fo$@ -c $**

user_.c : $(SRCDIR)\user.c
	translate$E $** > $@

$(OBJDIR)\verify$O : verify_.c
	$(TCC) /Fo$@ -c $**

verify_.c : $(SRCDIR)\verify.c
	translate$E $** > $@

$(OBJDIR)\vfile$O : vfile_.c
	$(TCC) /Fo$@ -c $**

vfile_.c : $(SRCDIR)\vfile.c
	translate$E $** > $@

$(OBJDIR)\wiki$O : wiki_.c
	$(TCC) /Fo$@ -c $**

wiki_.c : $(SRCDIR)\wiki.c
	translate$E $** > $@

$(OBJDIR)\wikiformat$O : wikiformat_.c
	$(TCC) /Fo$@ -c $**

wikiformat_.c : $(SRCDIR)\wikiformat.c
	translate$E $** > $@

$(OBJDIR)\winhttp$O : winhttp_.c
	$(TCC) /Fo$@ -c $**

winhttp_.c : $(SRCDIR)\winhttp.c
	translate$E $** > $@

$(OBJDIR)\xfer$O : xfer_.c
	$(TCC) /Fo$@ -c $**

xfer_.c : $(SRCDIR)\xfer.c
	translate$E $** > $@

$(OBJDIR)\zip$O : zip_.c
	$(TCC) /Fo$@ -c $**

zip_.c : $(SRCDIR)\zip.c
	translate$E $** > $@

headers: makeheaders$E page_index.h VERSION.h
	 makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h src\sqlite3.h src\th.h VERSION.h
	copy /Y nul: headers