Fossil SCM

Use !if for all NMAKE feature macros, not !ifdef/!ifndef. Add preliminary support for Visual Studio 2015 to the MSVC batch build tool.

mistachkin 2015-06-20 17:42 trunk merge
Commit 0aa2896d06f7d275790e24ba053b0b1ddf76da5e
+100 -76
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1312,50 +1312,74 @@
13121312
# be built from source code. The PERLDIR variable should point to
13131313
# the directory containing the main Perl binary (i.e. "perl.exe").
13141314
PERLDIR = C:\Perl\bin
13151315
PERL = perl.exe
13161316
1317
-# Uncomment to enable debug symbols
1318
-# DEBUG = 1
1319
-
1320
-# Uncomment to link everything except SQLite dynamically
1321
-# FOSSIL_DYNAMIC_BUILD = 1
1322
-
1323
-# Uncomment to support Windows XP with Visual Studio 201x
1324
-# FOSSIL_ENABLE_WINXP = 1
1325
-
1326
-# Uncomment to enable JSON API
1327
-# FOSSIL_ENABLE_JSON = 1
1328
-
1329
-# Uncomment to enable miniz usage
1330
-# FOSSIL_ENABLE_MINIZ = 1
1331
-
1332
-# Uncomment to enable SSL support
1333
-# FOSSIL_ENABLE_SSL = 1
1334
-
1335
-# Uncomment to build zlib library
1336
-FOSSIL_BUILD_ZLIB = 1
1337
-
1338
-# Uncomment to build SSL libraries
1339
-# FOSSIL_BUILD_SSL = 1
1340
-
1341
-# Uncomment to enable legacy treatment of mv/rm
1342
-# FOSSIL_ENABLE_LEGACY_MV_RM = 1
1343
-
1344
-# Uncomment to enable TH1 scripts in embedded documentation files
1345
-# FOSSIL_ENABLE_TH1_DOCS = 1
1346
-
1347
-# Uncomment to enable TH1 hooks
1348
-# FOSSIL_ENABLE_TH1_HOOKS = 1
1349
-
1350
-# Uncomment to enable Tcl support
1351
-# FOSSIL_ENABLE_TCL = 1
1352
-
1353
-!ifdef FOSSIL_ENABLE_SSL
1317
+# Enable debugging symbols?
1318
+!ifndef DEBUG
1319
+DEBUG = 0
1320
+!endif
1321
+
1322
+# Build the OpenSSL libraries?
1323
+!ifndef FOSSIL_BUILD_SSL
1324
+FOSSIL_BUILD_SSL = 0
1325
+!endif
1326
+
1327
+# Build the included zlib library?
1328
+!ifndef FOSSIL_BUILD_ZLIB
1329
+FOSSIL_BUILD_ZLIB = 0
1330
+!endif
1331
+
1332
+# Link everything except SQLite dynamically?
1333
+!ifndef FOSSIL_DYNAMIC_BUILD
1334
+FOSSIL_DYNAMIC_BUILD = 0
1335
+!endif
1336
+
1337
+# Enable the JSON API?
1338
+!ifndef FOSSIL_ENABLE_JSON
1339
+FOSSIL_ENABLE_JSON = 0
1340
+!endif
1341
+
1342
+# Enable legacy treatment of the mv/rm commands?
1343
+!ifndef FOSSIL_ENABLE_LEGACY_MV_RM
1344
+FOSSIL_ENABLE_LEGACY_MV_RM = 0
1345
+!endif
1346
+
1347
+# Enable use of miniz instead of zlib?
1348
+!ifndef FOSSIL_ENABLE_MINIZ
1349
+FOSSIL_ENABLE_MINIZ = 0
1350
+!endif
1351
+
1352
+# Enable OpenSSL support?
1353
+!ifndef FOSSIL_ENABLE_SSL
1354
+FOSSIL_ENABLE_SSL = 0
1355
+!endif
1356
+
1357
+# Enable the Tcl integration subsystem?
1358
+!ifndef FOSSIL_ENABLE_TCL
1359
+FOSSIL_ENABLE_TCL = 0
1360
+!endif
1361
+
1362
+# Enable TH1 scripts in embedded documentation files?
1363
+!ifndef FOSSIL_ENABLE_TH1_DOCS
1364
+FOSSIL_ENABLE_TH1_DOCS = 0
1365
+!endif
1366
+
1367
+# Enable TH1 hooks for commands and web pages?
1368
+!ifndef FOSSIL_ENABLE_TH1_HOOKS
1369
+FOSSIL_ENABLE_TH1_HOOKS = 0
1370
+!endif
1371
+
1372
+# Enable support for Windows XP with Visual Studio 201x?
1373
+!ifndef FOSSIL_ENABLE_WINXP
1374
+FOSSIL_ENABLE_WINXP = 0
1375
+!endif
1376
+
1377
+!if $(FOSSIL_ENABLE_SSL)!=0
13541378
SSLDIR = $(B)\compat\openssl-1.0.2c
13551379
SSLINCDIR = $(SSLDIR)\inc32
1356
-!ifdef FOSSIL_DYNAMIC_BUILD
1380
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
13571381
SSLLIBDIR = $(SSLDIR)\out32dll
13581382
!else
13591383
SSLLIBDIR = $(SSLDIR)\out32
13601384
!endif
13611385
SSLLFLAGS = /nologo /opt:ref /debug
@@ -1363,108 +1387,108 @@
13631387
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
13641388
!message Using 'x64' platform for OpenSSL...
13651389
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
13661390
# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
13671391
SSLCONFIG = VC-WIN64A no-asm
1368
-!ifdef FOSSIL_DYNAMIC_BUILD
1392
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
13691393
SSLCONFIG = $(SSLCONFIG) shared
13701394
!else
13711395
SSLCONFIG = $(SSLCONFIG) no-shared
13721396
!endif
13731397
SSLSETUP = ms\do_win64a.bat
1374
-!ifdef FOSSIL_DYNAMIC_BUILD
1398
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
13751399
SSLNMAKE = ms\ntdll.mak all
13761400
!else
13771401
SSLNMAKE = ms\nt.mak all
13781402
!endif
13791403
# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1380
-!ifndef FOSSIL_DYNAMIC_BUILD
1404
+!if $(FOSSIL_DYNAMIC_BUILD)==0
13811405
SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
13821406
!endif
13831407
!elseif "$(PLATFORM)"=="ia64"
13841408
!message Using 'ia64' platform for OpenSSL...
13851409
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
13861410
# SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3
13871411
SSLCONFIG = VC-WIN64I no-asm
1388
-!ifdef FOSSIL_DYNAMIC_BUILD
1412
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
13891413
SSLCONFIG = $(SSLCONFIG) shared
13901414
!else
13911415
SSLCONFIG = $(SSLCONFIG) no-shared
13921416
!endif
13931417
SSLSETUP = ms\do_win64i.bat
1394
-!ifdef FOSSIL_DYNAMIC_BUILD
1418
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
13951419
SSLNMAKE = ms\ntdll.mak all
13961420
!else
13971421
SSLNMAKE = ms\nt.mak all
13981422
!endif
13991423
# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1400
-!ifndef FOSSIL_DYNAMIC_BUILD
1424
+!if $(FOSSIL_DYNAMIC_BUILD)==0
14011425
SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
14021426
!endif
14031427
!else
14041428
!message Assuming 'x86' platform for OpenSSL...
14051429
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
14061430
# SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3
14071431
SSLCONFIG = VC-WIN32 no-asm
1408
-!ifdef FOSSIL_DYNAMIC_BUILD
1432
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
14091433
SSLCONFIG = $(SSLCONFIG) shared
14101434
!else
14111435
SSLCONFIG = $(SSLCONFIG) no-shared
14121436
!endif
14131437
SSLSETUP = ms\do_ms.bat
1414
-!ifdef FOSSIL_DYNAMIC_BUILD
1438
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
14151439
SSLNMAKE = ms\ntdll.mak all
14161440
!else
14171441
SSLNMAKE = ms\nt.mak all
14181442
!endif
14191443
# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1420
-!ifndef FOSSIL_DYNAMIC_BUILD
1444
+!if $(FOSSIL_DYNAMIC_BUILD)==0
14211445
SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
14221446
!endif
14231447
!endif
14241448
!endif
14251449
1426
-!ifdef FOSSIL_ENABLE_TCL
1450
+!if $(FOSSIL_ENABLE_TCL)!=0
14271451
TCLDIR = $(B)\compat\tcl-8.6
14281452
TCLSRCDIR = $(TCLDIR)
14291453
TCLINCDIR = $(TCLSRCDIR)\generic
14301454
!endif
14311455
14321456
# zlib options
14331457
ZINCDIR = $(B)\compat\zlib
14341458
ZLIBDIR = $(B)\compat\zlib
14351459
1436
-!ifdef FOSSIL_DYNAMIC_BUILD
1460
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
14371461
ZLIB = zdll.lib
14381462
!else
14391463
ZLIB = zlib.lib
14401464
!endif
14411465
14421466
INCL = /I. /I$(SRCDIR) /I$B\win\include
14431467
1444
-!ifndef FOSSIL_ENABLE_MINIZ
1468
+!if $(FOSSIL_ENABLE_MINIZ)==0
14451469
INCL = $(INCL) /I$(ZINCDIR)
14461470
!endif
14471471
1448
-!ifdef FOSSIL_ENABLE_SSL
1472
+!if $(FOSSIL_ENABLE_SSL)!=0
14491473
INCL = $(INCL) /I$(SSLINCDIR)
14501474
!endif
14511475
1452
-!ifdef FOSSIL_ENABLE_TCL
1476
+!if $(FOSSIL_ENABLE_TCL)!=0
14531477
INCL = $(INCL) /I$(TCLINCDIR)
14541478
!endif
14551479
14561480
CFLAGS = /nologo
14571481
LDFLAGS =
14581482
1459
-!ifdef FOSSIL_DYNAMIC_BUILD
1483
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
14601484
LDFLAGS = $(LDFLAGS) /MANIFEST
14611485
!else
14621486
LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO
14631487
!endif
14641488
1465
-!ifdef FOSSIL_ENABLE_WINXP
1489
+!if $(FOSSIL_ENABLE_WINXP)!=0
14661490
XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
14671491
CFLAGS = $(CFLAGS) $(XPCFLAGS)
14681492
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
14691493
XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
14701494
!else
@@ -1471,25 +1495,25 @@
14711495
XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
14721496
!endif
14731497
LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
14741498
!endif
14751499
1476
-!ifdef FOSSIL_DYNAMIC_BUILD
1477
-!ifdef DEBUG
1500
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
1501
+!if $(DEBUG)!=0
14781502
CRTFLAGS = /MDd
14791503
!else
14801504
CRTFLAGS = /MD
14811505
!endif
14821506
!else
1483
-!ifdef DEBUG
1507
+!if $(DEBUG)!=0
14841508
CRTFLAGS = /MTd
14851509
!else
14861510
CRTFLAGS = /MT
14871511
!endif
14881512
!endif
14891513
1490
-!ifdef DEBUG
1514
+!if $(DEBUG)!=0
14911515
CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od
14921516
LDFLAGS = $(LDFLAGS) /DEBUG
14931517
!else
14941518
CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2
14951519
!endif
@@ -1499,53 +1523,53 @@
14991523
RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL)
15001524
MTC = mt
15011525
LIBS = ws2_32.lib advapi32.lib
15021526
LIBDIR =
15031527
1504
-!ifdef FOSSIL_DYNAMIC_BUILD
1528
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
15051529
TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1
15061530
RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1
15071531
!endif
15081532
1509
-!ifndef FOSSIL_ENABLE_MINIZ
1533
+!if $(FOSSIL_ENABLE_MINIZ)==0
15101534
LIBS = $(LIBS) $(ZLIB)
15111535
LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR)
15121536
!endif
15131537
1514
-!ifdef FOSSIL_ENABLE_MINIZ
1538
+!if $(FOSSIL_ENABLE_MINIZ)!=0
15151539
TCC = $(TCC) /DFOSSIL_ENABLE_MINIZ=1
15161540
RCC = $(RCC) /DFOSSIL_ENABLE_MINIZ=1
15171541
!endif
15181542
1519
-!ifdef FOSSIL_ENABLE_JSON
1543
+!if $(FOSSIL_ENABLE_JSON)!=0
15201544
TCC = $(TCC) /DFOSSIL_ENABLE_JSON=1
15211545
RCC = $(RCC) /DFOSSIL_ENABLE_JSON=1
15221546
!endif
15231547
1524
-!ifdef FOSSIL_ENABLE_SSL
1548
+!if $(FOSSIL_ENABLE_SSL)!=0
15251549
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
15261550
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
15271551
LIBS = $(LIBS) $(SSLLIB)
15281552
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
15291553
!endif
15301554
1531
-!ifdef FOSSIL_ENABLE_LEGACY_MV_RM
1555
+!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
15321556
TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
15331557
RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
15341558
!endif
15351559
1536
-!ifdef FOSSIL_ENABLE_TH1_DOCS
1560
+!if $(FOSSIL_ENABLE_TH1_DOCS)!=0
15371561
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
15381562
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
15391563
!endif
15401564
1541
-!ifdef FOSSIL_ENABLE_TH1_HOOKS
1565
+!if $(FOSSIL_ENABLE_TH1_HOOKS)!=0
15421566
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
15431567
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
15441568
!endif
15451569
1546
-!ifdef FOSSIL_ENABLE_TCL
1570
+!if $(FOSSIL_ENABLE_TCL)!=0
15471571
TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
15481572
RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
15491573
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
15501574
RCC = $(RCC) /DFOSSIL_ENABLE_TCL_STUBS=1
15511575
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
@@ -1597,11 +1621,11 @@
15971621
writeln -nonewline "\$(OX)\\$s\$O"; incr i
15981622
}
15991623
if {$i > 0} {
16001624
writeln " \\"
16011625
}
1602
-writeln "!ifdef FOSSIL_ENABLE_MINIZ"
1626
+writeln "!if \$(FOSSIL_ENABLE_MINIZ)!=0"
16031627
writeln -nonewline " "
16041628
writeln "\$(OX)\\miniz\$O \\"; incr i
16051629
writeln "!endif"
16061630
writeln -nonewline " \$(OX)\\fossil.res\n\n"
16071631
writeln [string map [list <<<NEXT_LINE>>> \\] {
@@ -1611,39 +1635,39 @@
16111635
16121636
all: $(OX) $(APPNAME)
16131637
16141638
zlib:
16151639
@echo Building zlib from "$(ZLIBDIR)"...
1616
-!ifdef FOSSIL_ENABLE_WINXP
1640
+!if $(FOSSIL_ENABLE_WINXP)!=0
16171641
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
16181642
!else
16191643
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
16201644
!endif
16211645
1622
-!ifdef FOSSIL_ENABLE_SSL
1646
+!if $(FOSSIL_ENABLE_SSL)!=0
16231647
openssl:
16241648
@echo Building OpenSSL from "$(SSLDIR)"...
16251649
!if "$(PERLDIR)" != ""
16261650
@set PATH=$(PERLDIR);$(PATH)
16271651
!endif
16281652
@pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
16291653
@pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
1630
-!ifdef FOSSIL_ENABLE_WINXP
1654
+!if $(FOSSIL_ENABLE_WINXP)!=0
16311655
@pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS) $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
16321656
!else
16331657
@pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd
16341658
!endif
16351659
!endif
16361660
1637
-!ifndef FOSSIL_ENABLE_MINIZ
1638
-!ifdef FOSSIL_BUILD_ZLIB
1661
+!if $(FOSSIL_ENABLE_MINIZ)==0
1662
+!if $(FOSSIL_BUILD_ZLIB)!=0
16391663
APPTARGETS = $(APPTARGETS) zlib
16401664
!endif
16411665
!endif
16421666
1643
-!ifdef FOSSIL_ENABLE_SSL
1644
-!ifdef FOSSIL_BUILD_SSL
1667
+!if $(FOSSIL_ENABLE_SSL)!=0
1668
+!if $(FOSSIL_BUILD_SSL)!=0
16451669
APPTARGETS = $(APPTARGETS) openssl
16461670
!endif
16471671
!endif
16481672
16491673
$(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts
@@ -1658,11 +1682,11 @@
16581682
foreach s [lsort [concat $src $AdditionalObj]] {
16591683
writeln "\techo \$(OX)\\$s.obj $redir \$@"
16601684
set redir {>>}
16611685
}
16621686
set redir {>>}
1663
-writeln "!ifdef FOSSIL_ENABLE_MINIZ"
1687
+writeln "!if \$(FOSSIL_ENABLE_MINIZ)!=0"
16641688
writeln "\techo \$(OX)\\miniz.obj $redir \$@"
16651689
writeln "!endif"
16661690
writeln "\techo \$(LIBS) $redir \$@"
16671691
writeln {
16681692
$(OX):
16691693
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1312,50 +1312,74 @@
1312 # be built from source code. The PERLDIR variable should point to
1313 # the directory containing the main Perl binary (i.e. "perl.exe").
1314 PERLDIR = C:\Perl\bin
1315 PERL = perl.exe
1316
1317 # Uncomment to enable debug symbols
1318 # DEBUG = 1
1319
1320 # Uncomment to link everything except SQLite dynamically
1321 # FOSSIL_DYNAMIC_BUILD = 1
1322
1323 # Uncomment to support Windows XP with Visual Studio 201x
1324 # FOSSIL_ENABLE_WINXP = 1
1325
1326 # Uncomment to enable JSON API
1327 # FOSSIL_ENABLE_JSON = 1
1328
1329 # Uncomment to enable miniz usage
1330 # FOSSIL_ENABLE_MINIZ = 1
1331
1332 # Uncomment to enable SSL support
1333 # FOSSIL_ENABLE_SSL = 1
1334
1335 # Uncomment to build zlib library
1336 FOSSIL_BUILD_ZLIB = 1
1337
1338 # Uncomment to build SSL libraries
1339 # FOSSIL_BUILD_SSL = 1
1340
1341 # Uncomment to enable legacy treatment of mv/rm
1342 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
1343
1344 # Uncomment to enable TH1 scripts in embedded documentation files
1345 # FOSSIL_ENABLE_TH1_DOCS = 1
1346
1347 # Uncomment to enable TH1 hooks
1348 # FOSSIL_ENABLE_TH1_HOOKS = 1
1349
1350 # Uncomment to enable Tcl support
1351 # FOSSIL_ENABLE_TCL = 1
1352
1353 !ifdef FOSSIL_ENABLE_SSL
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1354 SSLDIR = $(B)\compat\openssl-1.0.2c
1355 SSLINCDIR = $(SSLDIR)\inc32
1356 !ifdef FOSSIL_DYNAMIC_BUILD
1357 SSLLIBDIR = $(SSLDIR)\out32dll
1358 !else
1359 SSLLIBDIR = $(SSLDIR)\out32
1360 !endif
1361 SSLLFLAGS = /nologo /opt:ref /debug
@@ -1363,108 +1387,108 @@
1363 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1364 !message Using 'x64' platform for OpenSSL...
1365 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1366 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
1367 SSLCONFIG = VC-WIN64A no-asm
1368 !ifdef FOSSIL_DYNAMIC_BUILD
1369 SSLCONFIG = $(SSLCONFIG) shared
1370 !else
1371 SSLCONFIG = $(SSLCONFIG) no-shared
1372 !endif
1373 SSLSETUP = ms\do_win64a.bat
1374 !ifdef FOSSIL_DYNAMIC_BUILD
1375 SSLNMAKE = ms\ntdll.mak all
1376 !else
1377 SSLNMAKE = ms\nt.mak all
1378 !endif
1379 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1380 !ifndef FOSSIL_DYNAMIC_BUILD
1381 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
1382 !endif
1383 !elseif "$(PLATFORM)"=="ia64"
1384 !message Using 'ia64' platform for OpenSSL...
1385 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1386 # SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3
1387 SSLCONFIG = VC-WIN64I no-asm
1388 !ifdef FOSSIL_DYNAMIC_BUILD
1389 SSLCONFIG = $(SSLCONFIG) shared
1390 !else
1391 SSLCONFIG = $(SSLCONFIG) no-shared
1392 !endif
1393 SSLSETUP = ms\do_win64i.bat
1394 !ifdef FOSSIL_DYNAMIC_BUILD
1395 SSLNMAKE = ms\ntdll.mak all
1396 !else
1397 SSLNMAKE = ms\nt.mak all
1398 !endif
1399 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1400 !ifndef FOSSIL_DYNAMIC_BUILD
1401 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
1402 !endif
1403 !else
1404 !message Assuming 'x86' platform for OpenSSL...
1405 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1406 # SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3
1407 SSLCONFIG = VC-WIN32 no-asm
1408 !ifdef FOSSIL_DYNAMIC_BUILD
1409 SSLCONFIG = $(SSLCONFIG) shared
1410 !else
1411 SSLCONFIG = $(SSLCONFIG) no-shared
1412 !endif
1413 SSLSETUP = ms\do_ms.bat
1414 !ifdef FOSSIL_DYNAMIC_BUILD
1415 SSLNMAKE = ms\ntdll.mak all
1416 !else
1417 SSLNMAKE = ms\nt.mak all
1418 !endif
1419 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1420 !ifndef FOSSIL_DYNAMIC_BUILD
1421 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
1422 !endif
1423 !endif
1424 !endif
1425
1426 !ifdef FOSSIL_ENABLE_TCL
1427 TCLDIR = $(B)\compat\tcl-8.6
1428 TCLSRCDIR = $(TCLDIR)
1429 TCLINCDIR = $(TCLSRCDIR)\generic
1430 !endif
1431
1432 # zlib options
1433 ZINCDIR = $(B)\compat\zlib
1434 ZLIBDIR = $(B)\compat\zlib
1435
1436 !ifdef FOSSIL_DYNAMIC_BUILD
1437 ZLIB = zdll.lib
1438 !else
1439 ZLIB = zlib.lib
1440 !endif
1441
1442 INCL = /I. /I$(SRCDIR) /I$B\win\include
1443
1444 !ifndef FOSSIL_ENABLE_MINIZ
1445 INCL = $(INCL) /I$(ZINCDIR)
1446 !endif
1447
1448 !ifdef FOSSIL_ENABLE_SSL
1449 INCL = $(INCL) /I$(SSLINCDIR)
1450 !endif
1451
1452 !ifdef FOSSIL_ENABLE_TCL
1453 INCL = $(INCL) /I$(TCLINCDIR)
1454 !endif
1455
1456 CFLAGS = /nologo
1457 LDFLAGS =
1458
1459 !ifdef FOSSIL_DYNAMIC_BUILD
1460 LDFLAGS = $(LDFLAGS) /MANIFEST
1461 !else
1462 LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO
1463 !endif
1464
1465 !ifdef FOSSIL_ENABLE_WINXP
1466 XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
1467 CFLAGS = $(CFLAGS) $(XPCFLAGS)
1468 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1469 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1470 !else
@@ -1471,25 +1495,25 @@
1471 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1472 !endif
1473 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1474 !endif
1475
1476 !ifdef FOSSIL_DYNAMIC_BUILD
1477 !ifdef DEBUG
1478 CRTFLAGS = /MDd
1479 !else
1480 CRTFLAGS = /MD
1481 !endif
1482 !else
1483 !ifdef DEBUG
1484 CRTFLAGS = /MTd
1485 !else
1486 CRTFLAGS = /MT
1487 !endif
1488 !endif
1489
1490 !ifdef DEBUG
1491 CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od
1492 LDFLAGS = $(LDFLAGS) /DEBUG
1493 !else
1494 CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2
1495 !endif
@@ -1499,53 +1523,53 @@
1499 RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL)
1500 MTC = mt
1501 LIBS = ws2_32.lib advapi32.lib
1502 LIBDIR =
1503
1504 !ifdef FOSSIL_DYNAMIC_BUILD
1505 TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1
1506 RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1
1507 !endif
1508
1509 !ifndef FOSSIL_ENABLE_MINIZ
1510 LIBS = $(LIBS) $(ZLIB)
1511 LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR)
1512 !endif
1513
1514 !ifdef FOSSIL_ENABLE_MINIZ
1515 TCC = $(TCC) /DFOSSIL_ENABLE_MINIZ=1
1516 RCC = $(RCC) /DFOSSIL_ENABLE_MINIZ=1
1517 !endif
1518
1519 !ifdef FOSSIL_ENABLE_JSON
1520 TCC = $(TCC) /DFOSSIL_ENABLE_JSON=1
1521 RCC = $(RCC) /DFOSSIL_ENABLE_JSON=1
1522 !endif
1523
1524 !ifdef FOSSIL_ENABLE_SSL
1525 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1526 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1527 LIBS = $(LIBS) $(SSLLIB)
1528 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1529 !endif
1530
1531 !ifdef FOSSIL_ENABLE_LEGACY_MV_RM
1532 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1533 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1534 !endif
1535
1536 !ifdef FOSSIL_ENABLE_TH1_DOCS
1537 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1538 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1539 !endif
1540
1541 !ifdef FOSSIL_ENABLE_TH1_HOOKS
1542 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1543 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1544 !endif
1545
1546 !ifdef FOSSIL_ENABLE_TCL
1547 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
1548 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
1549 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1550 RCC = $(RCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1551 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
@@ -1597,11 +1621,11 @@
1597 writeln -nonewline "\$(OX)\\$s\$O"; incr i
1598 }
1599 if {$i > 0} {
1600 writeln " \\"
1601 }
1602 writeln "!ifdef FOSSIL_ENABLE_MINIZ"
1603 writeln -nonewline " "
1604 writeln "\$(OX)\\miniz\$O \\"; incr i
1605 writeln "!endif"
1606 writeln -nonewline " \$(OX)\\fossil.res\n\n"
1607 writeln [string map [list <<<NEXT_LINE>>> \\] {
@@ -1611,39 +1635,39 @@
1611
1612 all: $(OX) $(APPNAME)
1613
1614 zlib:
1615 @echo Building zlib from "$(ZLIBDIR)"...
1616 !ifdef FOSSIL_ENABLE_WINXP
1617 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
1618 !else
1619 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
1620 !endif
1621
1622 !ifdef FOSSIL_ENABLE_SSL
1623 openssl:
1624 @echo Building OpenSSL from "$(SSLDIR)"...
1625 !if "$(PERLDIR)" != ""
1626 @set PATH=$(PERLDIR);$(PATH)
1627 !endif
1628 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
1629 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
1630 !ifdef FOSSIL_ENABLE_WINXP
1631 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS) $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
1632 !else
1633 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd
1634 !endif
1635 !endif
1636
1637 !ifndef FOSSIL_ENABLE_MINIZ
1638 !ifdef FOSSIL_BUILD_ZLIB
1639 APPTARGETS = $(APPTARGETS) zlib
1640 !endif
1641 !endif
1642
1643 !ifdef FOSSIL_ENABLE_SSL
1644 !ifdef FOSSIL_BUILD_SSL
1645 APPTARGETS = $(APPTARGETS) openssl
1646 !endif
1647 !endif
1648
1649 $(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts
@@ -1658,11 +1682,11 @@
1658 foreach s [lsort [concat $src $AdditionalObj]] {
1659 writeln "\techo \$(OX)\\$s.obj $redir \$@"
1660 set redir {>>}
1661 }
1662 set redir {>>}
1663 writeln "!ifdef FOSSIL_ENABLE_MINIZ"
1664 writeln "\techo \$(OX)\\miniz.obj $redir \$@"
1665 writeln "!endif"
1666 writeln "\techo \$(LIBS) $redir \$@"
1667 writeln {
1668 $(OX):
1669
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1312,50 +1312,74 @@
1312 # be built from source code. The PERLDIR variable should point to
1313 # the directory containing the main Perl binary (i.e. "perl.exe").
1314 PERLDIR = C:\Perl\bin
1315 PERL = perl.exe
1316
1317 # Enable debugging symbols?
1318 !ifndef DEBUG
1319 DEBUG = 0
1320 !endif
1321
1322 # Build the OpenSSL libraries?
1323 !ifndef FOSSIL_BUILD_SSL
1324 FOSSIL_BUILD_SSL = 0
1325 !endif
1326
1327 # Build the included zlib library?
1328 !ifndef FOSSIL_BUILD_ZLIB
1329 FOSSIL_BUILD_ZLIB = 0
1330 !endif
1331
1332 # Link everything except SQLite dynamically?
1333 !ifndef FOSSIL_DYNAMIC_BUILD
1334 FOSSIL_DYNAMIC_BUILD = 0
1335 !endif
1336
1337 # Enable the JSON API?
1338 !ifndef FOSSIL_ENABLE_JSON
1339 FOSSIL_ENABLE_JSON = 0
1340 !endif
1341
1342 # Enable legacy treatment of the mv/rm commands?
1343 !ifndef FOSSIL_ENABLE_LEGACY_MV_RM
1344 FOSSIL_ENABLE_LEGACY_MV_RM = 0
1345 !endif
1346
1347 # Enable use of miniz instead of zlib?
1348 !ifndef FOSSIL_ENABLE_MINIZ
1349 FOSSIL_ENABLE_MINIZ = 0
1350 !endif
1351
1352 # Enable OpenSSL support?
1353 !ifndef FOSSIL_ENABLE_SSL
1354 FOSSIL_ENABLE_SSL = 0
1355 !endif
1356
1357 # Enable the Tcl integration subsystem?
1358 !ifndef FOSSIL_ENABLE_TCL
1359 FOSSIL_ENABLE_TCL = 0
1360 !endif
1361
1362 # Enable TH1 scripts in embedded documentation files?
1363 !ifndef FOSSIL_ENABLE_TH1_DOCS
1364 FOSSIL_ENABLE_TH1_DOCS = 0
1365 !endif
1366
1367 # Enable TH1 hooks for commands and web pages?
1368 !ifndef FOSSIL_ENABLE_TH1_HOOKS
1369 FOSSIL_ENABLE_TH1_HOOKS = 0
1370 !endif
1371
1372 # Enable support for Windows XP with Visual Studio 201x?
1373 !ifndef FOSSIL_ENABLE_WINXP
1374 FOSSIL_ENABLE_WINXP = 0
1375 !endif
1376
1377 !if $(FOSSIL_ENABLE_SSL)!=0
1378 SSLDIR = $(B)\compat\openssl-1.0.2c
1379 SSLINCDIR = $(SSLDIR)\inc32
1380 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1381 SSLLIBDIR = $(SSLDIR)\out32dll
1382 !else
1383 SSLLIBDIR = $(SSLDIR)\out32
1384 !endif
1385 SSLLFLAGS = /nologo /opt:ref /debug
@@ -1363,108 +1387,108 @@
1387 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1388 !message Using 'x64' platform for OpenSSL...
1389 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1390 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
1391 SSLCONFIG = VC-WIN64A no-asm
1392 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1393 SSLCONFIG = $(SSLCONFIG) shared
1394 !else
1395 SSLCONFIG = $(SSLCONFIG) no-shared
1396 !endif
1397 SSLSETUP = ms\do_win64a.bat
1398 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1399 SSLNMAKE = ms\ntdll.mak all
1400 !else
1401 SSLNMAKE = ms\nt.mak all
1402 !endif
1403 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1404 !if $(FOSSIL_DYNAMIC_BUILD)==0
1405 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
1406 !endif
1407 !elseif "$(PLATFORM)"=="ia64"
1408 !message Using 'ia64' platform for OpenSSL...
1409 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1410 # SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3
1411 SSLCONFIG = VC-WIN64I no-asm
1412 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1413 SSLCONFIG = $(SSLCONFIG) shared
1414 !else
1415 SSLCONFIG = $(SSLCONFIG) no-shared
1416 !endif
1417 SSLSETUP = ms\do_win64i.bat
1418 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1419 SSLNMAKE = ms\ntdll.mak all
1420 !else
1421 SSLNMAKE = ms\nt.mak all
1422 !endif
1423 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1424 !if $(FOSSIL_DYNAMIC_BUILD)==0
1425 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
1426 !endif
1427 !else
1428 !message Assuming 'x86' platform for OpenSSL...
1429 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1430 # SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3
1431 SSLCONFIG = VC-WIN32 no-asm
1432 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1433 SSLCONFIG = $(SSLCONFIG) shared
1434 !else
1435 SSLCONFIG = $(SSLCONFIG) no-shared
1436 !endif
1437 SSLSETUP = ms\do_ms.bat
1438 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1439 SSLNMAKE = ms\ntdll.mak all
1440 !else
1441 SSLNMAKE = ms\nt.mak all
1442 !endif
1443 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
1444 !if $(FOSSIL_DYNAMIC_BUILD)==0
1445 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
1446 !endif
1447 !endif
1448 !endif
1449
1450 !if $(FOSSIL_ENABLE_TCL)!=0
1451 TCLDIR = $(B)\compat\tcl-8.6
1452 TCLSRCDIR = $(TCLDIR)
1453 TCLINCDIR = $(TCLSRCDIR)\generic
1454 !endif
1455
1456 # zlib options
1457 ZINCDIR = $(B)\compat\zlib
1458 ZLIBDIR = $(B)\compat\zlib
1459
1460 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1461 ZLIB = zdll.lib
1462 !else
1463 ZLIB = zlib.lib
1464 !endif
1465
1466 INCL = /I. /I$(SRCDIR) /I$B\win\include
1467
1468 !if $(FOSSIL_ENABLE_MINIZ)==0
1469 INCL = $(INCL) /I$(ZINCDIR)
1470 !endif
1471
1472 !if $(FOSSIL_ENABLE_SSL)!=0
1473 INCL = $(INCL) /I$(SSLINCDIR)
1474 !endif
1475
1476 !if $(FOSSIL_ENABLE_TCL)!=0
1477 INCL = $(INCL) /I$(TCLINCDIR)
1478 !endif
1479
1480 CFLAGS = /nologo
1481 LDFLAGS =
1482
1483 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1484 LDFLAGS = $(LDFLAGS) /MANIFEST
1485 !else
1486 LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO
1487 !endif
1488
1489 !if $(FOSSIL_ENABLE_WINXP)!=0
1490 XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
1491 CFLAGS = $(CFLAGS) $(XPCFLAGS)
1492 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1493 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1494 !else
@@ -1471,25 +1495,25 @@
1495 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1496 !endif
1497 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1498 !endif
1499
1500 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1501 !if $(DEBUG)!=0
1502 CRTFLAGS = /MDd
1503 !else
1504 CRTFLAGS = /MD
1505 !endif
1506 !else
1507 !if $(DEBUG)!=0
1508 CRTFLAGS = /MTd
1509 !else
1510 CRTFLAGS = /MT
1511 !endif
1512 !endif
1513
1514 !if $(DEBUG)!=0
1515 CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od
1516 LDFLAGS = $(LDFLAGS) /DEBUG
1517 !else
1518 CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2
1519 !endif
@@ -1499,53 +1523,53 @@
1523 RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL)
1524 MTC = mt
1525 LIBS = ws2_32.lib advapi32.lib
1526 LIBDIR =
1527
1528 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1529 TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1
1530 RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1
1531 !endif
1532
1533 !if $(FOSSIL_ENABLE_MINIZ)==0
1534 LIBS = $(LIBS) $(ZLIB)
1535 LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR)
1536 !endif
1537
1538 !if $(FOSSIL_ENABLE_MINIZ)!=0
1539 TCC = $(TCC) /DFOSSIL_ENABLE_MINIZ=1
1540 RCC = $(RCC) /DFOSSIL_ENABLE_MINIZ=1
1541 !endif
1542
1543 !if $(FOSSIL_ENABLE_JSON)!=0
1544 TCC = $(TCC) /DFOSSIL_ENABLE_JSON=1
1545 RCC = $(RCC) /DFOSSIL_ENABLE_JSON=1
1546 !endif
1547
1548 !if $(FOSSIL_ENABLE_SSL)!=0
1549 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1550 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1551 LIBS = $(LIBS) $(SSLLIB)
1552 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1553 !endif
1554
1555 !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
1556 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1557 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1558 !endif
1559
1560 !if $(FOSSIL_ENABLE_TH1_DOCS)!=0
1561 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1562 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1563 !endif
1564
1565 !if $(FOSSIL_ENABLE_TH1_HOOKS)!=0
1566 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1567 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1568 !endif
1569
1570 !if $(FOSSIL_ENABLE_TCL)!=0
1571 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
1572 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
1573 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1574 RCC = $(RCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1575 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
@@ -1597,11 +1621,11 @@
1621 writeln -nonewline "\$(OX)\\$s\$O"; incr i
1622 }
1623 if {$i > 0} {
1624 writeln " \\"
1625 }
1626 writeln "!if \$(FOSSIL_ENABLE_MINIZ)!=0"
1627 writeln -nonewline " "
1628 writeln "\$(OX)\\miniz\$O \\"; incr i
1629 writeln "!endif"
1630 writeln -nonewline " \$(OX)\\fossil.res\n\n"
1631 writeln [string map [list <<<NEXT_LINE>>> \\] {
@@ -1611,39 +1635,39 @@
1635
1636 all: $(OX) $(APPNAME)
1637
1638 zlib:
1639 @echo Building zlib from "$(ZLIBDIR)"...
1640 !if $(FOSSIL_ENABLE_WINXP)!=0
1641 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
1642 !else
1643 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
1644 !endif
1645
1646 !if $(FOSSIL_ENABLE_SSL)!=0
1647 openssl:
1648 @echo Building OpenSSL from "$(SSLDIR)"...
1649 !if "$(PERLDIR)" != ""
1650 @set PATH=$(PERLDIR);$(PATH)
1651 !endif
1652 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
1653 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
1654 !if $(FOSSIL_ENABLE_WINXP)!=0
1655 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS) $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
1656 !else
1657 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd
1658 !endif
1659 !endif
1660
1661 !if $(FOSSIL_ENABLE_MINIZ)==0
1662 !if $(FOSSIL_BUILD_ZLIB)!=0
1663 APPTARGETS = $(APPTARGETS) zlib
1664 !endif
1665 !endif
1666
1667 !if $(FOSSIL_ENABLE_SSL)!=0
1668 !if $(FOSSIL_BUILD_SSL)!=0
1669 APPTARGETS = $(APPTARGETS) openssl
1670 !endif
1671 !endif
1672
1673 $(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts
@@ -1658,11 +1682,11 @@
1682 foreach s [lsort [concat $src $AdditionalObj]] {
1683 writeln "\techo \$(OX)\\$s.obj $redir \$@"
1684 set redir {>>}
1685 }
1686 set redir {>>}
1687 writeln "!if \$(FOSSIL_ENABLE_MINIZ)!=0"
1688 writeln "\techo \$(OX)\\miniz.obj $redir \$@"
1689 writeln "!endif"
1690 writeln "\techo \$(LIBS) $redir \$@"
1691 writeln {
1692 $(OX):
1693
+100 -76
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -27,50 +27,74 @@
2727
# be built from source code. The PERLDIR variable should point to
2828
# the directory containing the main Perl binary (i.e. "perl.exe").
2929
PERLDIR = C:\Perl\bin
3030
PERL = perl.exe
3131
32
-# Uncomment to enable debug symbols
33
-# DEBUG = 1
34
-
35
-# Uncomment to link everything except SQLite dynamically
36
-# FOSSIL_DYNAMIC_BUILD = 1
37
-
38
-# Uncomment to support Windows XP with Visual Studio 201x
39
-# FOSSIL_ENABLE_WINXP = 1
40
-
41
-# Uncomment to enable JSON API
42
-# FOSSIL_ENABLE_JSON = 1
43
-
44
-# Uncomment to enable miniz usage
45
-# FOSSIL_ENABLE_MINIZ = 1
46
-
47
-# Uncomment to enable SSL support
48
-# FOSSIL_ENABLE_SSL = 1
49
-
50
-# Uncomment to build zlib library
51
-FOSSIL_BUILD_ZLIB = 1
52
-
53
-# Uncomment to build SSL libraries
54
-# FOSSIL_BUILD_SSL = 1
55
-
56
-# Uncomment to enable legacy treatment of mv/rm
57
-# FOSSIL_ENABLE_LEGACY_MV_RM = 1
58
-
59
-# Uncomment to enable TH1 scripts in embedded documentation files
60
-# FOSSIL_ENABLE_TH1_DOCS = 1
61
-
62
-# Uncomment to enable TH1 hooks
63
-# FOSSIL_ENABLE_TH1_HOOKS = 1
64
-
65
-# Uncomment to enable Tcl support
66
-# FOSSIL_ENABLE_TCL = 1
67
-
68
-!ifdef FOSSIL_ENABLE_SSL
32
+# Enable debugging symbols?
33
+!ifndef DEBUG
34
+DEBUG = 0
35
+!endif
36
+
37
+# Build the OpenSSL libraries?
38
+!ifndef FOSSIL_BUILD_SSL
39
+FOSSIL_BUILD_SSL = 0
40
+!endif
41
+
42
+# Build the included zlib library?
43
+!ifndef FOSSIL_BUILD_ZLIB
44
+FOSSIL_BUILD_ZLIB = 0
45
+!endif
46
+
47
+# Link everything except SQLite dynamically?
48
+!ifndef FOSSIL_DYNAMIC_BUILD
49
+FOSSIL_DYNAMIC_BUILD = 0
50
+!endif
51
+
52
+# Enable the JSON API?
53
+!ifndef FOSSIL_ENABLE_JSON
54
+FOSSIL_ENABLE_JSON = 0
55
+!endif
56
+
57
+# Enable legacy treatment of the mv/rm commands?
58
+!ifndef FOSSIL_ENABLE_LEGACY_MV_RM
59
+FOSSIL_ENABLE_LEGACY_MV_RM = 0
60
+!endif
61
+
62
+# Enable use of miniz instead of zlib?
63
+!ifndef FOSSIL_ENABLE_MINIZ
64
+FOSSIL_ENABLE_MINIZ = 0
65
+!endif
66
+
67
+# Enable OpenSSL support?
68
+!ifndef FOSSIL_ENABLE_SSL
69
+FOSSIL_ENABLE_SSL = 0
70
+!endif
71
+
72
+# Enable the Tcl integration subsystem?
73
+!ifndef FOSSIL_ENABLE_TCL
74
+FOSSIL_ENABLE_TCL = 0
75
+!endif
76
+
77
+# Enable TH1 scripts in embedded documentation files?
78
+!ifndef FOSSIL_ENABLE_TH1_DOCS
79
+FOSSIL_ENABLE_TH1_DOCS = 0
80
+!endif
81
+
82
+# Enable TH1 hooks for commands and web pages?
83
+!ifndef FOSSIL_ENABLE_TH1_HOOKS
84
+FOSSIL_ENABLE_TH1_HOOKS = 0
85
+!endif
86
+
87
+# Enable support for Windows XP with Visual Studio 201x?
88
+!ifndef FOSSIL_ENABLE_WINXP
89
+FOSSIL_ENABLE_WINXP = 0
90
+!endif
91
+
92
+!if $(FOSSIL_ENABLE_SSL)!=0
6993
SSLDIR = $(B)\compat\openssl-1.0.2c
7094
SSLINCDIR = $(SSLDIR)\inc32
71
-!ifdef FOSSIL_DYNAMIC_BUILD
95
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
7296
SSLLIBDIR = $(SSLDIR)\out32dll
7397
!else
7498
SSLLIBDIR = $(SSLDIR)\out32
7599
!endif
76100
SSLLFLAGS = /nologo /opt:ref /debug
@@ -78,108 +102,108 @@
78102
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
79103
!message Using 'x64' platform for OpenSSL...
80104
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
81105
# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
82106
SSLCONFIG = VC-WIN64A no-asm
83
-!ifdef FOSSIL_DYNAMIC_BUILD
107
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
84108
SSLCONFIG = $(SSLCONFIG) shared
85109
!else
86110
SSLCONFIG = $(SSLCONFIG) no-shared
87111
!endif
88112
SSLSETUP = ms\do_win64a.bat
89
-!ifdef FOSSIL_DYNAMIC_BUILD
113
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
90114
SSLNMAKE = ms\ntdll.mak all
91115
!else
92116
SSLNMAKE = ms\nt.mak all
93117
!endif
94118
# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
95
-!ifndef FOSSIL_DYNAMIC_BUILD
119
+!if $(FOSSIL_DYNAMIC_BUILD)==0
96120
SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
97121
!endif
98122
!elseif "$(PLATFORM)"=="ia64"
99123
!message Using 'ia64' platform for OpenSSL...
100124
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
101125
# SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3
102126
SSLCONFIG = VC-WIN64I no-asm
103
-!ifdef FOSSIL_DYNAMIC_BUILD
127
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
104128
SSLCONFIG = $(SSLCONFIG) shared
105129
!else
106130
SSLCONFIG = $(SSLCONFIG) no-shared
107131
!endif
108132
SSLSETUP = ms\do_win64i.bat
109
-!ifdef FOSSIL_DYNAMIC_BUILD
133
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
110134
SSLNMAKE = ms\ntdll.mak all
111135
!else
112136
SSLNMAKE = ms\nt.mak all
113137
!endif
114138
# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
115
-!ifndef FOSSIL_DYNAMIC_BUILD
139
+!if $(FOSSIL_DYNAMIC_BUILD)==0
116140
SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
117141
!endif
118142
!else
119143
!message Assuming 'x86' platform for OpenSSL...
120144
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
121145
# SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3
122146
SSLCONFIG = VC-WIN32 no-asm
123
-!ifdef FOSSIL_DYNAMIC_BUILD
147
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
124148
SSLCONFIG = $(SSLCONFIG) shared
125149
!else
126150
SSLCONFIG = $(SSLCONFIG) no-shared
127151
!endif
128152
SSLSETUP = ms\do_ms.bat
129
-!ifdef FOSSIL_DYNAMIC_BUILD
153
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
130154
SSLNMAKE = ms\ntdll.mak all
131155
!else
132156
SSLNMAKE = ms\nt.mak all
133157
!endif
134158
# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
135
-!ifndef FOSSIL_DYNAMIC_BUILD
159
+!if $(FOSSIL_DYNAMIC_BUILD)==0
136160
SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
137161
!endif
138162
!endif
139163
!endif
140164
141
-!ifdef FOSSIL_ENABLE_TCL
165
+!if $(FOSSIL_ENABLE_TCL)!=0
142166
TCLDIR = $(B)\compat\tcl-8.6
143167
TCLSRCDIR = $(TCLDIR)
144168
TCLINCDIR = $(TCLSRCDIR)\generic
145169
!endif
146170
147171
# zlib options
148172
ZINCDIR = $(B)\compat\zlib
149173
ZLIBDIR = $(B)\compat\zlib
150174
151
-!ifdef FOSSIL_DYNAMIC_BUILD
175
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
152176
ZLIB = zdll.lib
153177
!else
154178
ZLIB = zlib.lib
155179
!endif
156180
157181
INCL = /I. /I$(SRCDIR) /I$B\win\include
158182
159
-!ifndef FOSSIL_ENABLE_MINIZ
183
+!if $(FOSSIL_ENABLE_MINIZ)==0
160184
INCL = $(INCL) /I$(ZINCDIR)
161185
!endif
162186
163
-!ifdef FOSSIL_ENABLE_SSL
187
+!if $(FOSSIL_ENABLE_SSL)!=0
164188
INCL = $(INCL) /I$(SSLINCDIR)
165189
!endif
166190
167
-!ifdef FOSSIL_ENABLE_TCL
191
+!if $(FOSSIL_ENABLE_TCL)!=0
168192
INCL = $(INCL) /I$(TCLINCDIR)
169193
!endif
170194
171195
CFLAGS = /nologo
172196
LDFLAGS =
173197
174
-!ifdef FOSSIL_DYNAMIC_BUILD
198
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
175199
LDFLAGS = $(LDFLAGS) /MANIFEST
176200
!else
177201
LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO
178202
!endif
179203
180
-!ifdef FOSSIL_ENABLE_WINXP
204
+!if $(FOSSIL_ENABLE_WINXP)!=0
181205
XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
182206
CFLAGS = $(CFLAGS) $(XPCFLAGS)
183207
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
184208
XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
185209
!else
@@ -186,25 +210,25 @@
186210
XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
187211
!endif
188212
LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
189213
!endif
190214
191
-!ifdef FOSSIL_DYNAMIC_BUILD
192
-!ifdef DEBUG
215
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
216
+!if $(DEBUG)!=0
193217
CRTFLAGS = /MDd
194218
!else
195219
CRTFLAGS = /MD
196220
!endif
197221
!else
198
-!ifdef DEBUG
222
+!if $(DEBUG)!=0
199223
CRTFLAGS = /MTd
200224
!else
201225
CRTFLAGS = /MT
202226
!endif
203227
!endif
204228
205
-!ifdef DEBUG
229
+!if $(DEBUG)!=0
206230
CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od
207231
LDFLAGS = $(LDFLAGS) /DEBUG
208232
!else
209233
CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2
210234
!endif
@@ -214,53 +238,53 @@
214238
RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL)
215239
MTC = mt
216240
LIBS = ws2_32.lib advapi32.lib
217241
LIBDIR =
218242
219
-!ifdef FOSSIL_DYNAMIC_BUILD
243
+!if $(FOSSIL_DYNAMIC_BUILD)!=0
220244
TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1
221245
RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1
222246
!endif
223247
224
-!ifndef FOSSIL_ENABLE_MINIZ
248
+!if $(FOSSIL_ENABLE_MINIZ)==0
225249
LIBS = $(LIBS) $(ZLIB)
226250
LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR)
227251
!endif
228252
229
-!ifdef FOSSIL_ENABLE_MINIZ
253
+!if $(FOSSIL_ENABLE_MINIZ)!=0
230254
TCC = $(TCC) /DFOSSIL_ENABLE_MINIZ=1
231255
RCC = $(RCC) /DFOSSIL_ENABLE_MINIZ=1
232256
!endif
233257
234
-!ifdef FOSSIL_ENABLE_JSON
258
+!if $(FOSSIL_ENABLE_JSON)!=0
235259
TCC = $(TCC) /DFOSSIL_ENABLE_JSON=1
236260
RCC = $(RCC) /DFOSSIL_ENABLE_JSON=1
237261
!endif
238262
239
-!ifdef FOSSIL_ENABLE_SSL
263
+!if $(FOSSIL_ENABLE_SSL)!=0
240264
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
241265
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
242266
LIBS = $(LIBS) $(SSLLIB)
243267
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
244268
!endif
245269
246
-!ifdef FOSSIL_ENABLE_LEGACY_MV_RM
270
+!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
247271
TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
248272
RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
249273
!endif
250274
251
-!ifdef FOSSIL_ENABLE_TH1_DOCS
275
+!if $(FOSSIL_ENABLE_TH1_DOCS)!=0
252276
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
253277
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
254278
!endif
255279
256
-!ifdef FOSSIL_ENABLE_TH1_HOOKS
280
+!if $(FOSSIL_ENABLE_TH1_HOOKS)!=0
257281
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
258282
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
259283
!endif
260284
261
-!ifdef FOSSIL_ENABLE_TCL
285
+!if $(FOSSIL_ENABLE_TCL)!=0
262286
TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
263287
RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
264288
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
265289
RCC = $(RCC) /DFOSSIL_ENABLE_TCL_STUBS=1
266290
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
@@ -587,11 +611,11 @@
587611
$(OX)\winhttp$O \
588612
$(OX)\wysiwyg$O \
589613
$(OX)\xfer$O \
590614
$(OX)\xfersetup$O \
591615
$(OX)\zip$O \
592
-!ifdef FOSSIL_ENABLE_MINIZ
616
+!if $(FOSSIL_ENABLE_MINIZ)!=0
593617
$(OX)\miniz$O \
594618
!endif
595619
$(OX)\fossil.res
596620
597621
@@ -601,39 +625,39 @@
601625
602626
all: $(OX) $(APPNAME)
603627
604628
zlib:
605629
@echo Building zlib from "$(ZLIBDIR)"...
606
-!ifdef FOSSIL_ENABLE_WINXP
630
+!if $(FOSSIL_ENABLE_WINXP)!=0
607631
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
608632
!else
609633
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
610634
!endif
611635
612
-!ifdef FOSSIL_ENABLE_SSL
636
+!if $(FOSSIL_ENABLE_SSL)!=0
613637
openssl:
614638
@echo Building OpenSSL from "$(SSLDIR)"...
615639
!if "$(PERLDIR)" != ""
616640
@set PATH=$(PERLDIR);$(PATH)
617641
!endif
618642
@pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
619643
@pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
620
-!ifdef FOSSIL_ENABLE_WINXP
644
+!if $(FOSSIL_ENABLE_WINXP)!=0
621645
@pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS) $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
622646
!else
623647
@pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd
624648
!endif
625649
!endif
626650
627
-!ifndef FOSSIL_ENABLE_MINIZ
628
-!ifdef FOSSIL_BUILD_ZLIB
651
+!if $(FOSSIL_ENABLE_MINIZ)==0
652
+!if $(FOSSIL_BUILD_ZLIB)!=0
629653
APPTARGETS = $(APPTARGETS) zlib
630654
!endif
631655
!endif
632656
633
-!ifdef FOSSIL_ENABLE_SSL
634
-!ifdef FOSSIL_BUILD_SSL
657
+!if $(FOSSIL_ENABLE_SSL)!=0
658
+!if $(FOSSIL_BUILD_SSL)!=0
635659
APPTARGETS = $(APPTARGETS) openssl
636660
!endif
637661
!endif
638662
639663
$(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts
@@ -767,11 +791,11 @@
767791
echo $(OX)\winhttp.obj >> $@
768792
echo $(OX)\wysiwyg.obj >> $@
769793
echo $(OX)\xfer.obj >> $@
770794
echo $(OX)\xfersetup.obj >> $@
771795
echo $(OX)\zip.obj >> $@
772
-!ifdef FOSSIL_ENABLE_MINIZ
796
+!if $(FOSSIL_ENABLE_MINIZ)!=0
773797
echo $(OX)\miniz.obj >> $@
774798
!endif
775799
echo $(LIBS) >> $@
776800
777801
$(OX):
778802
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -27,50 +27,74 @@
27 # be built from source code. The PERLDIR variable should point to
28 # the directory containing the main Perl binary (i.e. "perl.exe").
29 PERLDIR = C:\Perl\bin
30 PERL = perl.exe
31
32 # Uncomment to enable debug symbols
33 # DEBUG = 1
34
35 # Uncomment to link everything except SQLite dynamically
36 # FOSSIL_DYNAMIC_BUILD = 1
37
38 # Uncomment to support Windows XP with Visual Studio 201x
39 # FOSSIL_ENABLE_WINXP = 1
40
41 # Uncomment to enable JSON API
42 # FOSSIL_ENABLE_JSON = 1
43
44 # Uncomment to enable miniz usage
45 # FOSSIL_ENABLE_MINIZ = 1
46
47 # Uncomment to enable SSL support
48 # FOSSIL_ENABLE_SSL = 1
49
50 # Uncomment to build zlib library
51 FOSSIL_BUILD_ZLIB = 1
52
53 # Uncomment to build SSL libraries
54 # FOSSIL_BUILD_SSL = 1
55
56 # Uncomment to enable legacy treatment of mv/rm
57 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
58
59 # Uncomment to enable TH1 scripts in embedded documentation files
60 # FOSSIL_ENABLE_TH1_DOCS = 1
61
62 # Uncomment to enable TH1 hooks
63 # FOSSIL_ENABLE_TH1_HOOKS = 1
64
65 # Uncomment to enable Tcl support
66 # FOSSIL_ENABLE_TCL = 1
67
68 !ifdef FOSSIL_ENABLE_SSL
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69 SSLDIR = $(B)\compat\openssl-1.0.2c
70 SSLINCDIR = $(SSLDIR)\inc32
71 !ifdef FOSSIL_DYNAMIC_BUILD
72 SSLLIBDIR = $(SSLDIR)\out32dll
73 !else
74 SSLLIBDIR = $(SSLDIR)\out32
75 !endif
76 SSLLFLAGS = /nologo /opt:ref /debug
@@ -78,108 +102,108 @@
78 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
79 !message Using 'x64' platform for OpenSSL...
80 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
81 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
82 SSLCONFIG = VC-WIN64A no-asm
83 !ifdef FOSSIL_DYNAMIC_BUILD
84 SSLCONFIG = $(SSLCONFIG) shared
85 !else
86 SSLCONFIG = $(SSLCONFIG) no-shared
87 !endif
88 SSLSETUP = ms\do_win64a.bat
89 !ifdef FOSSIL_DYNAMIC_BUILD
90 SSLNMAKE = ms\ntdll.mak all
91 !else
92 SSLNMAKE = ms\nt.mak all
93 !endif
94 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
95 !ifndef FOSSIL_DYNAMIC_BUILD
96 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
97 !endif
98 !elseif "$(PLATFORM)"=="ia64"
99 !message Using 'ia64' platform for OpenSSL...
100 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
101 # SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3
102 SSLCONFIG = VC-WIN64I no-asm
103 !ifdef FOSSIL_DYNAMIC_BUILD
104 SSLCONFIG = $(SSLCONFIG) shared
105 !else
106 SSLCONFIG = $(SSLCONFIG) no-shared
107 !endif
108 SSLSETUP = ms\do_win64i.bat
109 !ifdef FOSSIL_DYNAMIC_BUILD
110 SSLNMAKE = ms\ntdll.mak all
111 !else
112 SSLNMAKE = ms\nt.mak all
113 !endif
114 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
115 !ifndef FOSSIL_DYNAMIC_BUILD
116 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
117 !endif
118 !else
119 !message Assuming 'x86' platform for OpenSSL...
120 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
121 # SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3
122 SSLCONFIG = VC-WIN32 no-asm
123 !ifdef FOSSIL_DYNAMIC_BUILD
124 SSLCONFIG = $(SSLCONFIG) shared
125 !else
126 SSLCONFIG = $(SSLCONFIG) no-shared
127 !endif
128 SSLSETUP = ms\do_ms.bat
129 !ifdef FOSSIL_DYNAMIC_BUILD
130 SSLNMAKE = ms\ntdll.mak all
131 !else
132 SSLNMAKE = ms\nt.mak all
133 !endif
134 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
135 !ifndef FOSSIL_DYNAMIC_BUILD
136 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
137 !endif
138 !endif
139 !endif
140
141 !ifdef FOSSIL_ENABLE_TCL
142 TCLDIR = $(B)\compat\tcl-8.6
143 TCLSRCDIR = $(TCLDIR)
144 TCLINCDIR = $(TCLSRCDIR)\generic
145 !endif
146
147 # zlib options
148 ZINCDIR = $(B)\compat\zlib
149 ZLIBDIR = $(B)\compat\zlib
150
151 !ifdef FOSSIL_DYNAMIC_BUILD
152 ZLIB = zdll.lib
153 !else
154 ZLIB = zlib.lib
155 !endif
156
157 INCL = /I. /I$(SRCDIR) /I$B\win\include
158
159 !ifndef FOSSIL_ENABLE_MINIZ
160 INCL = $(INCL) /I$(ZINCDIR)
161 !endif
162
163 !ifdef FOSSIL_ENABLE_SSL
164 INCL = $(INCL) /I$(SSLINCDIR)
165 !endif
166
167 !ifdef FOSSIL_ENABLE_TCL
168 INCL = $(INCL) /I$(TCLINCDIR)
169 !endif
170
171 CFLAGS = /nologo
172 LDFLAGS =
173
174 !ifdef FOSSIL_DYNAMIC_BUILD
175 LDFLAGS = $(LDFLAGS) /MANIFEST
176 !else
177 LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO
178 !endif
179
180 !ifdef FOSSIL_ENABLE_WINXP
181 XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
182 CFLAGS = $(CFLAGS) $(XPCFLAGS)
183 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
184 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
185 !else
@@ -186,25 +210,25 @@
186 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
187 !endif
188 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
189 !endif
190
191 !ifdef FOSSIL_DYNAMIC_BUILD
192 !ifdef DEBUG
193 CRTFLAGS = /MDd
194 !else
195 CRTFLAGS = /MD
196 !endif
197 !else
198 !ifdef DEBUG
199 CRTFLAGS = /MTd
200 !else
201 CRTFLAGS = /MT
202 !endif
203 !endif
204
205 !ifdef DEBUG
206 CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od
207 LDFLAGS = $(LDFLAGS) /DEBUG
208 !else
209 CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2
210 !endif
@@ -214,53 +238,53 @@
214 RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL)
215 MTC = mt
216 LIBS = ws2_32.lib advapi32.lib
217 LIBDIR =
218
219 !ifdef FOSSIL_DYNAMIC_BUILD
220 TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1
221 RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1
222 !endif
223
224 !ifndef FOSSIL_ENABLE_MINIZ
225 LIBS = $(LIBS) $(ZLIB)
226 LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR)
227 !endif
228
229 !ifdef FOSSIL_ENABLE_MINIZ
230 TCC = $(TCC) /DFOSSIL_ENABLE_MINIZ=1
231 RCC = $(RCC) /DFOSSIL_ENABLE_MINIZ=1
232 !endif
233
234 !ifdef FOSSIL_ENABLE_JSON
235 TCC = $(TCC) /DFOSSIL_ENABLE_JSON=1
236 RCC = $(RCC) /DFOSSIL_ENABLE_JSON=1
237 !endif
238
239 !ifdef FOSSIL_ENABLE_SSL
240 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
241 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
242 LIBS = $(LIBS) $(SSLLIB)
243 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
244 !endif
245
246 !ifdef FOSSIL_ENABLE_LEGACY_MV_RM
247 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
248 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
249 !endif
250
251 !ifdef FOSSIL_ENABLE_TH1_DOCS
252 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
253 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
254 !endif
255
256 !ifdef FOSSIL_ENABLE_TH1_HOOKS
257 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
258 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
259 !endif
260
261 !ifdef FOSSIL_ENABLE_TCL
262 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
263 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
264 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
265 RCC = $(RCC) /DFOSSIL_ENABLE_TCL_STUBS=1
266 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
@@ -587,11 +611,11 @@
587 $(OX)\winhttp$O \
588 $(OX)\wysiwyg$O \
589 $(OX)\xfer$O \
590 $(OX)\xfersetup$O \
591 $(OX)\zip$O \
592 !ifdef FOSSIL_ENABLE_MINIZ
593 $(OX)\miniz$O \
594 !endif
595 $(OX)\fossil.res
596
597
@@ -601,39 +625,39 @@
601
602 all: $(OX) $(APPNAME)
603
604 zlib:
605 @echo Building zlib from "$(ZLIBDIR)"...
606 !ifdef FOSSIL_ENABLE_WINXP
607 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
608 !else
609 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
610 !endif
611
612 !ifdef FOSSIL_ENABLE_SSL
613 openssl:
614 @echo Building OpenSSL from "$(SSLDIR)"...
615 !if "$(PERLDIR)" != ""
616 @set PATH=$(PERLDIR);$(PATH)
617 !endif
618 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
619 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
620 !ifdef FOSSIL_ENABLE_WINXP
621 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS) $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
622 !else
623 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd
624 !endif
625 !endif
626
627 !ifndef FOSSIL_ENABLE_MINIZ
628 !ifdef FOSSIL_BUILD_ZLIB
629 APPTARGETS = $(APPTARGETS) zlib
630 !endif
631 !endif
632
633 !ifdef FOSSIL_ENABLE_SSL
634 !ifdef FOSSIL_BUILD_SSL
635 APPTARGETS = $(APPTARGETS) openssl
636 !endif
637 !endif
638
639 $(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts
@@ -767,11 +791,11 @@
767 echo $(OX)\winhttp.obj >> $@
768 echo $(OX)\wysiwyg.obj >> $@
769 echo $(OX)\xfer.obj >> $@
770 echo $(OX)\xfersetup.obj >> $@
771 echo $(OX)\zip.obj >> $@
772 !ifdef FOSSIL_ENABLE_MINIZ
773 echo $(OX)\miniz.obj >> $@
774 !endif
775 echo $(LIBS) >> $@
776
777 $(OX):
778
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -27,50 +27,74 @@
27 # be built from source code. The PERLDIR variable should point to
28 # the directory containing the main Perl binary (i.e. "perl.exe").
29 PERLDIR = C:\Perl\bin
30 PERL = perl.exe
31
32 # Enable debugging symbols?
33 !ifndef DEBUG
34 DEBUG = 0
35 !endif
36
37 # Build the OpenSSL libraries?
38 !ifndef FOSSIL_BUILD_SSL
39 FOSSIL_BUILD_SSL = 0
40 !endif
41
42 # Build the included zlib library?
43 !ifndef FOSSIL_BUILD_ZLIB
44 FOSSIL_BUILD_ZLIB = 0
45 !endif
46
47 # Link everything except SQLite dynamically?
48 !ifndef FOSSIL_DYNAMIC_BUILD
49 FOSSIL_DYNAMIC_BUILD = 0
50 !endif
51
52 # Enable the JSON API?
53 !ifndef FOSSIL_ENABLE_JSON
54 FOSSIL_ENABLE_JSON = 0
55 !endif
56
57 # Enable legacy treatment of the mv/rm commands?
58 !ifndef FOSSIL_ENABLE_LEGACY_MV_RM
59 FOSSIL_ENABLE_LEGACY_MV_RM = 0
60 !endif
61
62 # Enable use of miniz instead of zlib?
63 !ifndef FOSSIL_ENABLE_MINIZ
64 FOSSIL_ENABLE_MINIZ = 0
65 !endif
66
67 # Enable OpenSSL support?
68 !ifndef FOSSIL_ENABLE_SSL
69 FOSSIL_ENABLE_SSL = 0
70 !endif
71
72 # Enable the Tcl integration subsystem?
73 !ifndef FOSSIL_ENABLE_TCL
74 FOSSIL_ENABLE_TCL = 0
75 !endif
76
77 # Enable TH1 scripts in embedded documentation files?
78 !ifndef FOSSIL_ENABLE_TH1_DOCS
79 FOSSIL_ENABLE_TH1_DOCS = 0
80 !endif
81
82 # Enable TH1 hooks for commands and web pages?
83 !ifndef FOSSIL_ENABLE_TH1_HOOKS
84 FOSSIL_ENABLE_TH1_HOOKS = 0
85 !endif
86
87 # Enable support for Windows XP with Visual Studio 201x?
88 !ifndef FOSSIL_ENABLE_WINXP
89 FOSSIL_ENABLE_WINXP = 0
90 !endif
91
92 !if $(FOSSIL_ENABLE_SSL)!=0
93 SSLDIR = $(B)\compat\openssl-1.0.2c
94 SSLINCDIR = $(SSLDIR)\inc32
95 !if $(FOSSIL_DYNAMIC_BUILD)!=0
96 SSLLIBDIR = $(SSLDIR)\out32dll
97 !else
98 SSLLIBDIR = $(SSLDIR)\out32
99 !endif
100 SSLLFLAGS = /nologo /opt:ref /debug
@@ -78,108 +102,108 @@
102 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
103 !message Using 'x64' platform for OpenSSL...
104 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
105 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
106 SSLCONFIG = VC-WIN64A no-asm
107 !if $(FOSSIL_DYNAMIC_BUILD)!=0
108 SSLCONFIG = $(SSLCONFIG) shared
109 !else
110 SSLCONFIG = $(SSLCONFIG) no-shared
111 !endif
112 SSLSETUP = ms\do_win64a.bat
113 !if $(FOSSIL_DYNAMIC_BUILD)!=0
114 SSLNMAKE = ms\ntdll.mak all
115 !else
116 SSLNMAKE = ms\nt.mak all
117 !endif
118 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
119 !if $(FOSSIL_DYNAMIC_BUILD)==0
120 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
121 !endif
122 !elseif "$(PLATFORM)"=="ia64"
123 !message Using 'ia64' platform for OpenSSL...
124 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
125 # SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3
126 SSLCONFIG = VC-WIN64I no-asm
127 !if $(FOSSIL_DYNAMIC_BUILD)!=0
128 SSLCONFIG = $(SSLCONFIG) shared
129 !else
130 SSLCONFIG = $(SSLCONFIG) no-shared
131 !endif
132 SSLSETUP = ms\do_win64i.bat
133 !if $(FOSSIL_DYNAMIC_BUILD)!=0
134 SSLNMAKE = ms\ntdll.mak all
135 !else
136 SSLNMAKE = ms\nt.mak all
137 !endif
138 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
139 !if $(FOSSIL_DYNAMIC_BUILD)==0
140 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
141 !endif
142 !else
143 !message Assuming 'x86' platform for OpenSSL...
144 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
145 # SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3
146 SSLCONFIG = VC-WIN32 no-asm
147 !if $(FOSSIL_DYNAMIC_BUILD)!=0
148 SSLCONFIG = $(SSLCONFIG) shared
149 !else
150 SSLCONFIG = $(SSLCONFIG) no-shared
151 !endif
152 SSLSETUP = ms\do_ms.bat
153 !if $(FOSSIL_DYNAMIC_BUILD)!=0
154 SSLNMAKE = ms\ntdll.mak all
155 !else
156 SSLNMAKE = ms\nt.mak all
157 !endif
158 # BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds.
159 !if $(FOSSIL_DYNAMIC_BUILD)==0
160 SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3
161 !endif
162 !endif
163 !endif
164
165 !if $(FOSSIL_ENABLE_TCL)!=0
166 TCLDIR = $(B)\compat\tcl-8.6
167 TCLSRCDIR = $(TCLDIR)
168 TCLINCDIR = $(TCLSRCDIR)\generic
169 !endif
170
171 # zlib options
172 ZINCDIR = $(B)\compat\zlib
173 ZLIBDIR = $(B)\compat\zlib
174
175 !if $(FOSSIL_DYNAMIC_BUILD)!=0
176 ZLIB = zdll.lib
177 !else
178 ZLIB = zlib.lib
179 !endif
180
181 INCL = /I. /I$(SRCDIR) /I$B\win\include
182
183 !if $(FOSSIL_ENABLE_MINIZ)==0
184 INCL = $(INCL) /I$(ZINCDIR)
185 !endif
186
187 !if $(FOSSIL_ENABLE_SSL)!=0
188 INCL = $(INCL) /I$(SSLINCDIR)
189 !endif
190
191 !if $(FOSSIL_ENABLE_TCL)!=0
192 INCL = $(INCL) /I$(TCLINCDIR)
193 !endif
194
195 CFLAGS = /nologo
196 LDFLAGS =
197
198 !if $(FOSSIL_DYNAMIC_BUILD)!=0
199 LDFLAGS = $(LDFLAGS) /MANIFEST
200 !else
201 LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO
202 !endif
203
204 !if $(FOSSIL_ENABLE_WINXP)!=0
205 XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
206 CFLAGS = $(CFLAGS) $(XPCFLAGS)
207 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
208 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
209 !else
@@ -186,25 +210,25 @@
210 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
211 !endif
212 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
213 !endif
214
215 !if $(FOSSIL_DYNAMIC_BUILD)!=0
216 !if $(DEBUG)!=0
217 CRTFLAGS = /MDd
218 !else
219 CRTFLAGS = /MD
220 !endif
221 !else
222 !if $(DEBUG)!=0
223 CRTFLAGS = /MTd
224 !else
225 CRTFLAGS = /MT
226 !endif
227 !endif
228
229 !if $(DEBUG)!=0
230 CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od
231 LDFLAGS = $(LDFLAGS) /DEBUG
232 !else
233 CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2
234 !endif
@@ -214,53 +238,53 @@
238 RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL)
239 MTC = mt
240 LIBS = ws2_32.lib advapi32.lib
241 LIBDIR =
242
243 !if $(FOSSIL_DYNAMIC_BUILD)!=0
244 TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1
245 RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1
246 !endif
247
248 !if $(FOSSIL_ENABLE_MINIZ)==0
249 LIBS = $(LIBS) $(ZLIB)
250 LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR)
251 !endif
252
253 !if $(FOSSIL_ENABLE_MINIZ)!=0
254 TCC = $(TCC) /DFOSSIL_ENABLE_MINIZ=1
255 RCC = $(RCC) /DFOSSIL_ENABLE_MINIZ=1
256 !endif
257
258 !if $(FOSSIL_ENABLE_JSON)!=0
259 TCC = $(TCC) /DFOSSIL_ENABLE_JSON=1
260 RCC = $(RCC) /DFOSSIL_ENABLE_JSON=1
261 !endif
262
263 !if $(FOSSIL_ENABLE_SSL)!=0
264 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
265 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
266 LIBS = $(LIBS) $(SSLLIB)
267 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
268 !endif
269
270 !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
271 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
272 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
273 !endif
274
275 !if $(FOSSIL_ENABLE_TH1_DOCS)!=0
276 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
277 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
278 !endif
279
280 !if $(FOSSIL_ENABLE_TH1_HOOKS)!=0
281 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
282 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
283 !endif
284
285 !if $(FOSSIL_ENABLE_TCL)!=0
286 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
287 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
288 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
289 RCC = $(RCC) /DFOSSIL_ENABLE_TCL_STUBS=1
290 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
@@ -587,11 +611,11 @@
611 $(OX)\winhttp$O \
612 $(OX)\wysiwyg$O \
613 $(OX)\xfer$O \
614 $(OX)\xfersetup$O \
615 $(OX)\zip$O \
616 !if $(FOSSIL_ENABLE_MINIZ)!=0
617 $(OX)\miniz$O \
618 !endif
619 $(OX)\fossil.res
620
621
@@ -601,39 +625,39 @@
625
626 all: $(OX) $(APPNAME)
627
628 zlib:
629 @echo Building zlib from "$(ZLIBDIR)"...
630 !if $(FOSSIL_ENABLE_WINXP)!=0
631 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
632 !else
633 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
634 !endif
635
636 !if $(FOSSIL_ENABLE_SSL)!=0
637 openssl:
638 @echo Building OpenSSL from "$(SSLDIR)"...
639 !if "$(PERLDIR)" != ""
640 @set PATH=$(PERLDIR);$(PATH)
641 !endif
642 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
643 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
644 !if $(FOSSIL_ENABLE_WINXP)!=0
645 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS) $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
646 !else
647 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd
648 !endif
649 !endif
650
651 !if $(FOSSIL_ENABLE_MINIZ)==0
652 !if $(FOSSIL_BUILD_ZLIB)!=0
653 APPTARGETS = $(APPTARGETS) zlib
654 !endif
655 !endif
656
657 !if $(FOSSIL_ENABLE_SSL)!=0
658 !if $(FOSSIL_BUILD_SSL)!=0
659 APPTARGETS = $(APPTARGETS) openssl
660 !endif
661 !endif
662
663 $(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts
@@ -767,11 +791,11 @@
791 echo $(OX)\winhttp.obj >> $@
792 echo $(OX)\wysiwyg.obj >> $@
793 echo $(OX)\xfer.obj >> $@
794 echo $(OX)\xfersetup.obj >> $@
795 echo $(OX)\zip.obj >> $@
796 !if $(FOSSIL_ENABLE_MINIZ)!=0
797 echo $(OX)\miniz.obj >> $@
798 !endif
799 echo $(LIBS) >> $@
800
801 $(OX):
802
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -45,10 +45,21 @@
4545
IF DEFINED VSVARS32 IF EXIST "%VSVARS32%" (
4646
%_AECHO% Build environment batch file manually overridden to "%VSVARS32%"...
4747
GOTO skip_detectVisualStudio
4848
)
4949
50
+REM
51
+REM Visual Studio 2015
52
+REM
53
+IF NOT DEFINED VS140COMNTOOLS GOTO skip_detectVisualStudio2015
54
+SET VSVARS32=%VS140COMNTOOLS%\vsvars32.bat
55
+IF EXIST "%VSVARS32%" (
56
+ %_AECHO% Using Visual Studio 2015...
57
+ GOTO skip_detectVisualStudio
58
+)
59
+:skip_detectVisualStudio2015
60
+
5061
REM
5162
REM Visual Studio 2013
5263
REM
5364
IF NOT DEFINED VS120COMNTOOLS GOTO skip_detectVisualStudio2013
5465
SET VSVARS32=%VS120COMNTOOLS%\vsvars32.bat
5566
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -45,10 +45,21 @@
45 IF DEFINED VSVARS32 IF EXIST "%VSVARS32%" (
46 %_AECHO% Build environment batch file manually overridden to "%VSVARS32%"...
47 GOTO skip_detectVisualStudio
48 )
49
 
 
 
 
 
 
 
 
 
 
 
50 REM
51 REM Visual Studio 2013
52 REM
53 IF NOT DEFINED VS120COMNTOOLS GOTO skip_detectVisualStudio2013
54 SET VSVARS32=%VS120COMNTOOLS%\vsvars32.bat
55
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -45,10 +45,21 @@
45 IF DEFINED VSVARS32 IF EXIST "%VSVARS32%" (
46 %_AECHO% Build environment batch file manually overridden to "%VSVARS32%"...
47 GOTO skip_detectVisualStudio
48 )
49
50 REM
51 REM Visual Studio 2015
52 REM
53 IF NOT DEFINED VS140COMNTOOLS GOTO skip_detectVisualStudio2015
54 SET VSVARS32=%VS140COMNTOOLS%\vsvars32.bat
55 IF EXIST "%VSVARS32%" (
56 %_AECHO% Using Visual Studio 2015...
57 GOTO skip_detectVisualStudio
58 )
59 :skip_detectVisualStudio2015
60
61 REM
62 REM Visual Studio 2013
63 REM
64 IF NOT DEFINED VS120COMNTOOLS GOTO skip_detectVisualStudio2013
65 SET VSVARS32=%VS120COMNTOOLS%\vsvars32.bat
66

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button