Index: Makefile.classic ================================================================== --- Makefile.classic +++ Makefile.classic @@ -41,24 +41,26 @@ # FOSSIL_ENABLE_MINIZ = 1 # TCC += -DFOSSIL_ENABLE_MINIZ # To add support for HTTPS TCC += -DFOSSIL_ENABLE_SSL + +#### We sometimes add the -static option here so that we can build a +# static executable that will run in a chroot jail. +#LIB = -static +TCC += -DFOSSIL_DYNAMIC_BUILD=1 #### Extra arguments for linking the finished binary. Fossil needs # to link against the Z-Lib compression library unless the miniz # library in the source tree is being used. There are no other -# required dependencies. We sometimes add the -static option -# here so that we can build a static executable that will run in -# a chroot jail. -# +# required dependencies. ZLIB_LIB.0 = -lz ZLIB_LIB.1 = ZLIB_LIB. = $(ZLIB_LIB.0) # If using zlib: -LIB = $(ZLIB_LIB.$(FOSSIL_ENABLE_MINIZ)) $(LDFLAGS) +LIB += $(ZLIB_LIB.$(FOSSIL_ENABLE_MINIZ)) $(LDFLAGS) # If using HTTPS: LIB += -lcrypto -lssl #### Tcl shell for use in running the fossil testsuite. If you do not Index: auto.def ================================================================== --- auto.def +++ auto.def @@ -113,10 +113,13 @@ if {[opt-bool static]} { # XXX: This will not work on all systems. define-append EXTRA_LDFLAGS -static msg-result "Trying to link statically" +} else { + define-append EXTRA_CFLAGS -DFOSSIL_DYNAMIC_BUILD=1 + define FOSSIL_DYNAMIC_BUILD } set tclpath [opt-val with-tcl] if {$tclpath ne ""} { set tclprivatestubs [opt-bool with-tcl-private-stubs] Index: src/main.c ================================================================== --- src/main.c +++ src/main.c @@ -1045,10 +1045,13 @@ #if defined(BROKEN_MINGW_CMDLINE) fossil_print("MBCS_COMMAND_LINE\n"); #else fossil_print("UNICODE_COMMAND_LINE\n"); #endif +#if defined(FOSSIL_DYNAMIC_BUILD) + fossil_print("DYNAMIC_BUILD\n"); +#endif } } /* Index: src/makemake.tcl ================================================================== --- src/makemake.tcl +++ src/makemake.tcl @@ -745,14 +745,18 @@ ifdef FOSSIL_ENABLE_JSON TCC += -DFOSSIL_ENABLE_JSON=1 RCC += -DFOSSIL_ENABLE_JSON=1 endif -#### We add the -static option here so that we can build a static -# executable that will run in a chroot jail. +#### The option -static has no effect on MinGW(-w64), only dynamic +# executables can be built when linking with MSVCRT. OpenSSL +# (optional) and zlib (required) however are always linked in +# statically. Therefore, the FOSSIL_DYNAMIC_BUILD option does +# not really apply to MinGW (i.e. since ALL external libraries +# are NOT linked dynamically). # -LIB = -static +# LIB = -static #### MinGW: If available, use the Unicode capable runtime startup code. # ifndef MINGW_IS_32BIT_ONLY LIB += -municode @@ -1310,10 +1314,13 @@ PERLDIR = C:\Perl\bin PERL = perl.exe # Uncomment to enable debug symbols # DEBUG = 1 + +# Uncomment to link everything except SQLite dynamically +# FOSSIL_DYNAMIC_BUILD = 1 # Uncomment to support Windows XP with Visual Studio 201x # FOSSIL_ENABLE_WINXP = 1 # Uncomment to enable JSON API @@ -1322,10 +1329,13 @@ # Uncomment to enable miniz usage # FOSSIL_ENABLE_MINIZ = 1 # Uncomment to enable SSL support # FOSSIL_ENABLE_SSL = 1 + +# Uncomment to build zlib library +FOSSIL_BUILD_ZLIB = 1 # Uncomment to build SSL libraries # FOSSIL_BUILD_SSL = 1 # Uncomment to enable legacy treatment of mv/rm @@ -1341,37 +1351,77 @@ # FOSSIL_ENABLE_TCL = 1 !ifdef FOSSIL_ENABLE_SSL SSLDIR = $(B)\compat\openssl-1.0.2c SSLINCDIR = $(SSLDIR)\inc32 +!ifdef FOSSIL_DYNAMIC_BUILD +SSLLIBDIR = $(SSLDIR)\out32dll +!else SSLLIBDIR = $(SSLDIR)\out32 +!endif SSLLFLAGS = /nologo /opt:ref /debug SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" !message Using 'x64' platform for OpenSSL... -# BUGBUG (OpenSSL): Apparently, using "no-ssl*" here breaks the build. -# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3 no-shared -SSLCONFIG = VC-WIN64A no-asm no-shared +# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build. +# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3 +SSLCONFIG = VC-WIN64A no-asm +!ifdef FOSSIL_DYNAMIC_BUILD +SSLCONFIG = $(SSLCONFIG) shared +!else +SSLCONFIG = $(SSLCONFIG) no-shared +!endif SSLSETUP = ms\do_win64a.bat +!ifdef FOSSIL_DYNAMIC_BUILD +SSLNMAKE = ms\ntdll.mak all +!else SSLNMAKE = ms\nt.mak all +!endif +# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds. +!ifndef FOSSIL_DYNAMIC_BUILD SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 +!endif !elseif "$(PLATFORM)"=="ia64" !message Using 'ia64' platform for OpenSSL... -# BUGBUG (OpenSSL): Apparently, using "no-ssl*" here breaks the build. -# SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3 no-shared -SSLCONFIG = VC-WIN64I no-asm no-shared +# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build. +# SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3 +SSLCONFIG = VC-WIN64I no-asm +!ifdef FOSSIL_DYNAMIC_BUILD +SSLCONFIG = $(SSLCONFIG) shared +!else +SSLCONFIG = $(SSLCONFIG) no-shared +!endif SSLSETUP = ms\do_win64i.bat +!ifdef FOSSIL_DYNAMIC_BUILD +SSLNMAKE = ms\ntdll.mak all +!else SSLNMAKE = ms\nt.mak all +!endif +# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds. +!ifndef FOSSIL_DYNAMIC_BUILD SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 +!endif !else !message Assuming 'x86' platform for OpenSSL... -# BUGBUG (OpenSSL): Apparently, using "no-ssl*" here breaks the build. -# SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3 no-shared -SSLCONFIG = VC-WIN32 no-asm no-shared +# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build. +# SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3 +SSLCONFIG = VC-WIN32 no-asm +!ifdef FOSSIL_DYNAMIC_BUILD +SSLCONFIG = $(SSLCONFIG) shared +!else +SSLCONFIG = $(SSLCONFIG) no-shared +!endif SSLSETUP = ms\do_ms.bat +!ifdef FOSSIL_DYNAMIC_BUILD +SSLNMAKE = ms\ntdll.mak all +!else SSLNMAKE = ms\nt.mak all +!endif +# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds. +!ifndef FOSSIL_DYNAMIC_BUILD SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 +!endif !endif !endif !ifdef FOSSIL_ENABLE_TCL TCLDIR = $(B)\compat\tcl-8.6 @@ -1380,11 +1430,16 @@ !endif # zlib options ZINCDIR = $(B)\compat\zlib ZLIBDIR = $(B)\compat\zlib + +!ifdef FOSSIL_DYNAMIC_BUILD +ZLIB = zdll.lib +!else ZLIB = zlib.lib +!endif INCL = /I. /I$(SRCDIR) /I$B\win\include !ifndef FOSSIL_ENABLE_MINIZ INCL = $(INCL) /I$(ZINCDIR) @@ -1397,11 +1452,17 @@ !ifdef FOSSIL_ENABLE_TCL INCL = $(INCL) /I$(TCLINCDIR) !endif CFLAGS = /nologo -LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO +LDFLAGS = + +!ifdef FOSSIL_DYNAMIC_BUILD +LDFLAGS = $(LDFLAGS) /MANIFEST +!else +LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO +!endif !ifdef FOSSIL_ENABLE_WINXP XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1 CFLAGS = $(CFLAGS) $(XPCFLAGS) !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" @@ -1409,23 +1470,43 @@ !else XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01 !endif LDFLAGS = $(LDFLAGS) $(XPLDFLAGS) !endif + +!ifdef FOSSIL_DYNAMIC_BUILD +!ifdef DEBUG +CRTFLAGS = /MDd +!else +CRTFLAGS = /MD +!endif +!else +!ifdef DEBUG +CRTFLAGS = /MTd +!else +CRTFLAGS = /MT +!endif +!endif !ifdef DEBUG -CFLAGS = $(CFLAGS) /Zi /MTd /Od +CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od LDFLAGS = $(LDFLAGS) /DEBUG !else -CFLAGS = $(CFLAGS) /MT /O2 +CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2 !endif BCC = $(CC) $(CFLAGS) TCC = $(CC) /c $(CFLAGS) $(MSCDEF) $(INCL) -RCC = rc /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL) +RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL) +MTC = mt LIBS = ws2_32.lib advapi32.lib LIBDIR = + +!ifdef FOSSIL_DYNAMIC_BUILD +TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1 +RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1 +!endif !ifndef FOSSIL_ENABLE_MINIZ LIBS = $(LIBS) $(ZLIB) LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR) !endif @@ -1521,11 +1602,11 @@ writeln "!ifdef FOSSIL_ENABLE_MINIZ" writeln -nonewline " " writeln "\$(OX)\\miniz\$O \\"; incr i writeln "!endif" writeln -nonewline " \$(OX)\\fossil.res\n\n" -writeln { +writeln [string map [list <<>> \\] { APPNAME = $(OX)\fossil$(E) PDBNAME = $(OX)\fossil$(P) APPTARGETS = all: $(OX) $(APPNAME) @@ -1552,11 +1633,13 @@ @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd !endif !endif !ifndef FOSSIL_ENABLE_MINIZ +!ifdef FOSSIL_BUILD_ZLIB APPTARGETS = $(APPTARGETS) zlib +!endif !endif !ifdef FOSSIL_ENABLE_SSL !ifdef FOSSIL_BUILD_SSL APPTARGETS = $(APPTARGETS) openssl @@ -1565,12 +1648,14 @@ $(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts cd $(OX) codecheck1$E $(SRC) link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts + if exist $@.manifest <<>> + $(MTC) -nologo -manifest $@.manifest -outputresource:$@;1 -$(OX)\linkopts: $B\win\Makefile.msc} +$(OX)\linkopts: $B\win\Makefile.msc}] set redir {>} foreach s [lsort [concat $src $AdditionalObj]] { writeln "\techo \$(OX)\\$s.obj $redir \$@" set redir {>>} } Index: src/th_main.c ================================================================== --- src/th_main.c +++ src/th_main.c @@ -517,10 +517,11 @@ ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS ** "tclPrivateStubs" = FOSSIL_ENABLE_TCL_PRIVATE_STUBS ** "json" = FOSSIL_ENABLE_JSON ** "markdown" = FOSSIL_ENABLE_MARKDOWN ** "unicodeCmdLine" = !BROKEN_MINGW_CMDLINE +** "dynamicBuild" = FOSSIL_DYNAMIC_BUILD ** */ static int hasfeatureCmd( Th_Interp *interp, void *p, @@ -584,10 +585,15 @@ #endif #if !defined(BROKEN_MINGW_CMDLINE) else if( 0 == fossil_strnicmp( zArg, "unicodeCmdLine\0", 15 ) ){ rc = 1; } +#endif +#if defined(FOSSIL_DYNAMIC_BUILD) + else if( 0 == fossil_strnicmp( zArg, "dynamicBuild\0", 13 ) ){ + rc = 1; + } #endif else if( 0 == fossil_strnicmp( zArg, "markdown\0", 9 ) ){ rc = 1; } if( g.thTrace ){ Index: win/Makefile.mingw ================================================================== --- win/Makefile.mingw +++ win/Makefile.mingw @@ -298,14 +298,18 @@ ifdef FOSSIL_ENABLE_JSON TCC += -DFOSSIL_ENABLE_JSON=1 RCC += -DFOSSIL_ENABLE_JSON=1 endif -#### We add the -static option here so that we can build a static -# executable that will run in a chroot jail. +#### The option -static has no effect on MinGW(-w64), only dynamic +# executables can be built when linking with MSVCRT. OpenSSL +# (optional) and zlib (required) however are always linked in +# statically. Therefore, the FOSSIL_DYNAMIC_BUILD option does +# not really apply to MinGW (i.e. since ALL external libraries +# are NOT linked dynamically). # -LIB = -static +# LIB = -static #### MinGW: If available, use the Unicode capable runtime startup code. # ifndef MINGW_IS_32BIT_ONLY LIB += -municode Index: win/Makefile.mingw.mistachkin ================================================================== --- win/Makefile.mingw.mistachkin +++ win/Makefile.mingw.mistachkin @@ -298,14 +298,18 @@ ifdef FOSSIL_ENABLE_JSON TCC += -DFOSSIL_ENABLE_JSON=1 RCC += -DFOSSIL_ENABLE_JSON=1 endif -#### We add the -static option here so that we can build a static -# executable that will run in a chroot jail. +#### The option -static has no effect on MinGW(-w64), only dynamic +# executables can be built when linking with MSVCRT. OpenSSL +# (optional) and zlib (required) however are always linked in +# statically. Therefore, the FOSSIL_DYNAMIC_BUILD option does +# not really apply to MinGW (i.e. since ALL external libraries +# are NOT linked dynamically). # -LIB = -static +# LIB = -static #### MinGW: If available, use the Unicode capable runtime startup code. # ifndef MINGW_IS_32BIT_ONLY LIB += -municode Index: win/Makefile.msc ================================================================== --- win/Makefile.msc +++ win/Makefile.msc @@ -29,10 +29,13 @@ PERLDIR = C:\Perl\bin PERL = perl.exe # Uncomment to enable debug symbols # DEBUG = 1 + +# Uncomment to link everything except SQLite dynamically +# FOSSIL_DYNAMIC_BUILD = 1 # Uncomment to support Windows XP with Visual Studio 201x # FOSSIL_ENABLE_WINXP = 1 # Uncomment to enable JSON API @@ -41,10 +44,13 @@ # Uncomment to enable miniz usage # FOSSIL_ENABLE_MINIZ = 1 # Uncomment to enable SSL support # FOSSIL_ENABLE_SSL = 1 + +# Uncomment to build zlib library +FOSSIL_BUILD_ZLIB = 1 # Uncomment to build SSL libraries # FOSSIL_BUILD_SSL = 1 # Uncomment to enable legacy treatment of mv/rm @@ -60,37 +66,77 @@ # FOSSIL_ENABLE_TCL = 1 !ifdef FOSSIL_ENABLE_SSL SSLDIR = $(B)\compat\openssl-1.0.2c SSLINCDIR = $(SSLDIR)\inc32 +!ifdef FOSSIL_DYNAMIC_BUILD +SSLLIBDIR = $(SSLDIR)\out32dll +!else SSLLIBDIR = $(SSLDIR)\out32 +!endif SSLLFLAGS = /nologo /opt:ref /debug SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" !message Using 'x64' platform for OpenSSL... -# BUGBUG (OpenSSL): Apparently, using "no-ssl*" here breaks the build. -# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3 no-shared -SSLCONFIG = VC-WIN64A no-asm no-shared +# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build. +# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3 +SSLCONFIG = VC-WIN64A no-asm +!ifdef FOSSIL_DYNAMIC_BUILD +SSLCONFIG = $(SSLCONFIG) shared +!else +SSLCONFIG = $(SSLCONFIG) no-shared +!endif SSLSETUP = ms\do_win64a.bat +!ifdef FOSSIL_DYNAMIC_BUILD +SSLNMAKE = ms\ntdll.mak all +!else SSLNMAKE = ms\nt.mak all +!endif +# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds. +!ifndef FOSSIL_DYNAMIC_BUILD SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 +!endif !elseif "$(PLATFORM)"=="ia64" !message Using 'ia64' platform for OpenSSL... -# BUGBUG (OpenSSL): Apparently, using "no-ssl*" here breaks the build. -# SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3 no-shared -SSLCONFIG = VC-WIN64I no-asm no-shared +# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build. +# SSLCONFIG = VC-WIN64I no-asm no-ssl2 no-ssl3 +SSLCONFIG = VC-WIN64I no-asm +!ifdef FOSSIL_DYNAMIC_BUILD +SSLCONFIG = $(SSLCONFIG) shared +!else +SSLCONFIG = $(SSLCONFIG) no-shared +!endif SSLSETUP = ms\do_win64i.bat +!ifdef FOSSIL_DYNAMIC_BUILD +SSLNMAKE = ms\ntdll.mak all +!else SSLNMAKE = ms\nt.mak all +!endif +# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds. +!ifndef FOSSIL_DYNAMIC_BUILD SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 +!endif !else !message Assuming 'x86' platform for OpenSSL... -# BUGBUG (OpenSSL): Apparently, using "no-ssl*" here breaks the build. -# SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3 no-shared -SSLCONFIG = VC-WIN32 no-asm no-shared +# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build. +# SSLCONFIG = VC-WIN32 no-asm no-ssl2 no-ssl3 +SSLCONFIG = VC-WIN32 no-asm +!ifdef FOSSIL_DYNAMIC_BUILD +SSLCONFIG = $(SSLCONFIG) shared +!else +SSLCONFIG = $(SSLCONFIG) no-shared +!endif SSLSETUP = ms\do_ms.bat +!ifdef FOSSIL_DYNAMIC_BUILD +SSLNMAKE = ms\ntdll.mak all +!else SSLNMAKE = ms\nt.mak all +!endif +# BUGBUG (OpenSSL): Using "OPENSSL_NO_SSL*" here breaks dynamic builds. +!ifndef FOSSIL_DYNAMIC_BUILD SSLCFLAGS = -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 +!endif !endif !endif !ifdef FOSSIL_ENABLE_TCL TCLDIR = $(B)\compat\tcl-8.6 @@ -99,11 +145,16 @@ !endif # zlib options ZINCDIR = $(B)\compat\zlib ZLIBDIR = $(B)\compat\zlib + +!ifdef FOSSIL_DYNAMIC_BUILD +ZLIB = zdll.lib +!else ZLIB = zlib.lib +!endif INCL = /I. /I$(SRCDIR) /I$B\win\include !ifndef FOSSIL_ENABLE_MINIZ INCL = $(INCL) /I$(ZINCDIR) @@ -116,11 +167,17 @@ !ifdef FOSSIL_ENABLE_TCL INCL = $(INCL) /I$(TCLINCDIR) !endif CFLAGS = /nologo -LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO +LDFLAGS = + +!ifdef FOSSIL_DYNAMIC_BUILD +LDFLAGS = $(LDFLAGS) /MANIFEST +!else +LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO +!endif !ifdef FOSSIL_ENABLE_WINXP XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1 CFLAGS = $(CFLAGS) $(XPCFLAGS) !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" @@ -128,23 +185,43 @@ !else XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01 !endif LDFLAGS = $(LDFLAGS) $(XPLDFLAGS) !endif + +!ifdef FOSSIL_DYNAMIC_BUILD +!ifdef DEBUG +CRTFLAGS = /MDd +!else +CRTFLAGS = /MD +!endif +!else +!ifdef DEBUG +CRTFLAGS = /MTd +!else +CRTFLAGS = /MT +!endif +!endif !ifdef DEBUG -CFLAGS = $(CFLAGS) /Zi /MTd /Od +CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) /Od LDFLAGS = $(LDFLAGS) /DEBUG !else -CFLAGS = $(CFLAGS) /MT /O2 +CFLAGS = $(CFLAGS) $(CRTFLAGS) /O2 !endif BCC = $(CC) $(CFLAGS) TCC = $(CC) /c $(CFLAGS) $(MSCDEF) $(INCL) -RCC = rc /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL) +RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL) +MTC = mt LIBS = ws2_32.lib advapi32.lib LIBDIR = + +!ifdef FOSSIL_DYNAMIC_BUILD +TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1 +RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1 +!endif !ifndef FOSSIL_ENABLE_MINIZ LIBS = $(LIBS) $(ZLIB) LIBDIR = $(LIBDIR) /LIBPATH:$(ZLIBDIR) !endif @@ -546,11 +623,13 @@ @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(SSLCFLAGS)" && popd !endif !endif !ifndef FOSSIL_ENABLE_MINIZ +!ifdef FOSSIL_BUILD_ZLIB APPTARGETS = $(APPTARGETS) zlib +!endif !endif !ifdef FOSSIL_ENABLE_SSL !ifdef FOSSIL_BUILD_SSL APPTARGETS = $(APPTARGETS) openssl @@ -559,10 +638,12 @@ $(APPNAME) : $(APPTARGETS) translate$E mkindex$E codecheck1$E headers $(OBJ) $(OX)\linkopts cd $(OX) codecheck1$E $(SRC) link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts + if exist $@.manifest \ + $(MTC) -nologo -manifest $@.manifest -outputresource:$@;1 $(OX)\linkopts: $B\win\Makefile.msc echo $(OX)\add.obj > $@ echo $(OX)\allrepo.obj >> $@ echo $(OX)\attach.obj >> $@ Index: win/fossil.rc ================================================================== --- win/fossil.rc +++ win/fossil.rc @@ -102,10 +102,15 @@ VALUE "InternalName", "fossil\0" VALUE "LegalCopyright", "Copyright © " MANIFEST_YEAR " by D. Richard Hipp. All rights reserved.\0" VALUE "OriginalFilename", "fossil.exe\0" VALUE "CompilerName", COMPILER_NAME "\0" VALUE "SQLiteVersion", "SQLite " SQLITE_VERSION " " SQLITE_SOURCE_ID "\0" +#if defined(FOSSIL_DYNAMIC_BUILD) + VALUE "DynamicBuild", "yes\0" +#else + VALUE "DynamicBuild", "no\0" +#endif #if defined(FOSSIL_ENABLE_MINIZ) VALUE "MinizVersion", "miniz " MZ_VERSION "\0" #else VALUE "ZlibVersion", "zlib " ZLIB_VERSION "\0" #endif /* defined(FOSSIL_ENABLE_MINIZ) */ Index: www/th1.md ================================================================== --- www/th1.md +++ www/th1.md @@ -303,10 +303,11 @@ 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._ 1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._ 1. **json** -- _Support for the JSON APIs._ 1. **markdown** -- _Support for Markdown documentation format._ 1. **unicodeCmdLine** -- _The command line arguments are Unicode._ + 1. **dynamicBuild** -- _Dynamically linked to libraries._ TH1 html Command ----------------------------------- * html STRING