Fossil

Changes On Branch auto-mingw-makefile
Login

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

Changes In Branch auto-mingw-makefile Excluding Merge-Ins

This is equivalent to a diff from 24e298edd0 to f382b9a559

2011-11-14
03:02
Update the built-in SQLite to version 3.7.9 plus the 8-byte alignment fix in branch-3.7.9. check-in: 0c8d1ca9cd user: drh tags: trunk
00:13
fossil import --incremental should set the appropriate ancestor for the first commit in each branch being added Leaf check-in: c95d7a9c3d user: steveb tags: steveb-fixes
2011-11-13
09:11
Merge with trunk check-in: c30eaa8862 user: ashish tags: ashish-ipv6
2011-11-05
23:12
Slight syntax tweak for 'ifeq' statement, this may work on more make variants. Closed-Leaf check-in: f382b9a559 user: mistachkin tags: auto-mingw-makefile
23:04
Add comments about leading './' in front of source and build directory names. check-in: f3096fe00e user: mistachkin tags: auto-mingw-makefile
22:50
Add fixes to classic makefile to support MinGW mostly automatically. check-in: 590cee0ec9 user: mistachkin tags: auto-mingw-makefile
03:45
Fix some more compiler warnings seen with MSVC. check-in: 24e298edd0 user: mistachkin tags: trunk
03:22
Be sure to escape any backslashes when emitting #line preprocessor directives in the translate.c tool, cherrypick from [e36ad719cf]. check-in: c2bed5b3db user: mistachkin tags: trunk

Changes to Makefile.classic.

1
2
3
4
5
6
7
8
9




10
11

12
13




14
15
16

17
18
19
20
21
22
23
1
2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
31









+
+
+
+

-
+


+
+
+
+


-
+







#!/usr/bin/make
#
# This is the top-level makefile for Fossil when the build is occurring
# on a unix platform.  This works out-of-the-box on most unix platforms.
# But you are free to vary some of the definitions if desired.
#
#### The toplevel directory of the source tree.  Fossil can be built
#    in a directory that is separate from the source tree.  Just change
#    the following to point from the build directory to the src/ folder.
#    Having a "./" prefix in the value of this variable breaks our use of the
#    "makeheaders" tool when running make on the MinGW platform, apparently
#    due to some command line argument manipulation performed automatically
#    by the shell.
#
SRCDIR = ./src
SRCDIR = src

#### The directory into which object code files should be written.
#    Having a "./" prefix in the value of this variable breaks our use of the
#    "makeheaders" tool when running make on the MinGW platform, apparently
#    due to some command line argument manipulation performed automatically
#    by the shell.
#
#
OBJDIR = ./bld
OBJDIR = bld

#### C Compiler and options for use in building executables that
#    will run on the platform that is doing the build.  This is used
#    to compile code-generator programs as part of the build process.
#    See TCC below for the C compiler for building the finished binary.
#
BCC = gcc
34
35
36
37
38
39
40
41

42
43
44
45
46
47
48
49
50
51




52
































53
54
55
56
57
58
59
60
61
62
63
64





65
66
67
68
69
70
71
72
73
74
75
42
43
44
45
46
47
48

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123







-
+










+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+












+
+
+
+
+











#    for building intermediate code-generator tools.
#
#TCC = gcc -O6
#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
TCC = gcc -g -Os -Wall

# To add support for HTTPS
TCC += -DFOSSIL_ENABLE_SSL
TCC += -DFOSSIL_ENABLE_SSL=1

#### Extra arguments for linking the finished binary.  Fossil needs
#    to link against the Z-Lib compression library.  There are no
#    other dependencies.  We sometimes add the -static option here
#    so that we can build a static executable that will run in a
#    chroot jail.
#
LIB = -lz $(LDFLAGS)

# If using HTTPS:
#
# NOTE: These must appear in exactly this order or MinGW will complain about
#       missing symbols.
#
LIB += -lcrypto -lssl
LIB += -lssl -lcrypto

#------------------------------------------------------------------------------
# Begin MinGW Section (the following lines may all be commented out unless
# building on Windows via MinGW).
#------------------------------------------------------------------------------

# Where is zlib (needed for MinGW builds only)?
ZLIBDIR = $(SRCDIR)/../zlib-1.2.5

# Where is OpenSSL (needed for MinGW builds only)?
OPENSSLDIR = $(SRCDIR)/../openssl-1.0.0e

# Include directory for zlib (needed for MinGW builds only)
TCC.MINGW32_NT-6.1 = -I$(ZLIBDIR)

# Include directory for OpenSSL (needed for MinGW builds only)
TCC.MINGW32_NT-6.1 += -I$(OPENSSLDIR)/include

# Library directory for zlib (needed for MinGW builds only).
LIB.MINGW32_NT-6.1 = -L$(ZLIBDIR)

# Library directory for OpenSSL (needed for MinGW builds only).
LIB.MINGW32_NT-6.1 += -L$(OPENSSLDIR)

# Add the necessary Windows libraries (needed for Windows builds only).
LIB.MINGW32_NT-6.1 += -lgdi32 -lws2_32

#------------------------------------------------------------------------------
# End MinGW Section (the preceeding lines may all be commented out unless
# building on Windows via MinGW)
#------------------------------------------------------------------------------

#### Tcl shell for use in running the fossil testsuite.  If you do not
#    care about testing the end result, this can be blank.
#
TCLSH = tclsh

# You should not need to change anything below this line
###############################################################################
#
# Automatic platform-specific options.
HOST_OS_CMD = uname -s
HOST_OS = $(HOST_OS_CMD:sh)

# On MinGW, slightly different detection magic is required.
ifeq ($(HOST_OS),)
HOST_OS = $(shell $(HOST_OS_CMD))
endif

LIB.SunOS= -lsocket -lnsl
LIB += $(LIB.$(HOST_OS))

TCC.DragonFly += -DUSE_PREAD
TCC.FreeBSD += -DUSE_PREAD
TCC.NetBSD += -DUSE_PREAD
TCC.OpenBSD += -DUSE_PREAD
TCC += $(TCC.$(HOST_OS))

include $(SRCDIR)/main.mk