Changes On Branch better-mingw
Not logged in

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

Changes In Branch better-mingw Excluding Merge-Ins

This is equivalent to a diff from 4e66a96946 to cc2aa92ef8

2012-08-23
20:56
Detect infinite loops in the DELTA table and abort out of content_get() when they are found. check-in: 791fd2fd68 user: drh tags: trunk
11:59
Various build and resource fixes. check-in: f008c97ae1 user: mistachkin tags: better-mingw-v2
10:13
Better mingw/mingw64 support for (cross-)compile on Linux, Darwin, Cygwin or Msys. Closed-Leaf check-in: cc2aa92ef8 user: jan.nijtmans tags: better-mingw
09:23
Added a maintenance reminder/potential fixme note. check-in: 4e66a96946 user: stephan tags: trunk
2012-08-22
21:30
two minor typos check-in: 544c163551 user: jan.nijtmans tags: trunk

Changes to src/makemake.tcl.

   325    325   # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "src/makemake.tcl")
   326    326   ##############################################################################
   327    327   #
   328    328   # This file is automatically generated.  Instead of editing this
   329    329   # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
   330    330   # to regenerate this file.
   331    331   #
   332         -# This is a makefile for us on windows using MinGW.
          332  +# This is a makefile for use on Windows/Linux/Darwin/Cygwin using MinGW/Mingw-w64.
   333    333   #
          334  +
          335  +####
          336  +#
          337  +# Select one of mingw, mingw-64 (32-bit) or mingw-w64 (64-bit)
          338  +#
          339  +PREFIX=i686-pc-mingw32-
          340  +#PREFIX=i686-w64-mingw32-
          341  +#PREFIX=x86_64-w64-mingw32-
          342  +
   334    343   #### The toplevel directory of the source tree.  Fossil can be built
   335    344   #    in a directory that is separate from the source tree.  Just change
   336    345   #    the following to point from the build directory to the src/ folder.
   337    346   #
   338    347   SRCDIR = src
   339    348   
   340    349   #### The directory into which object code files should be written.
................................................................................
   412    421   
   413    422   #### C Compile and options for use in building executables that
   414    423   #    will run on the target platform.  This is usually the same
   415    424   #    as BCC, unless you are cross-compiling.  This C compiler builds
   416    425   #    the finished binary for fossil.  The BCC compiler above is used
   417    426   #    for building intermediate code-generator tools.
   418    427   #
   419         -TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR)
          428  +TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR)
   420    429   
   421    430   # With HTTPS support
   422    431   ifdef FOSSIL_ENABLE_SSL
   423    432   TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR)
   424    433   endif
   425    434   
   426    435   # With Tcl support
................................................................................
   514    523   MKINDEX     = $(OBJDIR)/mkindex.exe
   515    524   VERSION     = $(OBJDIR)/version.exe
   516    525   }
   517    526   
   518    527   writeln {
   519    528   all:	$(OBJDIR) $(APPNAME)
   520    529   
   521         -$(OBJDIR)/icon.o:	$(SRCDIR)/../win/icon.rc
   522         -	cp $(SRCDIR)/../win/icon.rc $(OBJDIR)
   523         -	windres $(OBJDIR)/icon.rc -o $(OBJDIR)/icon.o
          530  +$(OBJDIR)/fossil.o:	$(SRCDIR)/../win/fossil.rc
          531  +	cp $(SRCDIR)/../win/fossil.ico $(OBJDIR)
          532  +	$(PREFIX)windres -I$(SRCDIR) $(OBJDIR)/fossil.rc -o $(OBJDIR)/fossil.o
   524    533   
   525    534   install:	$(APPNAME)
   526    535   	mkdir -p $(INSTALLDIR)
   527    536   	mv $(APPNAME) $(INSTALLDIR)
   528    537   
   529    538   $(OBJDIR):
   530    539   	mkdir $(OBJDIR)
................................................................................
   557    566     $(OBJDIR)/th_lang.o \
   558    567     $(OBJDIR)/cson_amalgamation.o
   559    568   
   560    569   ifdef FOSSIL_ENABLE_TCL
   561    570   EXTRAOBJ +=  $(OBJDIR)/th_tcl.o
   562    571   endif
   563    572   
   564         -$(APPNAME):	$(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/icon.o
   565         -	$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/icon.o
          573  +$(APPNAME):	$(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o
          574  +	$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
   566    575   
   567    576   # This rule prevents make from using its default rules to try build
   568    577   # an executable named "manifest" out of the file named "manifest.c"
   569    578   #
   570    579   $(SRCDIR)/../manifest:
   571    580   	# noop
   572    581   

Changes to win/Makefile.mingw.

     4      4   # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "src/makemake.tcl")
     5      5   ##############################################################################
     6      6   #
     7      7   # This file is automatically generated.  Instead of editing this
     8      8   # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
     9      9   # to regenerate this file.
    10     10   #
    11         -# This is a makefile for us on windows using MinGW.
           11  +# This is a makefile for use on Windows/Linux/Darwin/Cygwin using MinGW/Mingw-w64.
    12     12   #
           13  +
           14  +####
           15  +#
           16  +# Select one of mingw, mingw-64 (32-bit) or mingw-w64 (64-bit)
           17  +#
           18  +PREFIX=i686-pc-mingw32-
           19  +#PREFIX=i686-w64-mingw32-
           20  +#PREFIX=x86_64-w64-mingw32-
           21  +
    13     22   #### The toplevel directory of the source tree.  Fossil can be built
    14     23   #    in a directory that is separate from the source tree.  Just change
    15     24   #    the following to point from the build directory to the src/ folder.
    16     25   #
    17     26   SRCDIR = src
    18     27   
    19     28   #### The directory into which object code files should be written.
................................................................................
    91    100   
    92    101   #### C Compile and options for use in building executables that
    93    102   #    will run on the target platform.  This is usually the same
    94    103   #    as BCC, unless you are cross-compiling.  This C compiler builds
    95    104   #    the finished binary for fossil.  The BCC compiler above is used
    96    105   #    for building intermediate code-generator tools.
    97    106   #
    98         -TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR)
          107  +TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR)
    99    108   
   100    109   # With HTTPS support
   101    110   ifdef FOSSIL_ENABLE_SSL
   102    111   TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR)
   103    112   endif
   104    113   
   105    114   # With Tcl support
................................................................................
   477    486   MAKEHEADERS = $(OBJDIR)/makeheaders.exe
   478    487   MKINDEX     = $(OBJDIR)/mkindex.exe
   479    488   VERSION     = $(OBJDIR)/version.exe
   480    489   
   481    490   
   482    491   all:	$(OBJDIR) $(APPNAME)
   483    492   
   484         -$(OBJDIR)/icon.o:	$(SRCDIR)/../win/icon.rc
   485         -	cp $(SRCDIR)/../win/icon.rc $(OBJDIR)
   486         -	windres $(OBJDIR)/icon.rc -o $(OBJDIR)/icon.o
          493  +$(OBJDIR)/fossil.o:	$(SRCDIR)/../win/fossil.rc
          494  +	cp $(SRCDIR)/../win/fossil.rc $(OBJDIR)
          495  +	cp $(SRCDIR)/../win/fossil.ico $(OBJDIR)
          496  +	$(PREFIX)windres -I$(SRCDIR) $(OBJDIR)/fossil.rc -o $(OBJDIR)/fossil.o
   487    497   
   488    498   install:	$(APPNAME)
   489    499   	mkdir -p $(INSTALLDIR)
   490    500   	mv $(APPNAME) $(INSTALLDIR)
   491    501   
   492    502   $(OBJDIR):
   493    503   	mkdir $(OBJDIR)
................................................................................
   515    525   
   516    526   EXTRAOBJ =  $(OBJDIR)/sqlite3.o  $(OBJDIR)/shell.o  $(OBJDIR)/th.o  $(OBJDIR)/th_lang.o  $(OBJDIR)/cson_amalgamation.o
   517    527   
   518    528   ifdef FOSSIL_ENABLE_TCL
   519    529   EXTRAOBJ +=  $(OBJDIR)/th_tcl.o
   520    530   endif
   521    531   
   522         -$(APPNAME):	$(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/icon.o
   523         -	$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/icon.o
          532  +$(APPNAME):	$(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o
          533  +	$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
   524    534   
   525    535   # This rule prevents make from using its default rules to try build
   526    536   # an executable named "manifest" out of the file named "manifest.c"
   527    537   #
   528    538   $(SRCDIR)/../manifest:
   529    539   	# noop
   530    540   

Changes to win/Makefile.mingw.mistachkin.

     4      4   # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "src/makemake.tcl")
     5      5   ##############################################################################
     6      6   #
     7      7   # This file is automatically generated.  Instead of editing this
     8      8   # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
     9      9   # to regenerate this file.
    10     10   #
    11         -# This is a makefile for us on windows using MinGW.
           11  +# This is a makefile for use on Windows/Linux/Darwin/Cygwin using MinGW/Mingw-w64.
    12     12   #
           13  +
           14  +####
           15  +#
           16  +# Select one of mingw, mingw-64 (32-bit) or mingw-w64 (64-bit)
           17  +#
           18  +PREFIX=i686-pc-mingw32-
           19  +#PREFIX=i686-w64-mingw32-
           20  +#PREFIX=x86_64-w64-mingw32-
           21  +
    13     22   #### The toplevel directory of the source tree.  Fossil can be built
    14     23   #    in a directory that is separate from the source tree.  Just change
    15     24   #    the following to point from the build directory to the src/ folder.
    16     25   #
    17     26   SRCDIR = src
    18     27   
    19     28   #### The directory into which object code files should be written.
................................................................................
    91    100   
    92    101   #### C Compile and options for use in building executables that
    93    102   #    will run on the target platform.  This is usually the same
    94    103   #    as BCC, unless you are cross-compiling.  This C compiler builds
    95    104   #    the finished binary for fossil.  The BCC compiler above is used
    96    105   #    for building intermediate code-generator tools.
    97    106   #
    98         -TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR)
          107  +TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR)
    99    108   
   100    109   # With HTTPS support
   101    110   ifdef FOSSIL_ENABLE_SSL
   102    111   TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR)
   103    112   endif
   104    113   
   105    114   # With Tcl support
................................................................................
   131    140   #    other mandatory dependencies.  We add the -static option here
   132    141   #    so that we can build a static executable that will run in a
   133    142   #    chroot jail.
   134    143   #
   135    144   LIB = -static
   136    145   LIB += -lmingwex -lz
   137    146   
   138         -# OpenSSL: Add the necessary libaries required, if enabled.
          147  +# OpenSSL: Add the necessary libraries required, if enabled.
   139    148   ifdef FOSSIL_ENABLE_SSL
   140    149   LIB += -lssl -lcrypto -lgdi32
   141    150   endif
   142    151   
   143         -# Tcl: Add the necessary libaries required, if enabled.
          152  +# Tcl: Add the necessary libraries required, if enabled.
   144    153   ifdef FOSSIL_ENABLE_TCL
   145    154   LIB += $(LIBTCL)
   146    155   endif
   147    156   
   148    157   #### These libraries MUST appear in the same order as they do for Tcl
   149    158   #    or linking with it will not work (exact reason unknown).
   150    159   #
................................................................................
   477    486   MAKEHEADERS = $(OBJDIR)/makeheaders.exe
   478    487   MKINDEX     = $(OBJDIR)/mkindex.exe
   479    488   VERSION     = $(OBJDIR)/version.exe
   480    489   
   481    490   
   482    491   all:	$(OBJDIR) $(APPNAME)
   483    492   
   484         -$(OBJDIR)/icon.o:	$(SRCDIR)/../win/icon.rc
   485         -	cp $(SRCDIR)/../win/icon.rc $(OBJDIR)
   486         -	windres $(OBJDIR)/icon.rc -o $(OBJDIR)/icon.o
          493  +$(OBJDIR)/fossil.o:	$(SRCDIR)/../win/fossil.rc
          494  +	cp $(SRCDIR)/../win/fossil.ico $(OBJDIR)
          495  +	$(PREFIX)windres -I$(SRCDIR) $(OBJDIR)/fossil.rc -o $(OBJDIR)/fossil.o
   487    496   
   488    497   install:	$(APPNAME)
   489    498   	mkdir -p $(INSTALLDIR)
   490    499   	mv $(APPNAME) $(INSTALLDIR)
   491    500   
   492    501   $(OBJDIR):
   493    502   	mkdir $(OBJDIR)
................................................................................
   515    524   
   516    525   EXTRAOBJ =  $(OBJDIR)/sqlite3.o  $(OBJDIR)/shell.o  $(OBJDIR)/th.o  $(OBJDIR)/th_lang.o  $(OBJDIR)/cson_amalgamation.o
   517    526   
   518    527   ifdef FOSSIL_ENABLE_TCL
   519    528   EXTRAOBJ +=  $(OBJDIR)/th_tcl.o
   520    529   endif
   521    530   
   522         -$(APPNAME):	$(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/icon.o
   523         -	$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/icon.o
          531  +$(APPNAME):	$(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o
          532  +	$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
   524    533   
   525    534   # This rule prevents make from using its default rules to try build
   526    535   # an executable named "manifest" out of the file named "manifest.c"
   527    536   #
   528    537   $(SRCDIR)/../manifest:
   529    538   	# noop
   530    539   

Deleted win/Makefile.mingw32cross.

     1         -#!/usr/bin/make
     2         -# This makefile is for use with the Mingw32 *cross compiler* on Linux
     3         -#
     4         -#### The toplevel directory of the source tree.  Fossil can be built
     5         -#    in a directory that is separate from the source tree.  Just change
     6         -#    the following to point from the build directory to the src/ folder.
     7         -#
     8         -SRCDIR = ./src
     9         -OBJDIR = ./wobj
    10         -
    11         -#### C Compiler and options for use in building executables that
    12         -#    will run on the platform that is doing the build.  This is used
    13         -#    to compile code-generator programs as part of the build process.
    14         -#    See TCC below for the C compiler for building the finished binary.
    15         -#
    16         -BCC = gcc -s -O2
    17         -
    18         -#### The suffix to add to executable files.  ".exe" for windows.
    19         -#    Nothing for unix.
    20         -#
    21         -E = .exe
    22         -
    23         -#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
    24         -#
    25         -FOSSIL_ENABLE_SSL=1
    26         -
    27         -#### C Compile and options for use in building executables that 
    28         -#    will run on the target platform.  This is usually the same
    29         -#    as BCC, unless you are cross-compiling.  This C compiler builds
    30         -#    the finished binary for fossil.  The BCC compiler above is used
    31         -#    for building intermediate code-generator tools.
    32         -#
    33         -#TCC = gcc -O6
    34         -#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
    35         -#TCC = gcc -g -Os -Wall
    36         -#TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include
    37         -TCC=i686-pc-mingw32-gcc -O3 -s -Wall -DFOSSIL_I18N=0
    38         -
    39         -# With HTTPS support
    40         -ifdef FOSSIL_ENABLE_SSL
    41         -TCC += -DFOSSIL_ENABLE_SSL=1
    42         -endif
    43         -
    44         -#### Extra arguments for linking the finished binary.  Fossil needs
    45         -#    to link against the Z-Lib compression library.  There are no
    46         -#    other dependencies.  We sometimes add the -static option here
    47         -#    so that we can build a static executable that will run in a
    48         -#    chroot jail.
    49         -#
    50         -LIB=-lz -lssl -lcrypto -lwsock32 -lgdi32
    51         -CFLAGS=-O3 -s
    52         -LDFLAGS=-s
    53         -
    54         -#### Tcl shell for use in running the fossil testsuite.
    55         -#
    56         -TCLSH = tclsh
    57         -
    58         -#### Include a configuration file that can override any one of these settings.
    59         -#
    60         --include config.w32
    61         -
    62         -# You should not need to change anything below this line
    63         -###############################################################################
    64         -include $(SRCDIR)/main.mk

Deleted win/icon.rc.

     1         -ID ICON "../win/fossil.ico"