Fossil SCM
For 32-bit MinGW compile: speed up zlib performance by using critical parts in optimized assembler (official zlib1.dll is compiled this way)
Commit
270897a3011424cfef1bd5d78dcc92d651131e49
Parent
67458ab077e2034…
3 files changed
+21
-10
+21
-10
+22
-11
+21
-10
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -516,23 +516,28 @@ | ||
| 516 | 516 | ifndef MINGW_IS_32BIT_ONLY |
| 517 | 517 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 518 | 518 | MINGW_IS_32BIT_ONLY = 1 |
| 519 | 519 | endif |
| 520 | 520 | endif |
| 521 | -ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) | |
| 522 | -SSLCONFIG = mingw | |
| 523 | -else | |
| 524 | -SSLCONFIG = mingw64 | |
| 525 | -endif | |
| 526 | -ifndef FOSSIL_ENABLE_MINIZ | |
| 527 | -SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib | |
| 528 | -endif | |
| 529 | 521 | |
| 530 | 522 | #### The directories where the zlib include and library files are located. |
| 531 | 523 | # |
| 532 | 524 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 533 | 525 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 526 | + | |
| 527 | +ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) | |
| 528 | +SSLCONFIG = mingw | |
| 529 | +ZLIBCONFIG = LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 530 | +LIBTARGETS = $(ZLIBDIR)/inffas86.o $(ZLIBDIR)/match.o | |
| 531 | +else | |
| 532 | +SSLCONFIG = mingw64 | |
| 533 | +ZLIBCONFIG = | |
| 534 | +LIBTARGETS = | |
| 535 | +endif | |
| 536 | +ifndef FOSSIL_ENABLE_MINIZ | |
| 537 | +SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib | |
| 538 | +endif | |
| 534 | 539 | |
| 535 | 540 | #### The directories where the OpenSSL include and library files are located. |
| 536 | 541 | # The recommended usage here is to use the Sysinternals junction tool |
| 537 | 542 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 538 | 543 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -774,11 +779,10 @@ | ||
| 774 | 779 | writeln -nonewline " \\\n \$(OBJDIR)/$s.o" |
| 775 | 780 | } |
| 776 | 781 | writeln "\n" |
| 777 | 782 | writeln "APPNAME = ${name}.exe" |
| 778 | 783 | writeln "APPTARGETS =" |
| 779 | -writeln "LIBTARGETS =" | |
| 780 | 784 | writeln { |
| 781 | 785 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 782 | 786 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 783 | 787 | # building inside of a Unix-style shell. Note that the "move" command is |
| 784 | 788 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -902,14 +906,21 @@ | ||
| 902 | 906 | $(OBJDIR)/cson_amalgamation.o |
| 903 | 907 | }] |
| 904 | 908 | |
| 905 | 909 | writeln { |
| 906 | 910 | zlib: |
| 907 | - $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a | |
| 911 | + $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) $(ZLIBCONFIG) -f win32/Makefile.gcc libz.a | |
| 908 | 912 | |
| 909 | 913 | clean-zlib: |
| 910 | 914 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 915 | + | |
| 916 | +$(ZLIBDIR)/inffas86.o: | |
| 917 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 918 | + | |
| 919 | +$(ZLIBDIR)/match.o: | |
| 920 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.S | |
| 921 | + | |
| 911 | 922 | |
| 912 | 923 | ifndef FOSSIL_ENABLE_MINIZ |
| 913 | 924 | LIBTARGETS += zlib |
| 914 | 925 | endif |
| 915 | 926 | |
| 916 | 927 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -516,23 +516,28 @@ | |
| 516 | ifndef MINGW_IS_32BIT_ONLY |
| 517 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 518 | MINGW_IS_32BIT_ONLY = 1 |
| 519 | endif |
| 520 | endif |
| 521 | ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) |
| 522 | SSLCONFIG = mingw |
| 523 | else |
| 524 | SSLCONFIG = mingw64 |
| 525 | endif |
| 526 | ifndef FOSSIL_ENABLE_MINIZ |
| 527 | SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib |
| 528 | endif |
| 529 | |
| 530 | #### The directories where the zlib include and library files are located. |
| 531 | # |
| 532 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 533 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 534 | |
| 535 | #### The directories where the OpenSSL include and library files are located. |
| 536 | # The recommended usage here is to use the Sysinternals junction tool |
| 537 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 538 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -774,11 +779,10 @@ | |
| 774 | writeln -nonewline " \\\n \$(OBJDIR)/$s.o" |
| 775 | } |
| 776 | writeln "\n" |
| 777 | writeln "APPNAME = ${name}.exe" |
| 778 | writeln "APPTARGETS =" |
| 779 | writeln "LIBTARGETS =" |
| 780 | writeln { |
| 781 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 782 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 783 | # building inside of a Unix-style shell. Note that the "move" command is |
| 784 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -902,14 +906,21 @@ | |
| 902 | $(OBJDIR)/cson_amalgamation.o |
| 903 | }] |
| 904 | |
| 905 | writeln { |
| 906 | zlib: |
| 907 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 908 | |
| 909 | clean-zlib: |
| 910 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 911 | |
| 912 | ifndef FOSSIL_ENABLE_MINIZ |
| 913 | LIBTARGETS += zlib |
| 914 | endif |
| 915 | |
| 916 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -516,23 +516,28 @@ | |
| 516 | ifndef MINGW_IS_32BIT_ONLY |
| 517 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 518 | MINGW_IS_32BIT_ONLY = 1 |
| 519 | endif |
| 520 | endif |
| 521 | |
| 522 | #### The directories where the zlib include and library files are located. |
| 523 | # |
| 524 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 525 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 526 | |
| 527 | ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) |
| 528 | SSLCONFIG = mingw |
| 529 | ZLIBCONFIG = LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 530 | LIBTARGETS = $(ZLIBDIR)/inffas86.o $(ZLIBDIR)/match.o |
| 531 | else |
| 532 | SSLCONFIG = mingw64 |
| 533 | ZLIBCONFIG = |
| 534 | LIBTARGETS = |
| 535 | endif |
| 536 | ifndef FOSSIL_ENABLE_MINIZ |
| 537 | SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib |
| 538 | endif |
| 539 | |
| 540 | #### The directories where the OpenSSL include and library files are located. |
| 541 | # The recommended usage here is to use the Sysinternals junction tool |
| 542 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 543 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -774,11 +779,10 @@ | |
| 779 | writeln -nonewline " \\\n \$(OBJDIR)/$s.o" |
| 780 | } |
| 781 | writeln "\n" |
| 782 | writeln "APPNAME = ${name}.exe" |
| 783 | writeln "APPTARGETS =" |
| 784 | writeln { |
| 785 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 786 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 787 | # building inside of a Unix-style shell. Note that the "move" command is |
| 788 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -902,14 +906,21 @@ | |
| 906 | $(OBJDIR)/cson_amalgamation.o |
| 907 | }] |
| 908 | |
| 909 | writeln { |
| 910 | zlib: |
| 911 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) $(ZLIBCONFIG) -f win32/Makefile.gcc libz.a |
| 912 | |
| 913 | clean-zlib: |
| 914 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 915 | |
| 916 | $(ZLIBDIR)/inffas86.o: |
| 917 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 918 | |
| 919 | $(ZLIBDIR)/match.o: |
| 920 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.S |
| 921 | |
| 922 | |
| 923 | ifndef FOSSIL_ENABLE_MINIZ |
| 924 | LIBTARGETS += zlib |
| 925 | endif |
| 926 | |
| 927 |
+21
-10
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -94,23 +94,28 @@ | ||
| 94 | 94 | ifndef MINGW_IS_32BIT_ONLY |
| 95 | 95 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 96 | 96 | MINGW_IS_32BIT_ONLY = 1 |
| 97 | 97 | endif |
| 98 | 98 | endif |
| 99 | -ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) | |
| 100 | -SSLCONFIG = mingw | |
| 101 | -else | |
| 102 | -SSLCONFIG = mingw64 | |
| 103 | -endif | |
| 104 | -ifndef FOSSIL_ENABLE_MINIZ | |
| 105 | -SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib | |
| 106 | -endif | |
| 107 | 99 | |
| 108 | 100 | #### The directories where the zlib include and library files are located. |
| 109 | 101 | # |
| 110 | 102 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 111 | 103 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 104 | + | |
| 105 | +ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) | |
| 106 | +SSLCONFIG = mingw | |
| 107 | +ZLIBCONFIG = LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 108 | +LIBTARGETS = $(ZLIBDIR)/inffas86.o $(ZLIBDIR)/match.o | |
| 109 | +else | |
| 110 | +SSLCONFIG = mingw64 | |
| 111 | +ZLIBCONFIG = | |
| 112 | +LIBTARGETS = | |
| 113 | +endif | |
| 114 | +ifndef FOSSIL_ENABLE_MINIZ | |
| 115 | +SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib | |
| 116 | +endif | |
| 112 | 117 | |
| 113 | 118 | #### The directories where the OpenSSL include and library files are located. |
| 114 | 119 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | 120 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | 121 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -677,11 +682,10 @@ | ||
| 677 | 682 | $(OBJDIR)/xfersetup.o \ |
| 678 | 683 | $(OBJDIR)/zip.o |
| 679 | 684 | |
| 680 | 685 | APPNAME = fossil.exe |
| 681 | 686 | APPTARGETS = |
| 682 | -LIBTARGETS = | |
| 683 | 687 | |
| 684 | 688 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 685 | 689 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 686 | 690 | # building inside of a Unix-style shell. Note that the "move" command is |
| 687 | 691 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -802,14 +806,21 @@ | ||
| 802 | 806 | $(OBJDIR)/th_tcl.o \ |
| 803 | 807 | $(OBJDIR)/cson_amalgamation.o |
| 804 | 808 | |
| 805 | 809 | |
| 806 | 810 | zlib: |
| 807 | - $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a | |
| 811 | + $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) $(ZLIBCONFIG) -f win32/Makefile.gcc libz.a | |
| 808 | 812 | |
| 809 | 813 | clean-zlib: |
| 810 | 814 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 815 | + | |
| 816 | +$(ZLIBDIR)/inffas86.o: | |
| 817 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 818 | + | |
| 819 | +$(ZLIBDIR)/match.o: | |
| 820 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.S | |
| 821 | + | |
| 811 | 822 | |
| 812 | 823 | ifndef FOSSIL_ENABLE_MINIZ |
| 813 | 824 | LIBTARGETS += zlib |
| 814 | 825 | endif |
| 815 | 826 | |
| 816 | 827 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -94,23 +94,28 @@ | |
| 94 | ifndef MINGW_IS_32BIT_ONLY |
| 95 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 96 | MINGW_IS_32BIT_ONLY = 1 |
| 97 | endif |
| 98 | endif |
| 99 | ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) |
| 100 | SSLCONFIG = mingw |
| 101 | else |
| 102 | SSLCONFIG = mingw64 |
| 103 | endif |
| 104 | ifndef FOSSIL_ENABLE_MINIZ |
| 105 | SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib |
| 106 | endif |
| 107 | |
| 108 | #### The directories where the zlib include and library files are located. |
| 109 | # |
| 110 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 111 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 112 | |
| 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -677,11 +682,10 @@ | |
| 677 | $(OBJDIR)/xfersetup.o \ |
| 678 | $(OBJDIR)/zip.o |
| 679 | |
| 680 | APPNAME = fossil.exe |
| 681 | APPTARGETS = |
| 682 | LIBTARGETS = |
| 683 | |
| 684 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 685 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 686 | # building inside of a Unix-style shell. Note that the "move" command is |
| 687 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -802,14 +806,21 @@ | |
| 802 | $(OBJDIR)/th_tcl.o \ |
| 803 | $(OBJDIR)/cson_amalgamation.o |
| 804 | |
| 805 | |
| 806 | zlib: |
| 807 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 808 | |
| 809 | clean-zlib: |
| 810 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 811 | |
| 812 | ifndef FOSSIL_ENABLE_MINIZ |
| 813 | LIBTARGETS += zlib |
| 814 | endif |
| 815 | |
| 816 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -94,23 +94,28 @@ | |
| 94 | ifndef MINGW_IS_32BIT_ONLY |
| 95 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 96 | MINGW_IS_32BIT_ONLY = 1 |
| 97 | endif |
| 98 | endif |
| 99 | |
| 100 | #### The directories where the zlib include and library files are located. |
| 101 | # |
| 102 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 103 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 104 | |
| 105 | ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) |
| 106 | SSLCONFIG = mingw |
| 107 | ZLIBCONFIG = LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 108 | LIBTARGETS = $(ZLIBDIR)/inffas86.o $(ZLIBDIR)/match.o |
| 109 | else |
| 110 | SSLCONFIG = mingw64 |
| 111 | ZLIBCONFIG = |
| 112 | LIBTARGETS = |
| 113 | endif |
| 114 | ifndef FOSSIL_ENABLE_MINIZ |
| 115 | SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib |
| 116 | endif |
| 117 | |
| 118 | #### The directories where the OpenSSL include and library files are located. |
| 119 | # The recommended usage here is to use the Sysinternals junction tool |
| 120 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 121 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -677,11 +682,10 @@ | |
| 682 | $(OBJDIR)/xfersetup.o \ |
| 683 | $(OBJDIR)/zip.o |
| 684 | |
| 685 | APPNAME = fossil.exe |
| 686 | APPTARGETS = |
| 687 | |
| 688 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 689 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 690 | # building inside of a Unix-style shell. Note that the "move" command is |
| 691 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -802,14 +806,21 @@ | |
| 806 | $(OBJDIR)/th_tcl.o \ |
| 807 | $(OBJDIR)/cson_amalgamation.o |
| 808 | |
| 809 | |
| 810 | zlib: |
| 811 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) $(ZLIBCONFIG) -f win32/Makefile.gcc libz.a |
| 812 | |
| 813 | clean-zlib: |
| 814 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 815 | |
| 816 | $(ZLIBDIR)/inffas86.o: |
| 817 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 818 | |
| 819 | $(ZLIBDIR)/match.o: |
| 820 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.S |
| 821 | |
| 822 | |
| 823 | ifndef FOSSIL_ENABLE_MINIZ |
| 824 | LIBTARGETS += zlib |
| 825 | endif |
| 826 | |
| 827 |
+22
-11
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -46,11 +46,11 @@ | ||
| 46 | 46 | # |
| 47 | 47 | FOSSIL_ENABLE_JSON = 1 |
| 48 | 48 | |
| 49 | 49 | #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto) |
| 50 | 50 | # |
| 51 | -FOSSIL_ENABLE_SSL = 1 | |
| 51 | +# FOSSIL_ENABLE_SSL = 1 | |
| 52 | 52 | |
| 53 | 53 | #### Automatically build OpenSSL when building Fossil (causes rebuild |
| 54 | 54 | # issues when building incrementally). |
| 55 | 55 | # |
| 56 | 56 | # FOSSIL_BUILD_SSL = 1 |
| @@ -94,23 +94,28 @@ | ||
| 94 | 94 | ifndef MINGW_IS_32BIT_ONLY |
| 95 | 95 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 96 | 96 | MINGW_IS_32BIT_ONLY = 1 |
| 97 | 97 | endif |
| 98 | 98 | endif |
| 99 | -ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) | |
| 100 | -SSLCONFIG = mingw | |
| 101 | -else | |
| 102 | -SSLCONFIG = mingw64 | |
| 103 | -endif | |
| 104 | -ifndef FOSSIL_ENABLE_MINIZ | |
| 105 | -SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib | |
| 106 | -endif | |
| 107 | 99 | |
| 108 | 100 | #### The directories where the zlib include and library files are located. |
| 109 | 101 | # |
| 110 | 102 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 111 | 103 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 104 | + | |
| 105 | +ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) | |
| 106 | +SSLCONFIG = mingw | |
| 107 | +ZLIBCONFIG = LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 108 | +LIBTARGETS = $(ZLIBDIR)/inffas86.o $(ZLIBDIR)/match.o | |
| 109 | +else | |
| 110 | +SSLCONFIG = mingw64 | |
| 111 | +ZLIBCONFIG = | |
| 112 | +LIBTARGETS = | |
| 113 | +endif | |
| 114 | +ifndef FOSSIL_ENABLE_MINIZ | |
| 115 | +SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib | |
| 116 | +endif | |
| 112 | 117 | |
| 113 | 118 | #### The directories where the OpenSSL include and library files are located. |
| 114 | 119 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | 120 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | 121 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -677,11 +682,10 @@ | ||
| 677 | 682 | $(OBJDIR)/xfersetup.o \ |
| 678 | 683 | $(OBJDIR)/zip.o |
| 679 | 684 | |
| 680 | 685 | APPNAME = fossil.exe |
| 681 | 686 | APPTARGETS = |
| 682 | -LIBTARGETS = | |
| 683 | 687 | |
| 684 | 688 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 685 | 689 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 686 | 690 | # building inside of a Unix-style shell. Note that the "move" command is |
| 687 | 691 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -802,14 +806,21 @@ | ||
| 802 | 806 | $(OBJDIR)/th_tcl.o \ |
| 803 | 807 | $(OBJDIR)/cson_amalgamation.o |
| 804 | 808 | |
| 805 | 809 | |
| 806 | 810 | zlib: |
| 807 | - $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a | |
| 811 | + $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) $(ZLIBCONFIG) -f win32/Makefile.gcc libz.a | |
| 808 | 812 | |
| 809 | 813 | clean-zlib: |
| 810 | 814 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 815 | + | |
| 816 | +$(ZLIBDIR)/inffas86.o: | |
| 817 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 818 | + | |
| 819 | +$(ZLIBDIR)/match.o: | |
| 820 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.S | |
| 821 | + | |
| 811 | 822 | |
| 812 | 823 | ifndef FOSSIL_ENABLE_MINIZ |
| 813 | 824 | LIBTARGETS += zlib |
| 814 | 825 | endif |
| 815 | 826 | |
| 816 | 827 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -46,11 +46,11 @@ | |
| 46 | # |
| 47 | FOSSIL_ENABLE_JSON = 1 |
| 48 | |
| 49 | #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto) |
| 50 | # |
| 51 | FOSSIL_ENABLE_SSL = 1 |
| 52 | |
| 53 | #### Automatically build OpenSSL when building Fossil (causes rebuild |
| 54 | # issues when building incrementally). |
| 55 | # |
| 56 | # FOSSIL_BUILD_SSL = 1 |
| @@ -94,23 +94,28 @@ | |
| 94 | ifndef MINGW_IS_32BIT_ONLY |
| 95 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 96 | MINGW_IS_32BIT_ONLY = 1 |
| 97 | endif |
| 98 | endif |
| 99 | ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) |
| 100 | SSLCONFIG = mingw |
| 101 | else |
| 102 | SSLCONFIG = mingw64 |
| 103 | endif |
| 104 | ifndef FOSSIL_ENABLE_MINIZ |
| 105 | SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib |
| 106 | endif |
| 107 | |
| 108 | #### The directories where the zlib include and library files are located. |
| 109 | # |
| 110 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 111 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 112 | |
| 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -677,11 +682,10 @@ | |
| 677 | $(OBJDIR)/xfersetup.o \ |
| 678 | $(OBJDIR)/zip.o |
| 679 | |
| 680 | APPNAME = fossil.exe |
| 681 | APPTARGETS = |
| 682 | LIBTARGETS = |
| 683 | |
| 684 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 685 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 686 | # building inside of a Unix-style shell. Note that the "move" command is |
| 687 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -802,14 +806,21 @@ | |
| 802 | $(OBJDIR)/th_tcl.o \ |
| 803 | $(OBJDIR)/cson_amalgamation.o |
| 804 | |
| 805 | |
| 806 | zlib: |
| 807 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 808 | |
| 809 | clean-zlib: |
| 810 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 811 | |
| 812 | ifndef FOSSIL_ENABLE_MINIZ |
| 813 | LIBTARGETS += zlib |
| 814 | endif |
| 815 | |
| 816 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -46,11 +46,11 @@ | |
| 46 | # |
| 47 | FOSSIL_ENABLE_JSON = 1 |
| 48 | |
| 49 | #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto) |
| 50 | # |
| 51 | # FOSSIL_ENABLE_SSL = 1 |
| 52 | |
| 53 | #### Automatically build OpenSSL when building Fossil (causes rebuild |
| 54 | # issues when building incrementally). |
| 55 | # |
| 56 | # FOSSIL_BUILD_SSL = 1 |
| @@ -94,23 +94,28 @@ | |
| 94 | ifndef MINGW_IS_32BIT_ONLY |
| 95 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 96 | MINGW_IS_32BIT_ONLY = 1 |
| 97 | endif |
| 98 | endif |
| 99 | |
| 100 | #### The directories where the zlib include and library files are located. |
| 101 | # |
| 102 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 103 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| 104 | |
| 105 | ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) |
| 106 | SSLCONFIG = mingw |
| 107 | ZLIBCONFIG = LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 108 | LIBTARGETS = $(ZLIBDIR)/inffas86.o $(ZLIBDIR)/match.o |
| 109 | else |
| 110 | SSLCONFIG = mingw64 |
| 111 | ZLIBCONFIG = |
| 112 | LIBTARGETS = |
| 113 | endif |
| 114 | ifndef FOSSIL_ENABLE_MINIZ |
| 115 | SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib |
| 116 | endif |
| 117 | |
| 118 | #### The directories where the OpenSSL include and library files are located. |
| 119 | # The recommended usage here is to use the Sysinternals junction tool |
| 120 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 121 | # Fossil source code directory and the target OpenSSL source directory. |
| @@ -677,11 +682,10 @@ | |
| 682 | $(OBJDIR)/xfersetup.o \ |
| 683 | $(OBJDIR)/zip.o |
| 684 | |
| 685 | APPNAME = fossil.exe |
| 686 | APPTARGETS = |
| 687 | |
| 688 | #### If the USE_WINDOWS variable exists, it is assumed that we are building |
| 689 | # inside of a Windows-style shell; otherwise, it is assumed that we are |
| 690 | # building inside of a Unix-style shell. Note that the "move" command is |
| 691 | # broken when attempting to use it from the Windows shell via MinGW make |
| @@ -802,14 +806,21 @@ | |
| 806 | $(OBJDIR)/th_tcl.o \ |
| 807 | $(OBJDIR)/cson_amalgamation.o |
| 808 | |
| 809 | |
| 810 | zlib: |
| 811 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) $(ZLIBCONFIG) -f win32/Makefile.gcc libz.a |
| 812 | |
| 813 | clean-zlib: |
| 814 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc clean |
| 815 | |
| 816 | $(ZLIBDIR)/inffas86.o: |
| 817 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 818 | |
| 819 | $(ZLIBDIR)/match.o: |
| 820 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.S |
| 821 | |
| 822 | |
| 823 | ifndef FOSSIL_ENABLE_MINIZ |
| 824 | LIBTARGETS += zlib |
| 825 | endif |
| 826 | |
| 827 |