Fossil SCM

Rework the makemake.tcl makefile generator script so that it generates makefiles for all windows compilers all in one go. Add an output for mingw. Ticket [fa403b6a123659d885e3]

drh 2010-12-23 17:14 trunk
Commit 723f8c200f44c7fbe666fc2ac54fe516e79b2357
+6 -6
--- BUILD.txt
+++ BUILD.txt
@@ -1,25 +1,24 @@
11
All of the source code for fossil is contained in the src/ subdirectory.
22
But there is a lot of generated code, so you will probably want to
3
-use the Makefile. To do a complete build, just type:
3
+use the Makefile. To do a complete build on unix, just type:
44
55
make
66
7
-That should work out-of-the-box on Macs and Linux systems. If you are
8
-building on a Windows box, install MinGW as well as MinGW's make (or
9
-MSYS). You can then type:
7
+On a windows box, use one of the Makefiles in the win/ subdirectory,
8
+according to your compiler and environment. For example:
109
11
- make -f Makefile.w32
10
+ make -f win/Makefile.w32
1211
1312
If you have trouble, or you want to do something fancy, just look at
1413
top level makefile. There are 6 configuration options that are all well
1514
commented. Instead of editing the Makefile, consider copying the Makefile
1615
to an alternative name such as "GNUMakefile", "BSDMakefile", or "makefile"
1716
and editing the copy.
1817
19
-Out of source builds?
---------------------------------------------------------------------------
18
+
19
+BUILDING OUTSIDE THE SOURCE TREE
2020
2121
An out of source build is pretty easy:
2222
2323
1. Make a new directory to do the builds in.
2424
2. Copy "Makefile" from the source into the build directory and
2525
--- BUILD.txt
+++ BUILD.txt
@@ -1,25 +1,24 @@
1 All of the source code for fossil is contained in the src/ subdirectory.
2 But there is a lot of generated code, so you will probably want to
3 use the Makefile. To do a complete build, just type:
4
5 make
6
7 That should work out-of-the-box on Macs and Linux systems. If you are
8 building on a Windows box, install MinGW as well as MinGW's make (or
9 MSYS). You can then type:
10
11 make -f Makefile.w32
12
13 If you have trouble, or you want to do something fancy, just look at
14 top level makefile. There are 6 configuration options that are all well
15 commented. Instead of editing the Makefile, consider copying the Makefile
16 to an alternative name such as "GNUMakefile", "BSDMakefile", or "makefile"
17 and editing the copy.
18
19 Out of source builds?
---------------------------------------------------------------------------
 
 
20
21 An out of source build is pretty easy:
22
23 1. Make a new directory to do the builds in.
24 2. Copy "Makefile" from the source into the build directory and
25
--- BUILD.txt
+++ BUILD.txt
@@ -1,25 +1,24 @@
1 All of the source code for fossil is contained in the src/ subdirectory.
2 But there is a lot of generated code, so you will probably want to
3 use the Makefile. To do a complete build on unix, just type:
4
5 make
6
7 On a windows box, use one of the Makefiles in the win/ subdirectory,
8 according to your compiler and environment. For example:
 
9
10 make -f win/Makefile.w32
11
12 If you have trouble, or you want to do something fancy, just look at
13 top level makefile. There are 6 configuration options that are all well
14 commented. Instead of editing the Makefile, consider copying the Makefile
15 to an alternative name such as "GNUMakefile", "BSDMakefile", or "makefile"
16 and editing the copy.
17
 
---------------------------------------------------------------------------
18
19 BUILDING OUTSIDE THE SOURCE TREE
20
21 An out of source build is pretty easy:
22
23 1. Make a new directory to do the builds in.
24 2. Copy "Makefile" from the source into the build directory and
25
+9 -4
--- Makefile
+++ Makefile
@@ -1,6 +1,10 @@
11
#!/usr/bin/make
2
+#
3
+# This is the top-level makefile for Fossil when the build is occurring
4
+# on a unix platform. This works out-of-the-box on most unix platforms.
5
+# But you are free to vary some of the definitions if desired.
26
#
37
#### The toplevel directory of the source tree. Fossil can be built
48
# in a directory that is separate from the source tree. Just change
59
# the following to point from the build directory to the src/ folder.
610
#
@@ -14,14 +18,14 @@
1418
#### C Compiler and options for use in building executables that
1519
# will run on the platform that is doing the build. This is used
1620
# to compile code-generator programs as part of the build process.
1721
# See TCC below for the C compiler for building the finished binary.
1822
#
19
-BCC = gcc -g -O2
23
+BCC = gcc
2024
21
-#### The suffix to add to executable files. ".exe" for windows.
22
-# Nothing for unix.
25
+#### The suffix to add to final executable file. When cross-compiling
26
+# to windows, make this ".exe". Otherwise leave it blank.
2327
#
2428
E =
2529
2630
#### C Compile and options for use in building executables that
2731
# will run on the target platform. This is usually the same
@@ -45,11 +49,12 @@
4549
LIB = -lz $(LDFLAGS)
4650
4751
# If using HTTPS:
4852
LIB += -lcrypto -lssl
4953
50
-#### Tcl shell for use in running the fossil testsuite.
54
+#### Tcl shell for use in running the fossil testsuite. If you do not
55
+# care about testing the end result, this can be blank.
5156
#
5257
TCLSH = tclsh
5358
5459
# You should not need to change anything below this line
5560
###############################################################################
5661
5762
DELETED Makefile.w32
--- Makefile
+++ Makefile
@@ -1,6 +1,10 @@
1 #!/usr/bin/make
 
 
 
 
2 #
3 #### The toplevel directory of the source tree. Fossil can be built
4 # in a directory that is separate from the source tree. Just change
5 # the following to point from the build directory to the src/ folder.
6 #
@@ -14,14 +18,14 @@
14 #### C Compiler and options for use in building executables that
15 # will run on the platform that is doing the build. This is used
16 # to compile code-generator programs as part of the build process.
17 # See TCC below for the C compiler for building the finished binary.
18 #
19 BCC = gcc -g -O2
20
21 #### The suffix to add to executable files. ".exe" for windows.
22 # Nothing for unix.
23 #
24 E =
25
26 #### C Compile and options for use in building executables that
27 # will run on the target platform. This is usually the same
@@ -45,11 +49,12 @@
45 LIB = -lz $(LDFLAGS)
46
47 # If using HTTPS:
48 LIB += -lcrypto -lssl
49
50 #### Tcl shell for use in running the fossil testsuite.
 
51 #
52 TCLSH = tclsh
53
54 # You should not need to change anything below this line
55 ###############################################################################
56
57 ELETED Makefile.w32
--- Makefile
+++ Makefile
@@ -1,6 +1,10 @@
1 #!/usr/bin/make
2 #
3 # This is the top-level makefile for Fossil when the build is occurring
4 # on a unix platform. This works out-of-the-box on most unix platforms.
5 # But you are free to vary some of the definitions if desired.
6 #
7 #### The toplevel directory of the source tree. Fossil can be built
8 # in a directory that is separate from the source tree. Just change
9 # the following to point from the build directory to the src/ folder.
10 #
@@ -14,14 +18,14 @@
18 #### C Compiler and options for use in building executables that
19 # will run on the platform that is doing the build. This is used
20 # to compile code-generator programs as part of the build process.
21 # See TCC below for the C compiler for building the finished binary.
22 #
23 BCC = gcc
24
25 #### The suffix to add to final executable file. When cross-compiling
26 # to windows, make this ".exe". Otherwise leave it blank.
27 #
28 E =
29
30 #### C Compile and options for use in building executables that
31 # will run on the target platform. This is usually the same
@@ -45,11 +49,12 @@
49 LIB = -lz $(LDFLAGS)
50
51 # If using HTTPS:
52 LIB += -lcrypto -lssl
53
54 #### Tcl shell for use in running the fossil testsuite. If you do not
55 # care about testing the end result, this can be blank.
56 #
57 TCLSH = tclsh
58
59 # You should not need to change anything below this line
60 ###############################################################################
61
62 ELETED Makefile.w32
D Makefile.w32
-63
--- a/Makefile.w32
+++ b/Makefile.w32
@@ -1,63 +0,0 @@
1
-#!/usr/bin/make
2
-#
3
-#### The toplevel directory of the source tree. Fossil can be built
4
-# in a directory that is separate from the source tree. Just change
5
-# the following to point from the build direcSRCDIR = ./src
6
-OBJDIR = ./SEP)src
7
-OBJDIR = .$(DIRSEP)wobj
8
-
9
-#### C Compiler and options for use in building executables that
10
-# will run on the platform that is doing the build. This is used
11
-# to compile code-generator programs as part of the build process.
12
-# See TCC below for the C compiler for building the finished binary.
13
-#
14
-BCC = gcc -g -O2
15
-
16
-#### The suffix to add to executable files. ".exe" for windows.
17
-# Nothing for unix.
18
-#
19
-E = .exe
20
-
21
-#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
22
-#
23
-#C Compile and options for use in building executables that
24
-# will run on the target platform. This is usually the same
25
-# as BCC, unless you are cross-compiling. This C compiler builds
26
-# the finished binary for fossil. The BCC compiler above is used
27
-# for building intermediate code-generator tools.
28
-#
29
-#TCC = gcc -O6
30
-#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
31
-#TCC = gcc -g -Os -Wall
32
-#TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include
33
-TCC = gcc -Os -Wall -DFOSSIL_I18N=0 -L/mingw/lib -I/mingw/include
34
-
35
-# With HTTPS support
36
-ifdef FOSSIL_ENABLE_SSL
37
-TCC += -DFOSSIL_ENABLE_SSL=1
38
-endif
39
-
40
-#### Extra arguments for linking the finished binary. Fossil needs
41
-# to link against the Z-Lib compression library. There are no
42
-# other dependencies. We sometimes add the -static option here
43
-# so that we can build a static executable that will run in a
44
-# chroot jail.
45
-#
46
-#LIB = -lz
47
-#LIB = -lz -lws2_32
48
-LIB = -lmingwex -lz -lws2_32
49
-# OpenSSL:
50
-ifdef FOSSIL_ENABLE_SSL
51
-LIB += -lcrypto -lssl
52
-endif
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
-####################################################
--- a/Makefile.w32
+++ b/Makefile.w32
@@ -1,63 +0,0 @@
1 #!/usr/bin/make
2 #
3 #### The toplevel directory of the source tree. Fossil can be built
4 # in a directory that is separate from the source tree. Just change
5 # the following to point from the build direcSRCDIR = ./src
6 OBJDIR = ./SEP)src
7 OBJDIR = .$(DIRSEP)wobj
8
9 #### C Compiler and options for use in building executables that
10 # will run on the platform that is doing the build. This is used
11 # to compile code-generator programs as part of the build process.
12 # See TCC below for the C compiler for building the finished binary.
13 #
14 BCC = gcc -g -O2
15
16 #### The suffix to add to executable files. ".exe" for windows.
17 # Nothing for unix.
18 #
19 E = .exe
20
21 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
22 #
23 #C Compile and options for use in building executables that
24 # will run on the target platform. This is usually the same
25 # as BCC, unless you are cross-compiling. This C compiler builds
26 # the finished binary for fossil. The BCC compiler above is used
27 # for building intermediate code-generator tools.
28 #
29 #TCC = gcc -O6
30 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
31 #TCC = gcc -g -Os -Wall
32 #TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include
33 TCC = gcc -Os -Wall -DFOSSIL_I18N=0 -L/mingw/lib -I/mingw/include
34
35 # With HTTPS support
36 ifdef FOSSIL_ENABLE_SSL
37 TCC += -DFOSSIL_ENABLE_SSL=1
38 endif
39
40 #### Extra arguments for linking the finished binary. Fossil needs
41 # to link against the Z-Lib compression library. There are no
42 # other dependencies. We sometimes add the -static option here
43 # so that we can build a static executable that will run in a
44 # chroot jail.
45 #
46 #LIB = -lz
47 #LIB = -lz -lws2_32
48 LIB = -lmingwex -lz -lws2_32
49 # OpenSSL:
50 ifdef FOSSIL_ENABLE_SSL
51 LIB += -lcrypto -lssl
52 endif
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 ####################################################
--- a/Makefile.w32
+++ b/Makefile.w32
@@ -1,63 +0,0 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
+2 -4
--- src/main.mk
+++ src/main.mk
@@ -1,14 +1,12 @@
11
# DO NOT EDIT
22
#
33
# This file is automatically generated. Instead of editing this
4
-# file, edit "makemake.tcl" then run "tclsh makemake.tcl >main.mk"
4
+# file, edit "makemake.tcl" then run "tclsh makemake.tcl"
55
# to regenerate this file.
66
#
7
-# This file is included by linux-gcc.mk or linux-mingw.mk or possible
8
-# some other makefiles. This file contains the rules that are common
9
-# to building regardless of the target.
7
+# This file is included by primary Makefile.
108
#
119
1210
XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
1311
1412
1513
--- src/main.mk
+++ src/main.mk
@@ -1,14 +1,12 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run "tclsh makemake.tcl >main.mk"
5 # to regenerate this file.
6 #
7 # This file is included by linux-gcc.mk or linux-mingw.mk or possible
8 # some other makefiles. This file contains the rules that are common
9 # to building regardless of the target.
10 #
11
12 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
13
14
15
--- src/main.mk
+++ src/main.mk
@@ -1,14 +1,12 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
5 # to regenerate this file.
6 #
7 # This file is included by primary Makefile.
 
 
8 #
9
10 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
11
12
13
+384 -148
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1,12 +1,23 @@
11
#!/usr/bin/tclsh
22
#
3
-# Run this TCL script to generate the "main.mk" makefile.
3
+# Run this TCL script to generate the various makefiles for a variety
4
+# of platforms. Files generated include:
5
+#
6
+# src/main.mk # makefile for all unix systems
7
+# win/Makefile.mingw # makefile for mingw on windows
8
+# win/Makefile.* # makefiles for other windows compilers
9
+#
10
+# Run this script while in the "src" subdirectory. Like this:
11
+#
12
+# tclsh makemake.tcl
413
#
14
+#############################################################################
515
616
# Basenames of all source files that get preprocessed using
7
-# "translate" and "makeheaders"
17
+# "translate" and "makeheaders". To add new source files to the
18
+# project, simply add the basename to this list and rerun this script.
819
#
920
set src {
1021
add
1122
allrepo
1223
attach
@@ -87,44 +98,64 @@
8798
}
8899
89100
# Name of the final application
90101
#
91102
set name fossil
92
-if { 0 == $argc } {
93
-puts {# DO NOT EDIT
103
+
104
+# The "writeln" command sends output to the target makefile.
105
+#
106
+proc writeln {args} {
107
+ global output_file
108
+ if {[lindex $args 0]=="-nonewline"} {
109
+ puts -nonewline $output_file [lindex $args 1]
110
+ } else {
111
+ puts $output_file [lindex $args 0]
112
+ }
113
+}
114
+
115
+# STOP HERE.
116
+# Unless the build procedures changes, you should not have to edit anything
117
+# below this line.
118
+
119
+##############################################################################
120
+##############################################################################
121
+##############################################################################
122
+# Start by generating the "main.mk" makefile used for all unix systems.
123
+#
124
+puts "building main.mk"
125
+set output_file [open main.mk w]
126
+writeln {# DO NOT EDIT
94127
#
95128
# This file is automatically generated. Instead of editing this
96
-# file, edit "makemake.tcl" then run "tclsh makemake.tcl >main.mk"
129
+# file, edit "makemake.tcl" then run "tclsh makemake.tcl"
97130
# to regenerate this file.
98131
#
99
-# This file is included by linux-gcc.mk or linux-mingw.mk or possible
100
-# some other makefiles. This file contains the rules that are common
101
-# to building regardless of the target.
132
+# This file is included by primary Makefile.
102133
#
103134
104135
XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
105136
106137
}
107
-puts -nonewline "SRC ="
108
-foreach s [lsort $src] {
109
- puts -nonewline " \\\n \$(SRCDIR)/$s.c"
110
-}
111
-puts "\n"
112
-puts -nonewline "TRANS_SRC ="
113
-foreach s [lsort $src] {
114
- puts -nonewline " \\\n \$(OBJDIR)/${s}_.c"
115
-}
116
-puts "\n"
117
-puts -nonewline "OBJ ="
118
-foreach s [lsort $src] {
119
- puts -nonewline " \\\n \$(OBJDIR)/$s.o"
120
-}
121
-puts "\n"
122
-puts "APPNAME = $name\$(E)"
123
-puts "\n"
124
-
125
-puts {
138
+writeln -nonewline "SRC ="
139
+foreach s [lsort $src] {
140
+ writeln -nonewline " \\\n \$(SRCDIR)/$s.c"
141
+}
142
+writeln "\n"
143
+writeln -nonewline "TRANS_SRC ="
144
+foreach s [lsort $src] {
145
+ writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c"
146
+}
147
+writeln "\n"
148
+writeln -nonewline "OBJ ="
149
+foreach s [lsort $src] {
150
+ writeln -nonewline " \\\n \$(OBJDIR)/$s.o"
151
+}
152
+writeln "\n"
153
+writeln "APPNAME = $name\$(E)"
154
+writeln "\n"
155
+
156
+writeln {
126157
all: $(OBJDIR) $(APPNAME)
127158
128159
install: $(APPNAME)
129160
mv $(APPNAME) $(INSTALLDIR)
130161
@@ -181,55 +212,259 @@
181212
set extra_h($s) {}
182213
}
183214
append mhargs " \$(SRCDIR)/sqlite3.h"
184215
append mhargs " \$(SRCDIR)/th.h"
185216
append mhargs " \$(OBJDIR)/VERSION.h"
186
-puts "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
187
-puts "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@"
188
-puts "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
189
-puts "\t\$(OBJDIR)/makeheaders $mhargs"
190
-puts "\ttouch \$(OBJDIR)/headers"
191
-puts "\$(OBJDIR)/headers: Makefile"
192
-puts "Makefile:"
217
+writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
218
+writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@"
219
+writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
220
+writeln "\t\$(OBJDIR)/makeheaders $mhargs"
221
+writeln "\ttouch \$(OBJDIR)/headers"
222
+writeln "\$(OBJDIR)/headers: Makefile"
223
+writeln "Makefile:"
224
+set extra_h(main) \$(OBJDIR)/page_index.h
225
+
226
+foreach s [lsort $src] {
227
+ writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
228
+ writeln "\t\$(OBJDIR)/translate \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n"
229
+ writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h"
230
+ writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n"
231
+ writeln "$s.h:\t\$(OBJDIR)/headers"
232
+}
233
+
234
+
235
+writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
236
+set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1}
237
+append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
238
+#append opt " -DSQLITE_ENABLE_FTS3=1"
239
+append opt " -Dlocaltime=fossil_localtime"
240
+append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
241
+writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
242
+
243
+writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
244
+set opt {-Dmain=sqlite3_shell}
245
+append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
246
+writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
247
+
248
+writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
249
+writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
250
+
251
+writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
252
+writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n"
253
+
254
+close $output_file
255
+#
256
+# End of the main.mk output
257
+##############################################################################
258
+##############################################################################
259
+##############################################################################
260
+# Begin win/Makefile.mingw
261
+#
262
+puts "building ../win/Makefile.mingw"
263
+set output_file [open ../win/Makefile.mingw w]
264
+
265
+writeln {#!/usr/bin/make
266
+#
267
+# This is a makefile for us on windows using mingw.
268
+#
269
+#### The toplevel directory of the source tree. Fossil can be built
270
+# in a directory that is separate from the source tree. Just change
271
+# the following to point from the build directory to the src/ folder.
272
+#
273
+SRCDIR = src
274
+
275
+#### The directory into which object code files should be written.
276
+#
277
+#
278
+OBJDIR = wbld
279
+
280
+#### C Compiler and options for use in building executables that
281
+# will run on the platform that is doing the build. This is used
282
+# to compile code-generator programs as part of the build process.
283
+# See TCC below for the C compiler for building the finished binary.
284
+#
285
+BCC = gcc
286
+
287
+#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
288
+#
289
+# FOSSIL_ENABLE_SSL=1
290
+
291
+#### C Compile and options for use in building executables that
292
+# will run on the target platform. This is usually the same
293
+# as BCC, unless you are cross-compiling. This C compiler builds
294
+# the finished binary for fossil. The BCC compiler above is used
295
+# for building intermediate code-generator tools.
296
+#
297
+TCC = gcc -Os -Wall -DFOSSIL_I18N=0 -L/mingw/lib -I/mingw/include
298
+
299
+# With HTTPS support
300
+ifdef FOSSIL_ENABLE_SSL
301
+TCC += -DFOSSIL_ENABLE_SSL=1
302
+endif
303
+
304
+#### Extra arguments for linking the finished binary. Fossil needs
305
+# to link against the Z-Lib compression library. There are no
306
+# other dependencies. We sometimes add the -static option here
307
+# so that we can build a static executable that will run in a
308
+# chroot jail.
309
+#
310
+#LIB = -lz -lws2_32
311
+LIB = -lmingwex -lz -lws2_32
312
+# OpenSSL:
313
+ifdef FOSSIL_ENABLE_SSL
314
+LIB += -lcrypto -lssl
315
+endif
316
+
317
+#### Tcl shell for use in running the fossil testsuite. This is only
318
+# used for testing. If you do not run
319
+#
320
+TCLSH = tclsh
321
+
322
+#### Include a configuration file that can override any one of these settings.
323
+#
324
+-include config.w32
325
+
326
+# STOP HERE
327
+# You should not need to change anything below this line
328
+#--------------------------------------------------------
329
+XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
330
+}
331
+writeln -nonewline "SRC ="
332
+foreach s [lsort $src] {
333
+ writeln -nonewline " \\\n \$(SRCDIR)/$s.c"
334
+}
335
+writeln "\n"
336
+writeln -nonewline "TRANS_SRC ="
337
+foreach s [lsort $src] {
338
+ writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c"
339
+}
340
+writeln "\n"
341
+writeln -nonewline "OBJ ="
342
+foreach s [lsort $src] {
343
+ writeln -nonewline " \\\n \$(OBJDIR)/$s.o"
344
+}
345
+writeln "\n"
346
+writeln "APPNAME = ${name}.exe"
347
+writeln {TRANSLATE = $(subst /,\\,$(OBJDIR)/translate.exe)
348
+MAKEHEADERS = $(subst /,\\,$(OBJDIR)/makeheaders.exe)
349
+MKINDEX = $(subst /,\\,$(OBJDIR)/mkindex.exe)
350
+VERSION = $(subst /,\\,$(OBJDIR)/version.exe)
351
+}
352
+
353
+writeln {
354
+all: $(OBJDIR) $(APPNAME)
355
+
356
+
357
+install: $(APPNAME)
358
+ mv $(APPNAME) $(INSTALLDIR)
359
+
360
+$(OBJDIR):
361
+ mkdir $(OBJDIR)
362
+
363
+$(OBJDIR)/translate: $(SRCDIR)/translate.c
364
+ $(BCC) -o $(OBJDIR)/translate $(SRCDIR)/translate.c
365
+
366
+$(OBJDIR)/makeheaders: $(SRCDIR)/makeheaders.c
367
+ $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c
368
+
369
+$(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c
370
+ $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c
371
+
372
+$(VERSION): $(SRCDIR)/../win/version.c
373
+ $(BCC) -o $(OBJDIR)/version $(SRCDIR)/../win/version.c
374
+
375
+# WARNING. DANGER. Running the testsuite modifies the repository the
376
+# build is done from, i.e. the checkout belongs to. Do not sync/push
377
+# the repository after running the tests.
378
+test: $(APPNAME)
379
+ $(TCLSH) test/tester.tcl $(APPNAME)
380
+
381
+$(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION)
382
+ $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest >$(OBJDIR)/VERSION.h
383
+
384
+EXTRAOBJ = \
385
+ $(OBJDIR)/sqlite3.o \
386
+ $(OBJDIR)/shell.o \
387
+ $(OBJDIR)/th.o \
388
+ $(OBJDIR)/th_lang.o
389
+
390
+$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ)
391
+ $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB)
392
+
393
+# This rule prevents make from using its default rules to try build
394
+# an executable named "manifest" out of the file named "manifest.c"
395
+#
396
+$(SRCDIR)/../manifest:
397
+ # noop
398
+
399
+clean:
400
+ del $(OBJDIR)/*
401
+ del $(APPNAME)
402
+
403
+}
404
+
405
+set mhargs {}
406
+foreach s [lsort $src] {
407
+ append mhargs " \$(OBJDIR)/${s}_.c:\$(OBJDIR)/$s.h"
408
+ set extra_h($s) {}
409
+}
410
+append mhargs " \$(SRCDIR)/sqlite3.h"
411
+append mhargs " \$(SRCDIR)/th.h"
412
+append mhargs " \$(OBJDIR)/VERSION.h"
413
+writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
414
+writeln "\t\$(MKINDEX) \$(TRANS_SRC) >$@"
415
+writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
416
+writeln "\t\$(MAKEHEADERS) $mhargs"
417
+writeln ""
418
+writeln "\$(OBJDIR)/headers: Makefile"
419
+writeln "Makefile:"
193420
set extra_h(main) \$(OBJDIR)/page_index.h
194421
195422
foreach s [lsort $src] {
196
- puts "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
197
- puts "\t\$(OBJDIR)/translate \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n"
198
- puts "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h"
199
- puts "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n"
200
- puts "$s.h:\t\$(OBJDIR)/headers"
423
+ writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
424
+ writeln "\t\$(TRANSLATE) \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n"
425
+ writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h"
426
+ writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n"
427
+ writeln "$s.h:\t\$(OBJDIR)/headers"
201428
}
202429
203430
204
-puts "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
431
+writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
205432
set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1}
206433
append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
207434
#append opt " -DSQLITE_ENABLE_FTS3=1"
208435
append opt " -Dlocaltime=fossil_localtime"
209436
append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
210
-puts "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
437
+writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
211438
212
-puts "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
439
+writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
213440
set opt {-Dmain=sqlite3_shell}
214441
append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
215
-puts "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
216
-
217
-puts "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
218
-puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
219
-
220
-puts "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
221
-puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n"
222
-exit
223
-}
224
-if { "dmc" == [lindex $argv 0] } {
225
-
226
-puts {# DO NOT EDIT
442
+writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
443
+
444
+writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
445
+writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
446
+
447
+writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
448
+writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n"
449
+
450
+
451
+close $output_file
452
+#
453
+# End of the main.mk output
454
+##############################################################################
455
+##############################################################################
456
+##############################################################################
457
+# Begin win/Makefile.dmc
458
+#
459
+puts "building ../win/Makefile.dmc"
460
+set output_file [open ../win/Makefile.dmc w]
461
+
462
+writeln {# DO NOT EDIT
227463
#
228464
# This file is automatically generated. Instead of editing this
229
-# file, edit "makemake.tcl" then run
230
-# "tclsh src/makemake.tcl dmc > win/Makefile.dmc"
465
+# file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
231466
# to regenerate this file.
232467
B = ..
233468
SRCDIR = $B\src
234469
OBJDIR = .
235470
O = .obj
@@ -248,21 +483,21 @@
248483
CFLAGS = -o
249484
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
250485
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
251486
LIBS = $(DMDIR)\extra\lib\ zlib wsock32
252487
}
253
-puts -nonewline "SRC = "
254
-foreach s [lsort $src] {
255
- puts -nonewline "${s}_.c "
256
-}
257
-puts "\n"
258
-puts -nonewline "OBJ = "
259
-foreach s [lsort $src] {
260
- puts -nonewline "\$(OBJDIR)\\$s\$O "
261
-}
262
-puts "\$(OBJDIR)\\shell\$O \$(OBJDIR)\\sqlcmd\$O \$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
263
-puts {
488
+writeln -nonewline "SRC = "
489
+foreach s [lsort $src] {
490
+ writeln -nonewline "${s}_.c "
491
+}
492
+writeln "\n"
493
+writeln -nonewline "OBJ = "
494
+foreach s [lsort $src] {
495
+ writeln -nonewline "\$(OBJDIR)\\$s\$O "
496
+}
497
+writeln "\$(OBJDIR)\\shell\$O \$(OBJDIR)\\sqlcmd\$O \$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
498
+writeln {
264499
265500
RC=$(DMDIR)\bin\rcc
266501
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
267502
268503
APPNAME = $(OBJDIR)\fossil$(E)
@@ -275,22 +510,22 @@
275510
276511
fossil.res: $B\win\fossil.rc
277512
$(RC) $(RCFLAGS) -o$@ $**
278513
279514
$(OBJDIR)\link: $B\win\Makefile.dmc}
280
-puts -nonewline "\t+echo "
281
-foreach s [lsort $src] {
282
- puts -nonewline "$s "
283
-}
284
-puts "shell sqlcmd sqlite3 th th_lang > \$@"
285
-puts "\t+echo fossil >> \$@"
286
-puts "\t+echo fossil >> \$@"
287
-puts "\t+echo \$(LIBS) >> \$@\n\n"
288
-puts "\t+echo. >> \$@\n\n"
289
-puts "\t+echo fossil >> \$@\n\n"
290
-
291
-puts {
515
+writeln -nonewline "\t+echo "
516
+foreach s [lsort $src] {
517
+ writeln -nonewline "$s "
518
+}
519
+writeln "shell sqlcmd sqlite3 th th_lang > \$@"
520
+writeln "\t+echo fossil >> \$@"
521
+writeln "\t+echo fossil >> \$@"
522
+writeln "\t+echo \$(LIBS) >> \$@\n\n"
523
+writeln "\t+echo. >> \$@\n\n"
524
+writeln "\t+echo fossil >> \$@\n\n"
525
+
526
+writeln {
292527
translate$E: $(SRCDIR)\translate.c
293528
$(BCC) -o$@ $**
294529
295530
makeheaders$E: $(SRCDIR)\makeheaders.c
296531
$(BCC) -o$@ $**
@@ -329,32 +564,38 @@
329564
realclean:
330565
-del $(APPNAME) translate$E mkindex$E makeheaders$E version$E
331566
332567
}
333568
foreach s [lsort $src] {
334
- puts "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
335
- puts "\t\$(TCC) -o\$@ -c ${s}_.c\n"
336
- puts "${s}_.c : \$(SRCDIR)\\$s.c"
337
- puts "\t+translate\$E \$** > \$@\n"
338
-}
339
-
340
-puts -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E "
341
-foreach s [lsort $src] {
342
- puts -nonewline "${s}_.c:$s.h "
343
-}
344
-puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
345
-puts "\t@copy /Y nul: headers"
346
-exit
347
-}
348
-
349
-if { "msc" == [lindex $argv 0] } {
350
-
351
-puts {# DO NOT EDIT
569
+ writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
570
+ writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
571
+ writeln "${s}_.c : \$(SRCDIR)\\$s.c"
572
+ writeln "\t+translate\$E \$** > \$@\n"
573
+}
574
+
575
+writeln -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E "
576
+foreach s [lsort $src] {
577
+ writeln -nonewline "${s}_.c:$s.h "
578
+}
579
+writeln "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
580
+writeln "\t@copy /Y nul: headers"
581
+
582
+close $output_file
583
+#
584
+# End of the win/Makefile.dmc output
585
+##############################################################################
586
+##############################################################################
587
+##############################################################################
588
+# Begin win/Makefile.msc
589
+#
590
+puts "building ../win/Makefile.msc"
591
+set output_file [open ../win/Makefile.msc w]
592
+
593
+writeln {# DO NOT EDIT
352594
#
353595
# This file is automatically generated. Instead of editing this
354
-# file, edit "makemake.tcl" then run
355
-# "tclsh src/makemake.tcl msc > win/Makefile.msc"
596
+# file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
356597
# to regenerate this file.
357598
B = ..
358599
SRCDIR = $B\src
359600
OBJDIR = .
360601
O = .obj
@@ -386,21 +627,21 @@
386627
BCC = $(CC) $(CFLAGS)
387628
TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
388629
LIBS = $(ZLIB) ws2_32.lib $(SSLLIB)
389630
LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
390631
}
391
-puts -nonewline "SRC = "
392
-foreach s [lsort $src] {
393
- puts -nonewline "${s}_.c "
394
-}
395
-puts "\n"
396
-puts -nonewline "OBJ = "
397
-foreach s [lsort $src] {
398
- puts -nonewline "\$(OBJDIR)\\$s\$O "
399
-}
400
-puts "\$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
401
-puts {
632
+writeln -nonewline "SRC = "
633
+foreach s [lsort $src] {
634
+ writeln -nonewline "${s}_.c "
635
+}
636
+writeln "\n"
637
+writeln -nonewline "OBJ = "
638
+foreach s [lsort $src] {
639
+ writeln -nonewline "\$(OBJDIR)\\$s\$O "
640
+}
641
+writeln "\$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
642
+writeln {
402643
403644
APPNAME = $(OBJDIR)\fossil$(E)
404645
405646
all: $(OBJDIR) $(APPNAME)
406647
@@ -407,18 +648,18 @@
407648
$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\linkopts
408649
cd $(OBJDIR)
409650
link -LINK -OUT:$@ $(LIBDIR) @linkopts
410651
411652
$(OBJDIR)\linkopts: $B\win\Makefile.msc}
412
-puts -nonewline "\techo "
413
-foreach s [lsort $src] {
414
- puts -nonewline "$s "
415
-}
416
-puts "sqlite3 th th_lang > \$@"
417
-puts "\techo \$(LIBS) >> \$@\n\n"
418
-
419
-puts {
653
+writeln -nonewline "\techo "
654
+foreach s [lsort $src] {
655
+ writeln -nonewline "$s "
656
+}
657
+writeln "sqlite3 th th_lang > \$@"
658
+writeln "\techo \$(LIBS) >> \$@\n\n"
659
+
660
+writeln {
420661
421662
$(OBJDIR):
422663
@-mkdir $@
423664
424665
translate$E: $(SRCDIR)\translate.c
@@ -456,33 +697,41 @@
456697
realclean:
457698
-del $(APPNAME) translate$E mkindex$E makeheaders$E version$E
458699
459700
}
460701
foreach s [lsort $src] {
461
- puts "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
462
- puts "\t\$(TCC) /Fo\$@ -c ${s}_.c\n"
463
- puts "${s}_.c : \$(SRCDIR)\\$s.c"
464
- puts "\ttranslate\$E \$** > \$@\n"
702
+ writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
703
+ writeln "\t\$(TCC) /Fo\$@ -c ${s}_.c\n"
704
+ writeln "${s}_.c : \$(SRCDIR)\\$s.c"
705
+ writeln "\ttranslate\$E \$** > \$@\n"
465706
}
466707
467
-puts -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\tmakeheaders\$E "
708
+writeln -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\tmakeheaders\$E "
468709
foreach s [lsort $src] {
469
- puts -nonewline "${s}_.c:$s.h "
470
-}
471
-puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
472
-puts "\t@copy /Y nul: headers"
473
-
474
-}
475
-if { "pellesc" == [lindex $argv 0] } {
476
-
477
-puts {# DO NOT EDIT
710
+ writeln -nonewline "${s}_.c:$s.h "
711
+}
712
+writeln "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
713
+writeln "\t@copy /Y nul: headers"
714
+
715
+
716
+close $output_file
717
+#
718
+# End of the win/Makefile.msc output
719
+##############################################################################
720
+##############################################################################
721
+##############################################################################
722
+# Begin win/Makefile.PellesCGMake
723
+#
724
+puts "building ../win/Makefile.PellesCGMake"
725
+set output_file [open ../win/Makefile.PellesCGMake w]
726
+
727
+
728
+writeln {# DO NOT EDIT
478729
#
479730
# This file is automatically generated. Instead of editing this
480
-# file, edit "makemake.tcl" then run
481
-# "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake"
731
+# file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
482732
# to regenerate this file.
483
-# ###########################################################################
484733
#
485734
# HowTo
486735
# -----
487736
#
488737
# This is a Makefile to compile fossil with PellesC from
@@ -506,11 +755,10 @@
506755
# PellesC 6.00.4
507756
# gmake 3.80
508757
# zlib sources 1.2.5
509758
# Windows 7 Home Premium
510759
#
511
-# ###########################################################################
512760
513761
#
514762
PellesCDir=c:\Programme\PellesC
515763
516764
# Select between 32/64 bit code, default is 32 bit
@@ -588,16 +836,14 @@
588836
TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
589837
590838
# main target file is the application
591839
APPLICATION=fossil.exe
592840
593
-# ###########################################################################
594841
# define the standard make target
595842
.PHONY: default
596843
default: page_index.h headers $(APPLICATION)
597844
598
-# ###########################################################################
599845
# symbolic target to generate the source generate utils
600846
.PHONY: utils
601847
utils: $(UTILS)
602848
603849
# link utils
@@ -610,32 +856,27 @@
610856
611857
# compile special windows utils
612858
version.obj: $(WINDIR)version.c
613859
$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
614860
615
-# ###########################################################################
616861
# generate the translated c-source files
617862
$(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe
618863
translate.exe $< >$@
619864
620
-# ###########################################################################
621865
# generate the index source, containing all web references,..
622866
page_index.h: $(TRANSLATEDSRC) mkindex.exe
623867
mkindex.exe $(TRANSLATEDSRC) >$@
624868
625
-# ###########################################################################
626869
# extracting version info from manifest
627870
VERSION.h: version.exe ..\manifest.uuid ..\manifest
628871
version.exe ..\manifest.uuid ..\manifest > $@
629872
630
-# ###########################################################################
631873
# generate the simplified headers
632874
headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
633875
makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
634876
echo Done >$@
635877
636
-# ###########################################################################
637878
# compile C sources with relevant options
638879
639880
$(TRANSLATEDOBJ): %_.obj: %_.c %.h
640881
$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
641882
@@ -649,21 +890,18 @@
649890
$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
650891
651892
$(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
652893
$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
653894
654
-# ###########################################################################
655895
# create the windows resource with icon and version info
656896
$(RESOURCE): %.res: ../win/%.rc ../win/*.ico
657897
$(RC) $(RCFLAGS) $< -Fo"$@"
658898
659
-# ###########################################################################
660899
# link the application
661900
$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
662901
$(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
663902
664
-# ###########################################################################
665903
# cleanup
666904
667905
.PHONY: clean
668906
clean:
669907
del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
@@ -672,8 +910,6 @@
672910
del /F $(RESOURCE)
673911
674912
.PHONY: clobber
675913
clobber: clean
676914
del /F *.exe
677
-}
678
-
679915
}
680916
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1,12 +1,23 @@
1 #!/usr/bin/tclsh
2 #
3 # Run this TCL script to generate the "main.mk" makefile.
 
 
 
 
 
 
 
 
 
4 #
 
5
6 # Basenames of all source files that get preprocessed using
7 # "translate" and "makeheaders"
 
8 #
9 set src {
10 add
11 allrepo
12 attach
@@ -87,44 +98,64 @@
87 }
88
89 # Name of the final application
90 #
91 set name fossil
92 if { 0 == $argc } {
93 puts {# DO NOT EDIT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94 #
95 # This file is automatically generated. Instead of editing this
96 # file, edit "makemake.tcl" then run "tclsh makemake.tcl >main.mk"
97 # to regenerate this file.
98 #
99 # This file is included by linux-gcc.mk or linux-mingw.mk or possible
100 # some other makefiles. This file contains the rules that are common
101 # to building regardless of the target.
102 #
103
104 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
105
106 }
107 puts -nonewline "SRC ="
108 foreach s [lsort $src] {
109 puts -nonewline " \\\n \$(SRCDIR)/$s.c"
110 }
111 puts "\n"
112 puts -nonewline "TRANS_SRC ="
113 foreach s [lsort $src] {
114 puts -nonewline " \\\n \$(OBJDIR)/${s}_.c"
115 }
116 puts "\n"
117 puts -nonewline "OBJ ="
118 foreach s [lsort $src] {
119 puts -nonewline " \\\n \$(OBJDIR)/$s.o"
120 }
121 puts "\n"
122 puts "APPNAME = $name\$(E)"
123 puts "\n"
124
125 puts {
126 all: $(OBJDIR) $(APPNAME)
127
128 install: $(APPNAME)
129 mv $(APPNAME) $(INSTALLDIR)
130
@@ -181,55 +212,259 @@
181 set extra_h($s) {}
182 }
183 append mhargs " \$(SRCDIR)/sqlite3.h"
184 append mhargs " \$(SRCDIR)/th.h"
185 append mhargs " \$(OBJDIR)/VERSION.h"
186 puts "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
187 puts "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@"
188 puts "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
189 puts "\t\$(OBJDIR)/makeheaders $mhargs"
190 puts "\ttouch \$(OBJDIR)/headers"
191 puts "\$(OBJDIR)/headers: Makefile"
192 puts "Makefile:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193 set extra_h(main) \$(OBJDIR)/page_index.h
194
195 foreach s [lsort $src] {
196 puts "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
197 puts "\t\$(OBJDIR)/translate \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n"
198 puts "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h"
199 puts "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n"
200 puts "$s.h:\t\$(OBJDIR)/headers"
201 }
202
203
204 puts "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
205 set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1}
206 append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
207 #append opt " -DSQLITE_ENABLE_FTS3=1"
208 append opt " -Dlocaltime=fossil_localtime"
209 append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
210 puts "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
211
212 puts "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
213 set opt {-Dmain=sqlite3_shell}
214 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
215 puts "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
216
217 puts "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
218 puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
219
220 puts "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
221 puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n"
222 exit
223 }
224 if { "dmc" == [lindex $argv 0] } {
225
226 puts {# DO NOT EDIT
 
 
 
 
 
 
 
 
 
227 #
228 # This file is automatically generated. Instead of editing this
229 # file, edit "makemake.tcl" then run
230 # "tclsh src/makemake.tcl dmc > win/Makefile.dmc"
231 # to regenerate this file.
232 B = ..
233 SRCDIR = $B\src
234 OBJDIR = .
235 O = .obj
@@ -248,21 +483,21 @@
248 CFLAGS = -o
249 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
250 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
251 LIBS = $(DMDIR)\extra\lib\ zlib wsock32
252 }
253 puts -nonewline "SRC = "
254 foreach s [lsort $src] {
255 puts -nonewline "${s}_.c "
256 }
257 puts "\n"
258 puts -nonewline "OBJ = "
259 foreach s [lsort $src] {
260 puts -nonewline "\$(OBJDIR)\\$s\$O "
261 }
262 puts "\$(OBJDIR)\\shell\$O \$(OBJDIR)\\sqlcmd\$O \$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
263 puts {
264
265 RC=$(DMDIR)\bin\rcc
266 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
267
268 APPNAME = $(OBJDIR)\fossil$(E)
@@ -275,22 +510,22 @@
275
276 fossil.res: $B\win\fossil.rc
277 $(RC) $(RCFLAGS) -o$@ $**
278
279 $(OBJDIR)\link: $B\win\Makefile.dmc}
280 puts -nonewline "\t+echo "
281 foreach s [lsort $src] {
282 puts -nonewline "$s "
283 }
284 puts "shell sqlcmd sqlite3 th th_lang > \$@"
285 puts "\t+echo fossil >> \$@"
286 puts "\t+echo fossil >> \$@"
287 puts "\t+echo \$(LIBS) >> \$@\n\n"
288 puts "\t+echo. >> \$@\n\n"
289 puts "\t+echo fossil >> \$@\n\n"
290
291 puts {
292 translate$E: $(SRCDIR)\translate.c
293 $(BCC) -o$@ $**
294
295 makeheaders$E: $(SRCDIR)\makeheaders.c
296 $(BCC) -o$@ $**
@@ -329,32 +564,38 @@
329 realclean:
330 -del $(APPNAME) translate$E mkindex$E makeheaders$E version$E
331
332 }
333 foreach s [lsort $src] {
334 puts "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
335 puts "\t\$(TCC) -o\$@ -c ${s}_.c\n"
336 puts "${s}_.c : \$(SRCDIR)\\$s.c"
337 puts "\t+translate\$E \$** > \$@\n"
338 }
339
340 puts -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E "
341 foreach s [lsort $src] {
342 puts -nonewline "${s}_.c:$s.h "
343 }
344 puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
345 puts "\t@copy /Y nul: headers"
346 exit
347 }
348
349 if { "msc" == [lindex $argv 0] } {
350
351 puts {# DO NOT EDIT
 
 
 
 
 
 
 
352 #
353 # This file is automatically generated. Instead of editing this
354 # file, edit "makemake.tcl" then run
355 # "tclsh src/makemake.tcl msc > win/Makefile.msc"
356 # to regenerate this file.
357 B = ..
358 SRCDIR = $B\src
359 OBJDIR = .
360 O = .obj
@@ -386,21 +627,21 @@
386 BCC = $(CC) $(CFLAGS)
387 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
388 LIBS = $(ZLIB) ws2_32.lib $(SSLLIB)
389 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
390 }
391 puts -nonewline "SRC = "
392 foreach s [lsort $src] {
393 puts -nonewline "${s}_.c "
394 }
395 puts "\n"
396 puts -nonewline "OBJ = "
397 foreach s [lsort $src] {
398 puts -nonewline "\$(OBJDIR)\\$s\$O "
399 }
400 puts "\$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
401 puts {
402
403 APPNAME = $(OBJDIR)\fossil$(E)
404
405 all: $(OBJDIR) $(APPNAME)
406
@@ -407,18 +648,18 @@
407 $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\linkopts
408 cd $(OBJDIR)
409 link -LINK -OUT:$@ $(LIBDIR) @linkopts
410
411 $(OBJDIR)\linkopts: $B\win\Makefile.msc}
412 puts -nonewline "\techo "
413 foreach s [lsort $src] {
414 puts -nonewline "$s "
415 }
416 puts "sqlite3 th th_lang > \$@"
417 puts "\techo \$(LIBS) >> \$@\n\n"
418
419 puts {
420
421 $(OBJDIR):
422 @-mkdir $@
423
424 translate$E: $(SRCDIR)\translate.c
@@ -456,33 +697,41 @@
456 realclean:
457 -del $(APPNAME) translate$E mkindex$E makeheaders$E version$E
458
459 }
460 foreach s [lsort $src] {
461 puts "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
462 puts "\t\$(TCC) /Fo\$@ -c ${s}_.c\n"
463 puts "${s}_.c : \$(SRCDIR)\\$s.c"
464 puts "\ttranslate\$E \$** > \$@\n"
465 }
466
467 puts -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\tmakeheaders\$E "
468 foreach s [lsort $src] {
469 puts -nonewline "${s}_.c:$s.h "
470 }
471 puts "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
472 puts "\t@copy /Y nul: headers"
473
474 }
475 if { "pellesc" == [lindex $argv 0] } {
476
477 puts {# DO NOT EDIT
 
 
 
 
 
 
 
 
 
 
478 #
479 # This file is automatically generated. Instead of editing this
480 # file, edit "makemake.tcl" then run
481 # "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake"
482 # to regenerate this file.
483 # ###########################################################################
484 #
485 # HowTo
486 # -----
487 #
488 # This is a Makefile to compile fossil with PellesC from
@@ -506,11 +755,10 @@
506 # PellesC 6.00.4
507 # gmake 3.80
508 # zlib sources 1.2.5
509 # Windows 7 Home Premium
510 #
511 # ###########################################################################
512
513 #
514 PellesCDir=c:\Programme\PellesC
515
516 # Select between 32/64 bit code, default is 32 bit
@@ -588,16 +836,14 @@
588 TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
589
590 # main target file is the application
591 APPLICATION=fossil.exe
592
593 # ###########################################################################
594 # define the standard make target
595 .PHONY: default
596 default: page_index.h headers $(APPLICATION)
597
598 # ###########################################################################
599 # symbolic target to generate the source generate utils
600 .PHONY: utils
601 utils: $(UTILS)
602
603 # link utils
@@ -610,32 +856,27 @@
610
611 # compile special windows utils
612 version.obj: $(WINDIR)version.c
613 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
614
615 # ###########################################################################
616 # generate the translated c-source files
617 $(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe
618 translate.exe $< >$@
619
620 # ###########################################################################
621 # generate the index source, containing all web references,..
622 page_index.h: $(TRANSLATEDSRC) mkindex.exe
623 mkindex.exe $(TRANSLATEDSRC) >$@
624
625 # ###########################################################################
626 # extracting version info from manifest
627 VERSION.h: version.exe ..\manifest.uuid ..\manifest
628 version.exe ..\manifest.uuid ..\manifest > $@
629
630 # ###########################################################################
631 # generate the simplified headers
632 headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
633 makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
634 echo Done >$@
635
636 # ###########################################################################
637 # compile C sources with relevant options
638
639 $(TRANSLATEDOBJ): %_.obj: %_.c %.h
640 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
641
@@ -649,21 +890,18 @@
649 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
650
651 $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
652 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
653
654 # ###########################################################################
655 # create the windows resource with icon and version info
656 $(RESOURCE): %.res: ../win/%.rc ../win/*.ico
657 $(RC) $(RCFLAGS) $< -Fo"$@"
658
659 # ###########################################################################
660 # link the application
661 $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
662 $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
663
664 # ###########################################################################
665 # cleanup
666
667 .PHONY: clean
668 clean:
669 del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
@@ -672,8 +910,6 @@
672 del /F $(RESOURCE)
673
674 .PHONY: clobber
675 clobber: clean
676 del /F *.exe
677 }
678
679 }
680
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1,12 +1,23 @@
1 #!/usr/bin/tclsh
2 #
3 # Run this TCL script to generate the various makefiles for a variety
4 # of platforms. Files generated include:
5 #
6 # src/main.mk # makefile for all unix systems
7 # win/Makefile.mingw # makefile for mingw on windows
8 # win/Makefile.* # makefiles for other windows compilers
9 #
10 # Run this script while in the "src" subdirectory. Like this:
11 #
12 # tclsh makemake.tcl
13 #
14 #############################################################################
15
16 # Basenames of all source files that get preprocessed using
17 # "translate" and "makeheaders". To add new source files to the
18 # project, simply add the basename to this list and rerun this script.
19 #
20 set src {
21 add
22 allrepo
23 attach
@@ -87,44 +98,64 @@
98 }
99
100 # Name of the final application
101 #
102 set name fossil
103
104 # The "writeln" command sends output to the target makefile.
105 #
106 proc writeln {args} {
107 global output_file
108 if {[lindex $args 0]=="-nonewline"} {
109 puts -nonewline $output_file [lindex $args 1]
110 } else {
111 puts $output_file [lindex $args 0]
112 }
113 }
114
115 # STOP HERE.
116 # Unless the build procedures changes, you should not have to edit anything
117 # below this line.
118
119 ##############################################################################
120 ##############################################################################
121 ##############################################################################
122 # Start by generating the "main.mk" makefile used for all unix systems.
123 #
124 puts "building main.mk"
125 set output_file [open main.mk w]
126 writeln {# DO NOT EDIT
127 #
128 # This file is automatically generated. Instead of editing this
129 # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
130 # to regenerate this file.
131 #
132 # This file is included by primary Makefile.
 
 
133 #
134
135 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
136
137 }
138 writeln -nonewline "SRC ="
139 foreach s [lsort $src] {
140 writeln -nonewline " \\\n \$(SRCDIR)/$s.c"
141 }
142 writeln "\n"
143 writeln -nonewline "TRANS_SRC ="
144 foreach s [lsort $src] {
145 writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c"
146 }
147 writeln "\n"
148 writeln -nonewline "OBJ ="
149 foreach s [lsort $src] {
150 writeln -nonewline " \\\n \$(OBJDIR)/$s.o"
151 }
152 writeln "\n"
153 writeln "APPNAME = $name\$(E)"
154 writeln "\n"
155
156 writeln {
157 all: $(OBJDIR) $(APPNAME)
158
159 install: $(APPNAME)
160 mv $(APPNAME) $(INSTALLDIR)
161
@@ -181,55 +212,259 @@
212 set extra_h($s) {}
213 }
214 append mhargs " \$(SRCDIR)/sqlite3.h"
215 append mhargs " \$(SRCDIR)/th.h"
216 append mhargs " \$(OBJDIR)/VERSION.h"
217 writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
218 writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@"
219 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
220 writeln "\t\$(OBJDIR)/makeheaders $mhargs"
221 writeln "\ttouch \$(OBJDIR)/headers"
222 writeln "\$(OBJDIR)/headers: Makefile"
223 writeln "Makefile:"
224 set extra_h(main) \$(OBJDIR)/page_index.h
225
226 foreach s [lsort $src] {
227 writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
228 writeln "\t\$(OBJDIR)/translate \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n"
229 writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h"
230 writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n"
231 writeln "$s.h:\t\$(OBJDIR)/headers"
232 }
233
234
235 writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
236 set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1}
237 append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
238 #append opt " -DSQLITE_ENABLE_FTS3=1"
239 append opt " -Dlocaltime=fossil_localtime"
240 append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
241 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
242
243 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
244 set opt {-Dmain=sqlite3_shell}
245 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
246 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
247
248 writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
249 writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
250
251 writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
252 writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n"
253
254 close $output_file
255 #
256 # End of the main.mk output
257 ##############################################################################
258 ##############################################################################
259 ##############################################################################
260 # Begin win/Makefile.mingw
261 #
262 puts "building ../win/Makefile.mingw"
263 set output_file [open ../win/Makefile.mingw w]
264
265 writeln {#!/usr/bin/make
266 #
267 # This is a makefile for us on windows using mingw.
268 #
269 #### The toplevel directory of the source tree. Fossil can be built
270 # in a directory that is separate from the source tree. Just change
271 # the following to point from the build directory to the src/ folder.
272 #
273 SRCDIR = src
274
275 #### The directory into which object code files should be written.
276 #
277 #
278 OBJDIR = wbld
279
280 #### C Compiler and options for use in building executables that
281 # will run on the platform that is doing the build. This is used
282 # to compile code-generator programs as part of the build process.
283 # See TCC below for the C compiler for building the finished binary.
284 #
285 BCC = gcc
286
287 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
288 #
289 # FOSSIL_ENABLE_SSL=1
290
291 #### C Compile and options for use in building executables that
292 # will run on the target platform. This is usually the same
293 # as BCC, unless you are cross-compiling. This C compiler builds
294 # the finished binary for fossil. The BCC compiler above is used
295 # for building intermediate code-generator tools.
296 #
297 TCC = gcc -Os -Wall -DFOSSIL_I18N=0 -L/mingw/lib -I/mingw/include
298
299 # With HTTPS support
300 ifdef FOSSIL_ENABLE_SSL
301 TCC += -DFOSSIL_ENABLE_SSL=1
302 endif
303
304 #### Extra arguments for linking the finished binary. Fossil needs
305 # to link against the Z-Lib compression library. There are no
306 # other dependencies. We sometimes add the -static option here
307 # so that we can build a static executable that will run in a
308 # chroot jail.
309 #
310 #LIB = -lz -lws2_32
311 LIB = -lmingwex -lz -lws2_32
312 # OpenSSL:
313 ifdef FOSSIL_ENABLE_SSL
314 LIB += -lcrypto -lssl
315 endif
316
317 #### Tcl shell for use in running the fossil testsuite. This is only
318 # used for testing. If you do not run
319 #
320 TCLSH = tclsh
321
322 #### Include a configuration file that can override any one of these settings.
323 #
324 -include config.w32
325
326 # STOP HERE
327 # You should not need to change anything below this line
328 #--------------------------------------------------------
329 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
330 }
331 writeln -nonewline "SRC ="
332 foreach s [lsort $src] {
333 writeln -nonewline " \\\n \$(SRCDIR)/$s.c"
334 }
335 writeln "\n"
336 writeln -nonewline "TRANS_SRC ="
337 foreach s [lsort $src] {
338 writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c"
339 }
340 writeln "\n"
341 writeln -nonewline "OBJ ="
342 foreach s [lsort $src] {
343 writeln -nonewline " \\\n \$(OBJDIR)/$s.o"
344 }
345 writeln "\n"
346 writeln "APPNAME = ${name}.exe"
347 writeln {TRANSLATE = $(subst /,\\,$(OBJDIR)/translate.exe)
348 MAKEHEADERS = $(subst /,\\,$(OBJDIR)/makeheaders.exe)
349 MKINDEX = $(subst /,\\,$(OBJDIR)/mkindex.exe)
350 VERSION = $(subst /,\\,$(OBJDIR)/version.exe)
351 }
352
353 writeln {
354 all: $(OBJDIR) $(APPNAME)
355
356
357 install: $(APPNAME)
358 mv $(APPNAME) $(INSTALLDIR)
359
360 $(OBJDIR):
361 mkdir $(OBJDIR)
362
363 $(OBJDIR)/translate: $(SRCDIR)/translate.c
364 $(BCC) -o $(OBJDIR)/translate $(SRCDIR)/translate.c
365
366 $(OBJDIR)/makeheaders: $(SRCDIR)/makeheaders.c
367 $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c
368
369 $(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c
370 $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c
371
372 $(VERSION): $(SRCDIR)/../win/version.c
373 $(BCC) -o $(OBJDIR)/version $(SRCDIR)/../win/version.c
374
375 # WARNING. DANGER. Running the testsuite modifies the repository the
376 # build is done from, i.e. the checkout belongs to. Do not sync/push
377 # the repository after running the tests.
378 test: $(APPNAME)
379 $(TCLSH) test/tester.tcl $(APPNAME)
380
381 $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION)
382 $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest >$(OBJDIR)/VERSION.h
383
384 EXTRAOBJ = \
385 $(OBJDIR)/sqlite3.o \
386 $(OBJDIR)/shell.o \
387 $(OBJDIR)/th.o \
388 $(OBJDIR)/th_lang.o
389
390 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ)
391 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB)
392
393 # This rule prevents make from using its default rules to try build
394 # an executable named "manifest" out of the file named "manifest.c"
395 #
396 $(SRCDIR)/../manifest:
397 # noop
398
399 clean:
400 del $(OBJDIR)/*
401 del $(APPNAME)
402
403 }
404
405 set mhargs {}
406 foreach s [lsort $src] {
407 append mhargs " \$(OBJDIR)/${s}_.c:\$(OBJDIR)/$s.h"
408 set extra_h($s) {}
409 }
410 append mhargs " \$(SRCDIR)/sqlite3.h"
411 append mhargs " \$(SRCDIR)/th.h"
412 append mhargs " \$(OBJDIR)/VERSION.h"
413 writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
414 writeln "\t\$(MKINDEX) \$(TRANS_SRC) >$@"
415 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
416 writeln "\t\$(MAKEHEADERS) $mhargs"
417 writeln ""
418 writeln "\$(OBJDIR)/headers: Makefile"
419 writeln "Makefile:"
420 set extra_h(main) \$(OBJDIR)/page_index.h
421
422 foreach s [lsort $src] {
423 writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
424 writeln "\t\$(TRANSLATE) \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n"
425 writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h"
426 writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n"
427 writeln "$s.h:\t\$(OBJDIR)/headers"
428 }
429
430
431 writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
432 set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1}
433 append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
434 #append opt " -DSQLITE_ENABLE_FTS3=1"
435 append opt " -Dlocaltime=fossil_localtime"
436 append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
437 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
438
439 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
440 set opt {-Dmain=sqlite3_shell}
441 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
442 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
443
444 writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
445 writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
446
447 writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
448 writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n"
449
450
451 close $output_file
452 #
453 # End of the main.mk output
454 ##############################################################################
455 ##############################################################################
456 ##############################################################################
457 # Begin win/Makefile.dmc
458 #
459 puts "building ../win/Makefile.dmc"
460 set output_file [open ../win/Makefile.dmc w]
461
462 writeln {# DO NOT EDIT
463 #
464 # This file is automatically generated. Instead of editing this
465 # file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
 
466 # to regenerate this file.
467 B = ..
468 SRCDIR = $B\src
469 OBJDIR = .
470 O = .obj
@@ -248,21 +483,21 @@
483 CFLAGS = -o
484 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
485 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
486 LIBS = $(DMDIR)\extra\lib\ zlib wsock32
487 }
488 writeln -nonewline "SRC = "
489 foreach s [lsort $src] {
490 writeln -nonewline "${s}_.c "
491 }
492 writeln "\n"
493 writeln -nonewline "OBJ = "
494 foreach s [lsort $src] {
495 writeln -nonewline "\$(OBJDIR)\\$s\$O "
496 }
497 writeln "\$(OBJDIR)\\shell\$O \$(OBJDIR)\\sqlcmd\$O \$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
498 writeln {
499
500 RC=$(DMDIR)\bin\rcc
501 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
502
503 APPNAME = $(OBJDIR)\fossil$(E)
@@ -275,22 +510,22 @@
510
511 fossil.res: $B\win\fossil.rc
512 $(RC) $(RCFLAGS) -o$@ $**
513
514 $(OBJDIR)\link: $B\win\Makefile.dmc}
515 writeln -nonewline "\t+echo "
516 foreach s [lsort $src] {
517 writeln -nonewline "$s "
518 }
519 writeln "shell sqlcmd sqlite3 th th_lang > \$@"
520 writeln "\t+echo fossil >> \$@"
521 writeln "\t+echo fossil >> \$@"
522 writeln "\t+echo \$(LIBS) >> \$@\n\n"
523 writeln "\t+echo. >> \$@\n\n"
524 writeln "\t+echo fossil >> \$@\n\n"
525
526 writeln {
527 translate$E: $(SRCDIR)\translate.c
528 $(BCC) -o$@ $**
529
530 makeheaders$E: $(SRCDIR)\makeheaders.c
531 $(BCC) -o$@ $**
@@ -329,32 +564,38 @@
564 realclean:
565 -del $(APPNAME) translate$E mkindex$E makeheaders$E version$E
566
567 }
568 foreach s [lsort $src] {
569 writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
570 writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
571 writeln "${s}_.c : \$(SRCDIR)\\$s.c"
572 writeln "\t+translate\$E \$** > \$@\n"
573 }
574
575 writeln -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E "
576 foreach s [lsort $src] {
577 writeln -nonewline "${s}_.c:$s.h "
578 }
579 writeln "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
580 writeln "\t@copy /Y nul: headers"
581
582 close $output_file
583 #
584 # End of the win/Makefile.dmc output
585 ##############################################################################
586 ##############################################################################
587 ##############################################################################
588 # Begin win/Makefile.msc
589 #
590 puts "building ../win/Makefile.msc"
591 set output_file [open ../win/Makefile.msc w]
592
593 writeln {# DO NOT EDIT
594 #
595 # This file is automatically generated. Instead of editing this
596 # file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
 
597 # to regenerate this file.
598 B = ..
599 SRCDIR = $B\src
600 OBJDIR = .
601 O = .obj
@@ -386,21 +627,21 @@
627 BCC = $(CC) $(CFLAGS)
628 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
629 LIBS = $(ZLIB) ws2_32.lib $(SSLLIB)
630 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
631 }
632 writeln -nonewline "SRC = "
633 foreach s [lsort $src] {
634 writeln -nonewline "${s}_.c "
635 }
636 writeln "\n"
637 writeln -nonewline "OBJ = "
638 foreach s [lsort $src] {
639 writeln -nonewline "\$(OBJDIR)\\$s\$O "
640 }
641 writeln "\$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O "
642 writeln {
643
644 APPNAME = $(OBJDIR)\fossil$(E)
645
646 all: $(OBJDIR) $(APPNAME)
647
@@ -407,18 +648,18 @@
648 $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\linkopts
649 cd $(OBJDIR)
650 link -LINK -OUT:$@ $(LIBDIR) @linkopts
651
652 $(OBJDIR)\linkopts: $B\win\Makefile.msc}
653 writeln -nonewline "\techo "
654 foreach s [lsort $src] {
655 writeln -nonewline "$s "
656 }
657 writeln "sqlite3 th th_lang > \$@"
658 writeln "\techo \$(LIBS) >> \$@\n\n"
659
660 writeln {
661
662 $(OBJDIR):
663 @-mkdir $@
664
665 translate$E: $(SRCDIR)\translate.c
@@ -456,33 +697,41 @@
697 realclean:
698 -del $(APPNAME) translate$E mkindex$E makeheaders$E version$E
699
700 }
701 foreach s [lsort $src] {
702 writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
703 writeln "\t\$(TCC) /Fo\$@ -c ${s}_.c\n"
704 writeln "${s}_.c : \$(SRCDIR)\\$s.c"
705 writeln "\ttranslate\$E \$** > \$@\n"
706 }
707
708 writeln -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\tmakeheaders\$E "
709 foreach s [lsort $src] {
710 writeln -nonewline "${s}_.c:$s.h "
711 }
712 writeln "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h"
713 writeln "\t@copy /Y nul: headers"
714
715
716 close $output_file
717 #
718 # End of the win/Makefile.msc output
719 ##############################################################################
720 ##############################################################################
721 ##############################################################################
722 # Begin win/Makefile.PellesCGMake
723 #
724 puts "building ../win/Makefile.PellesCGMake"
725 set output_file [open ../win/Makefile.PellesCGMake w]
726
727
728 writeln {# DO NOT EDIT
729 #
730 # This file is automatically generated. Instead of editing this
731 # file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
 
732 # to regenerate this file.
 
733 #
734 # HowTo
735 # -----
736 #
737 # This is a Makefile to compile fossil with PellesC from
@@ -506,11 +755,10 @@
755 # PellesC 6.00.4
756 # gmake 3.80
757 # zlib sources 1.2.5
758 # Windows 7 Home Premium
759 #
 
760
761 #
762 PellesCDir=c:\Programme\PellesC
763
764 # Select between 32/64 bit code, default is 32 bit
@@ -588,16 +836,14 @@
836 TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
837
838 # main target file is the application
839 APPLICATION=fossil.exe
840
 
841 # define the standard make target
842 .PHONY: default
843 default: page_index.h headers $(APPLICATION)
844
 
845 # symbolic target to generate the source generate utils
846 .PHONY: utils
847 utils: $(UTILS)
848
849 # link utils
@@ -610,32 +856,27 @@
856
857 # compile special windows utils
858 version.obj: $(WINDIR)version.c
859 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
860
 
861 # generate the translated c-source files
862 $(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe
863 translate.exe $< >$@
864
 
865 # generate the index source, containing all web references,..
866 page_index.h: $(TRANSLATEDSRC) mkindex.exe
867 mkindex.exe $(TRANSLATEDSRC) >$@
868
 
869 # extracting version info from manifest
870 VERSION.h: version.exe ..\manifest.uuid ..\manifest
871 version.exe ..\manifest.uuid ..\manifest > $@
872
 
873 # generate the simplified headers
874 headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
875 makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
876 echo Done >$@
877
 
878 # compile C sources with relevant options
879
880 $(TRANSLATEDOBJ): %_.obj: %_.c %.h
881 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
882
@@ -649,21 +890,18 @@
890 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
891
892 $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
893 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
894
 
895 # create the windows resource with icon and version info
896 $(RESOURCE): %.res: ../win/%.rc ../win/*.ico
897 $(RC) $(RCFLAGS) $< -Fo"$@"
898
 
899 # link the application
900 $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
901 $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
902
 
903 # cleanup
904
905 .PHONY: clean
906 clean:
907 del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
@@ -672,8 +910,6 @@
910 del /F $(RESOURCE)
911
912 .PHONY: clobber
913 clobber: clean
914 del /F *.exe
 
 
915 }
916
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -1,201 +1,188 @@
1
-# DO NOT EDIT
2
-#
3
-# This file is automatically generated. Instead of editing this
4
-# file, edit "makemake.tcl" then run
5
-# "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake"
6
-# to regenerate this file.
7
-# ###########################################################################
8
-#
9
-# HowTo
10
-# -----
11
-#
12
-# This is a Makefile to compile fossil with PellesC from
13
-# http://www.smorgasbordet.com/pellesc/index.htm
14
-# In addition to the Compiler envrionment, you need
15
-# gmake from http://sourceforge.net/projects/unxutils/, Pelles make version
16
-# couldn't handle the complex dependencies in this build
17
-# zlib sources
18
-# Then you do
19
-# 1. create a directory PellesC in the project root directory
20
-# 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation
21
-# 3. open a dos prompt window and change working directory into PellesC (step 1)
22
-# 4. run gmake -f ..\win\Makefile.PellesCGMake
23
-#
24
-# this file is tested with
25
-# PellesC 5.00.13
26
-# gmake 3.80
27
-# zlib sources 1.2.5
28
-# Windows XP SP 2
29
-# and
30
-# PellesC 6.00.4
31
-# gmake 3.80
32
-# zlib sources 1.2.5
33
-# Windows 7 Home Premium
34
-#
35
-# ###########################################################################
36
-
37
-#
38
-PellesCDir=c:\Programme\PellesC
39
-
40
-# Select between 32/64 bit code, default is 32 bit
41
-#TARGETVERSION=64
42
-
43
-ifeq ($(TARGETVERSION),64)
44
-# 64 bit version
45
-TARGETMACHINE_CC=amd64
46
-TARGETMACHINE_LN=amd64
47
-TARGETEXTEND=64
48
-else
49
-# 32 bit version
50
-TARGETMACHINE_CC=x86
51
-TARGETMACHINE_LN=ix86
52
-TARGETEXTEND=
53
-endif
54
-
55
-# define the project directories
56
-B=..
57
-SRCDIR=$(B)/src/
58
-WINDIR=$(B)/win/
59
-ZLIBSRCDIR=../../zlib/
60
-
61
-# define linker command and options
62
-LINK=$(PellesCDir)/bin/polink.exe
63
-LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib Crtmt$(TARGETEXTEND).lib
64
-
65
-# define standard C-compiler and flags, used to compile
66
-# the fossil binary. Some special definitions follow for
67
-# special files follow
68
-CC=$(PellesCDir)\bin\pocc.exe
69
-DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp -D_pgmptr=g.argv[0]
70
-CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES)
71
-INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR)
72
-
73
-# define commands for building the windows resource files
74
-RESOURCE=fossil.res
75
-RC=$(PellesCDir)\bin\porc.exe
76
-RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION)
77
-
78
-# define the special utilities files, needed to generate
79
-# the automatically generated source files
80
-UTILS=translate.exe mkindex.exe makeheaders.exe
81
-UTILS_OBJ=$(UTILS:.exe=.obj)
82
-UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c))
83
-
84
-# define the sqlite files, which need special flags on compile
85
-SQLITESRC=sqlite3.c
86
-ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87
-SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88
-SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
89
-
90
-# define the sqlite shell files, which need special flags on compile
91
-SQLITESHELLSRC=shell.c
92
-ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93
-SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
-SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
95
-
96
-# define the th scripting files, which need special flags on compile
97
-THSRC=th.c th_lang.c
98
-ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
99
-THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100
-
101
-# define the zlib files, needed by this compile
102
-ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
103
-ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf))
104
-ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj))
105
-
106
-# define all fossil sources, using the standard compile and
107
-# source generation. These are all files in SRCDIR, which are not
108
-# mentioned as special files above:
109
-ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c))
110
-SRC=$(subst $(SRCDIR),,$(ORIGSRC))
111
-TRANSLATEDSRC=$(SRC:.c=_.c)
112
-TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
113
-
114
-# main target file is the application
115
-APPLICATION=fossil.exe
116
-
117
-# ###########################################################################
118
-# define the standard make target
119
-.PHONY: default
120
-default: page_index.h headers $(APPLICATION)
121
-
122
-# ###########################################################################
123
-# symbolic target to generate the source generate utils
124
-.PHONY: utils
125
-utils: $(UTILS)
126
-
127
-# link utils
128
-$(UTILS) version.exe: %.exe: %.obj
129
- $(LINK) $(LINKFLAGS) -out:"$@" $<
130
-
131
-# compiling standard fossil utils
132
-$(UTILS_OBJ): %.obj: $(SRCDIR)%.c
133
- $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
134
-
135
-# compile special windows utils
136
-version.obj: $(WINDIR)version.c
137
- $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
138
-
139
-# ###########################################################################
140
-# generate the translated c-source files
141
-$(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe
142
- translate.exe $< >$@
143
-
144
-# ###########################################################################
145
-# generate the index source, containing all web references,..
146
-page_index.h: $(TRANSLATEDSRC) mkindex.exe
147
- mkindex.exe $(TRANSLATEDSRC) >$@
148
-
149
-# ###########################################################################
150
-# extracting version info from manifest
151
-VERSION.h: version.exe ..\manifest.uuid ..\manifest
152
- version.exe ..\manifest.uuid ..\manifest > $@
153
-
154
-# ###########################################################################
155
-# generate the simplified headers
156
-headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
157
- makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
158
- echo Done >$@
159
-
160
-# ###########################################################################
161
-# compile C sources with relevant options
162
-
163
-$(TRANSLATEDOBJ): %_.obj: %_.c %.h
164
- $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
165
-
166
-$(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h
167
- $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@"
168
-
169
-$(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c
170
- $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@"
171
-
172
-$(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h
173
- $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
174
-
175
-$(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
176
- $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
177
-
178
-# ###########################################################################
179
-# create the windows resource with icon and version info
180
-$(RESOURCE): %.res: ../win/%.rc ../win/*.ico
181
- $(RC) $(RCFLAGS) $< -Fo"$@"
182
-
183
-# ###########################################################################
184
-# link the application
185
-$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
186
- $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
187
-
188
-# ###########################################################################
189
-# cleanup
190
-
191
-.PHONY: clean
192
-clean:
193
- del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
194
- del /F $(TRANSLATEDSRC)
195
- del /F *.h headers
196
- del /F $(RESOURCE)
197
-
198
-.PHONY: clobber
199
-clobber: clean
200
- del /F *.exe
201
-
1
+# DO NOT EDIT
2
+#
3
+# This file is automatically generated. Instead of editing this
4
+# file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
5
+# to regenerate this file.
6
+#
7
+# HowTo
8
+# -----
9
+#
10
+# This is a Makefile to compile fossil with PellesC from
11
+# http://www.smorgasbordet.com/pellesc/index.htm
12
+# In addition to the Compiler envrionment, you need
13
+# gmake from http://sourceforge.net/projects/unxutils/, Pelles make version
14
+# couldn't handle the complex dependencies in this build
15
+# zlib sources
16
+# Then you do
17
+# 1. create a directory PellesC in the project root directory
18
+# 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation
19
+# 3. open a dos prompt window and change working directory into PellesC (step 1)
20
+# 4. run gmake -f ..\win\Makefile.PellesCGMake
21
+#
22
+# this file is tested with
23
+# PellesC 5.00.13
24
+# gmake 3.80
25
+# zlib sources 1.2.5
26
+# Windows XP SP 2
27
+# and
28
+# PellesC 6.00.4
29
+# gmake 3.80
30
+# zlib sources 1.2.5
31
+# Windows 7 Home Premium
32
+#
33
+
34
+#
35
+PellesCDir=c:\Programme\PellesC
36
+
37
+# Select between 32/64 bit code, default is 32 bit
38
+#TARGETVERSION=64
39
+
40
+ifeq ($(TARGETVERSION),64)
41
+# 64 bit version
42
+TARGETMACHINE_CC=amd64
43
+TARGETMACHINE_LN=amd64
44
+TARGETEXTEND=64
45
+else
46
+# 32 bit version
47
+TARGETMACHINE_CC=x86
48
+TARGETMACHINE_LN=ix86
49
+TARGETEXTEND=
50
+endif
51
+
52
+# define the project directories
53
+B=..
54
+SRCDIR=$(B)/src/
55
+WINDIR=$(B)/win/
56
+ZLIBSRCDIR=../../zlib/
57
+
58
+# define linker command and options
59
+LINK=$(PellesCDir)/bin/polink.exe
60
+LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib Crtmt$(TARGETEXTEND).lib
61
+
62
+# define standard C-compiler and flags, used to compile
63
+# the fossil binary. Some special definitions follow for
64
+# special files follow
65
+CC=$(PellesCDir)\bin\pocc.exe
66
+DEFINES=-DFOSSIL_I18N=0 -D_pgmptr=g.argv[0]
67
+CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES)
68
+INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR)
69
+
70
+# define commands for building the windows resource files
71
+RESOURCE=fossil.res
72
+RC=$(PellesCDir)\bin\porc.exe
73
+RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION)
74
+
75
+# define the special utilities files, needed to generate
76
+# the automatically generated source files
77
+UTILS=translate.exe mkindex.exe makeheaders.exe
78
+UTILS_OBJ=$(UTILS:.exe=.obj)
79
+UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c))
80
+
81
+# define the sqlite files, which need special flags on compile
82
+SQLITESRC=sqlite3.c
83
+ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
84
+SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
85
+SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
86
+
87
+# define the sqlite shell files, which need special flags on compile
88
+SQLITESHELLSRC=shell.c
89
+ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
90
+SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
91
+SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
92
+
93
+# define the th scripting files, which need special flags on compile
94
+THSRC=th.c th_lang.c
95
+ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
96
+THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
97
+
98
+# define the zlib files, needed by this compile
99
+ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
100
+ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf))
101
+ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj))
102
+
103
+# define all fossil sources, using the standard compile and
104
+# source generation. These are all files in SRCDIR, which are not
105
+# mentioned as special files above:
106
+ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c))
107
+SRC=$(subst $(SRCDIR),,$(ORIGSRC))
108
+TRANSLATEDSRC=$(SRC:.c=_.c)
109
+TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
110
+
111
+# main target file is the application
112
+APPLICATION=fossil.exe
113
+
114
+# define the standard make target
115
+.PHONY: default
116
+default: page_index.h headers $(APPLICATION)
117
+
118
+# symbolic target to generate the source generate utils
119
+.PHONY: utils
120
+utils: $(UTILS)
121
+
122
+# link utils
123
+$(UTILS) version.exe: %.exe: %.obj
124
+ $(LINK) $(LINKFLAGS) -out:"$@" $<
125
+
126
+# compiling standard fossil utils
127
+$(UTILS_OBJ): %.obj: $(SRCDIR)%.c
128
+ $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
129
+
130
+# compile special windows utils
131
+version.obj: $(WINDIR)version.c
132
+ $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
133
+
134
+# generate the translated c-source files
135
+$(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe
136
+ translate.exe $< >$@
137
+
138
+# generate the index source, containing all web references,..
139
+page_index.h: $(TRANSLATEDSRC) mkindex.exe
140
+ mkindex.exe $(TRANSLATEDSRC) >$@
141
+
142
+# extracting version info from manifest
143
+VERSION.h: version.exe ..\manifest.uuid ..\manifest
144
+ version.exe ..\manifest.uuid ..\manifest > $@
145
+
146
+# generate the simplified headers
147
+headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
148
+ makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
149
+ echo Done >$@
150
+
151
+# compile C sources with relevant options
152
+
153
+$(TRANSLATEDOBJ): %_.obj: %_.c %.h
154
+ $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
155
+
156
+$(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h
157
+ $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@"
158
+
159
+$(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c
160
+ $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@"
161
+
162
+$(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h
163
+ $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
164
+
165
+$(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
166
+ $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
167
+
168
+# create the windows resource with icon and version info
169
+$(RESOURCE): %.res: ../win/%.rc ../win/*.ico
170
+ $(RC) $(RCFLAGS) $< -Fo"$@"
171
+
172
+# link the application
173
+$(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
174
+ $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
175
+
176
+# cleanup
177
+
178
+.PHONY: clean
179
+clean:
180
+ del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
181
+ del /F $(TRANSLATEDSRC)
182
+ del /F *.h headers
183
+ del /F $(RESOURCE)
184
+
185
+.PHONY: clobber
186
+clobber: clean
187
+ del /F *.exe
188
+
202189
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -1,201 +1,188 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run
5 # "tclsh src/makemake.tcl pellesc > win/Makefile.Makefile.PellesCGMake"
6 # to regenerate this file.
7 # ###########################################################################
8 #
9 # HowTo
10 # -----
11 #
12 # This is a Makefile to compile fossil with PellesC from
13 # http://www.smorgasbordet.com/pellesc/index.htm
14 # In addition to the Compiler envrionment, you need
15 # gmake from http://sourceforge.net/projects/unxutils/, Pelles make version
16 # couldn't handle the complex dependencies in this build
17 # zlib sources
18 # Then you do
19 # 1. create a directory PellesC in the project root directory
20 # 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation
21 # 3. open a dos prompt window and change working directory into PellesC (step 1)
22 # 4. run gmake -f ..\win\Makefile.PellesCGMake
23 #
24 # this file is tested with
25 # PellesC 5.00.13
26 # gmake 3.80
27 # zlib sources 1.2.5
28 # Windows XP SP 2
29 # and
30 # PellesC 6.00.4
31 # gmake 3.80
32 # zlib sources 1.2.5
33 # Windows 7 Home Premium
34 #
35 # ###########################################################################
36
37 #
38 PellesCDir=c:\Programme\PellesC
39
40 # Select between 32/64 bit code, default is 32 bit
41 #TARGETVERSION=64
42
43 ifeq ($(TARGETVERSION),64)
44 # 64 bit version
45 TARGETMACHINE_CC=amd64
46 TARGETMACHINE_LN=amd64
47 TARGETEXTEND=64
48 else
49 # 32 bit version
50 TARGETMACHINE_CC=x86
51 TARGETMACHINE_LN=ix86
52 TARGETEXTEND=
53 endif
54
55 # define the project directories
56 B=..
57 SRCDIR=$(B)/src/
58 WINDIR=$(B)/win/
59 ZLIBSRCDIR=../../zlib/
60
61 # define linker command and options
62 LINK=$(PellesCDir)/bin/polink.exe
63 LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib Crtmt$(TARGETEXTEND).lib
64
65 # define standard C-compiler and flags, used to compile
66 # the fossil binary. Some special definitions follow for
67 # special files follow
68 CC=$(PellesCDir)\bin\pocc.exe
69 DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp -D_pgmptr=g.argv[0]
70 CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES)
71 INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR)
72
73 # define commands for building the windows resource files
74 RESOURCE=fossil.res
75 RC=$(PellesCDir)\bin\porc.exe
76 RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION)
77
78 # define the special utilities files, needed to generate
79 # the automatically generated source files
80 UTILS=translate.exe mkindex.exe makeheaders.exe
81 UTILS_OBJ=$(UTILS:.exe=.obj)
82 UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c))
83
84 # define the sqlite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
89
90 # define the sqlite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
95
96 # define the th scripting files, which need special flags on compile
97 THSRC=th.c th_lang.c
98 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
99 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100
101 # define the zlib files, needed by this compile
102 ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
103 ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf))
104 ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj))
105
106 # define all fossil sources, using the standard compile and
107 # source generation. These are all files in SRCDIR, which are not
108 # mentioned as special files above:
109 ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c))
110 SRC=$(subst $(SRCDIR),,$(ORIGSRC))
111 TRANSLATEDSRC=$(SRC:.c=_.c)
112 TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
113
114 # main target file is the application
115 APPLICATION=fossil.exe
116
117 # ###########################################################################
118 # define the standard make target
119 .PHONY: default
120 default: page_index.h headers $(APPLICATION)
121
122 # ###########################################################################
123 # symbolic target to generate the source generate utils
124 .PHONY: utils
125 utils: $(UTILS)
126
127 # link utils
128 $(UTILS) version.exe: %.exe: %.obj
129 $(LINK) $(LINKFLAGS) -out:"$@" $<
130
131 # compiling standard fossil utils
132 $(UTILS_OBJ): %.obj: $(SRCDIR)%.c
133 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
134
135 # compile special windows utils
136 version.obj: $(WINDIR)version.c
137 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
138
139 # ###########################################################################
140 # generate the translated c-source files
141 $(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe
142 translate.exe $< >$@
143
144 # ###########################################################################
145 # generate the index source, containing all web references,..
146 page_index.h: $(TRANSLATEDSRC) mkindex.exe
147 mkindex.exe $(TRANSLATEDSRC) >$@
148
149 # ###########################################################################
150 # extracting version info from manifest
151 VERSION.h: version.exe ..\manifest.uuid ..\manifest
152 version.exe ..\manifest.uuid ..\manifest > $@
153
154 # ###########################################################################
155 # generate the simplified headers
156 headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
157 makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
158 echo Done >$@
159
160 # ###########################################################################
161 # compile C sources with relevant options
162
163 $(TRANSLATEDOBJ): %_.obj: %_.c %.h
164 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
165
166 $(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h
167 $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@"
168
169 $(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c
170 $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@"
171
172 $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h
173 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
174
175 $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
176 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
177
178 # ###########################################################################
179 # create the windows resource with icon and version info
180 $(RESOURCE): %.res: ../win/%.rc ../win/*.ico
181 $(RC) $(RCFLAGS) $< -Fo"$@"
182
183 # ###########################################################################
184 # link the application
185 $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
186 $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
187
188 # ###########################################################################
189 # cleanup
190
191 .PHONY: clean
192 clean:
193 del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
194 del /F $(TRANSLATEDSRC)
195 del /F *.h headers
196 del /F $(RESOURCE)
197
198 .PHONY: clobber
199 clobber: clean
200 del /F *.exe
201
202
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -1,201 +1,188 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
5 # to regenerate this file.
6 #
7 # HowTo
8 # -----
9 #
10 # This is a Makefile to compile fossil with PellesC from
11 # http://www.smorgasbordet.com/pellesc/index.htm
12 # In addition to the Compiler envrionment, you need
13 # gmake from http://sourceforge.net/projects/unxutils/, Pelles make version
14 # couldn't handle the complex dependencies in this build
15 # zlib sources
16 # Then you do
17 # 1. create a directory PellesC in the project root directory
18 # 2. Change the variables PellesCDir/ZLIBSRCDIR to the path of your installation
19 # 3. open a dos prompt window and change working directory into PellesC (step 1)
20 # 4. run gmake -f ..\win\Makefile.PellesCGMake
21 #
22 # this file is tested with
23 # PellesC 5.00.13
24 # gmake 3.80
25 # zlib sources 1.2.5
26 # Windows XP SP 2
27 # and
28 # PellesC 6.00.4
29 # gmake 3.80
30 # zlib sources 1.2.5
31 # Windows 7 Home Premium
32 #
33
34 #
35 PellesCDir=c:\Programme\PellesC
36
37 # Select between 32/64 bit code, default is 32 bit
38 #TARGETVERSION=64
39
40 ifeq ($(TARGETVERSION),64)
41 # 64 bit version
42 TARGETMACHINE_CC=amd64
43 TARGETMACHINE_LN=amd64
44 TARGETEXTEND=64
45 else
46 # 32 bit version
47 TARGETMACHINE_CC=x86
48 TARGETMACHINE_LN=ix86
49 TARGETEXTEND=
50 endif
51
52 # define the project directories
53 B=..
54 SRCDIR=$(B)/src/
55 WINDIR=$(B)/win/
56 ZLIBSRCDIR=../../zlib/
57
58 # define linker command and options
59 LINK=$(PellesCDir)/bin/polink.exe
60 LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib Crtmt$(TARGETEXTEND).lib
61
62 # define standard C-compiler and flags, used to compile
63 # the fossil binary. Some special definitions follow for
64 # special files follow
65 CC=$(PellesCDir)\bin\pocc.exe
66 DEFINES=-DFOSSIL_I18N=0 -D_pgmptr=g.argv[0]
67 CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES)
68 INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR)
69
70 # define commands for building the windows resource files
71 RESOURCE=fossil.res
72 RC=$(PellesCDir)\bin\porc.exe
73 RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION)
74
75 # define the special utilities files, needed to generate
76 # the automatically generated source files
77 UTILS=translate.exe mkindex.exe makeheaders.exe
78 UTILS_OBJ=$(UTILS:.exe=.obj)
79 UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c))
80
81 # define the sqlite files, which need special flags on compile
82 SQLITESRC=sqlite3.c
83 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
84 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
85 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
86
87 # define the sqlite shell files, which need special flags on compile
88 SQLITESHELLSRC=shell.c
89 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
90 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
91 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
92
93 # define the th scripting files, which need special flags on compile
94 THSRC=th.c th_lang.c
95 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
96 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
97
98 # define the zlib files, needed by this compile
99 ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
100 ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf))
101 ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj))
102
103 # define all fossil sources, using the standard compile and
104 # source generation. These are all files in SRCDIR, which are not
105 # mentioned as special files above:
106 ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC) $(ORIGSQLITESHELLSRC),$(wildcard $(SRCDIR)*.c))
107 SRC=$(subst $(SRCDIR),,$(ORIGSRC))
108 TRANSLATEDSRC=$(SRC:.c=_.c)
109 TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
110
111 # main target file is the application
112 APPLICATION=fossil.exe
113
114 # define the standard make target
115 .PHONY: default
116 default: page_index.h headers $(APPLICATION)
117
118 # symbolic target to generate the source generate utils
119 .PHONY: utils
120 utils: $(UTILS)
121
122 # link utils
123 $(UTILS) version.exe: %.exe: %.obj
124 $(LINK) $(LINKFLAGS) -out:"$@" $<
125
126 # compiling standard fossil utils
127 $(UTILS_OBJ): %.obj: $(SRCDIR)%.c
128 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
129
130 # compile special windows utils
131 version.obj: $(WINDIR)version.c
132 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
133
134 # generate the translated c-source files
135 $(TRANSLATEDSRC): %_.c: $(SRCDIR)%.c translate.exe
136 translate.exe $< >$@
137
138 # generate the index source, containing all web references,..
139 page_index.h: $(TRANSLATEDSRC) mkindex.exe
140 mkindex.exe $(TRANSLATEDSRC) >$@
141
142 # extracting version info from manifest
143 VERSION.h: version.exe ..\manifest.uuid ..\manifest
144 version.exe ..\manifest.uuid ..\manifest > $@
145
146 # generate the simplified headers
147 headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
148 makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
149 echo Done >$@
150
151 # compile C sources with relevant options
152
153 $(TRANSLATEDOBJ): %_.obj: %_.c %.h
154 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
155
156 $(SQLITEOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)%.h
157 $(CC) $(CCFLAGS) $(SQLITEDEFINES) $(INCLUDE) "$<" -Fo"$@"
158
159 $(SQLITESHELLOBJ): %.obj: $(SRCDIR)%.c
160 $(CC) $(CCFLAGS) $(SQLITESHELLDEFINES) $(INCLUDE) "$<" -Fo"$@"
161
162 $(THOBJ): %.obj: $(SRCDIR)%.c $(SRCDIR)th.h
163 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
164
165 $(ZLIBOBJ): %.obj: $(ZLIBSRCDIR)%.c
166 $(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
167
168 # create the windows resource with icon and version info
169 $(RESOURCE): %.res: ../win/%.rc ../win/*.ico
170 $(RC) $(RCFLAGS) $< -Fo"$@"
171
172 # link the application
173 $(APPLICATION): $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
174 $(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(SQLITESHELLOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
175
176 # cleanup
177
178 .PHONY: clean
179 clean:
180 del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
181 del /F $(TRANSLATEDSRC)
182 del /F *.h headers
183 del /F $(RESOURCE)
184
185 .PHONY: clobber
186 clobber: clean
187 del /F *.exe
188
 
 
 
 
 
 
 
 
 
 
 
 
 
189
+33 -15
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -1,10 +1,9 @@
11
# DO NOT EDIT
22
#
33
# This file is automatically generated. Instead of editing this
4
-# file, edit "makemake.tcl" then run
5
-# "tclsh src/makemake.tcl dmc > win/Makefile.dmc"
4
+# file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
65
# to regenerate this file.
76
B = ..
87
SRCDIR = $B\src
98
OBJDIR = .
109
O = .obj
@@ -16,42 +15,46 @@
1615
INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(DMDIR)\extra\include
1716
1817
#SSL = -DFOSSIL_ENABLE_SSL=1
1918
SSL =
2019
21
-DMCDEF = -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp
2220
I18N = -DFOSSIL_I18N=0
2321
2422
CFLAGS = -o
2523
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
2624
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
2725
LIBS = $(DMDIR)\extra\lib\ zlib wsock32
2826
29
-SRC = add_.c allrepo_.c attach_.c bag_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c info_.c import_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
27
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
3028
31
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\shell$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
29
+OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
30
+
3231
3332
RC=$(DMDIR)\bin\rcc
3433
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
3534
3635
APPNAME = $(OBJDIR)\fossil$(E)
3736
3837
all: $(APPNAME)
3938
40
-$(APPNAME) : translate$E mkindex$E headers fossil.res $(OBJ) $(OBJDIR)\link
39
+$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link
4140
cd $(OBJDIR)
4241
$(DMDIR)\bin\link @link
4342
4443
fossil.res: $B\win\fossil.rc
4544
$(RC) $(RCFLAGS) -o$@ $**
4645
4746
$(OBJDIR)\link: $B\win\Makefile.dmc
48
- +echo add allrepo attach bag blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 shell th th_lang > $@
47
+ +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip shell sqlcmd sqlite3 th th_lang > $@
4948
+echo fossil >> $@
5049
+echo fossil >> $@
5150
+echo $(LIBS) >> $@
51
+
52
+
5253
+echo. >> $@
54
+
55
+
5356
+echo fossil >> $@
5457
5558
5659
5760
translate$E: $(SRCDIR)\translate.c
@@ -65,11 +68,14 @@
6568
6669
version$E: $B\win\version.c
6770
$(BCC) -o$@ $**
6871
6972
$(OBJDIR)\shell$O : $(SRCDIR)\shell.c
70
- $(TCC) -o$@ -c -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 $**
73
+ $(TCC) -o$@ -c -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
74
+
75
+$(OBJDIR)\sqlcmd$O : $(SRCDIR)\sqlcmd.c
76
+ $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
7177
7278
$(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
7379
$(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
7480
7581
$(OBJDIR)\th$O : $(SRCDIR)\th.c
@@ -113,10 +119,16 @@
113119
$(OBJDIR)\bag$O : bag_.c bag.h
114120
$(TCC) -o$@ -c bag_.c
115121
116122
bag_.c : $(SRCDIR)\bag.c
117123
+translate$E $** > $@
124
+
125
+$(OBJDIR)\bisect$O : bisect_.c bisect.h
126
+ $(TCC) -o$@ -c bisect_.c
127
+
128
+bisect_.c : $(SRCDIR)\bisect.c
129
+ +translate$E $** > $@
118130
119131
$(OBJDIR)\blob$O : blob_.c blob.h
120132
$(TCC) -o$@ -c blob_.c
121133
122134
blob_.c : $(SRCDIR)\blob.c
@@ -227,10 +239,16 @@
227239
$(OBJDIR)\doc$O : doc_.c doc.h
228240
$(TCC) -o$@ -c doc_.c
229241
230242
doc_.c : $(SRCDIR)\doc.c
231243
+translate$E $** > $@
244
+
245
+$(OBJDIR)\encode$O : encode_.c encode.h
246
+ $(TCC) -o$@ -c encode_.c
247
+
248
+encode_.c : $(SRCDIR)\encode.c
249
+ +translate$E $** > $@
232250
233251
$(OBJDIR)\event$O : event_.c event.h
234252
$(TCC) -o$@ -c event_.c
235253
236254
event_.c : $(SRCDIR)\event.c
@@ -240,16 +258,10 @@
240258
$(TCC) -o$@ -c export_.c
241259
242260
export_.c : $(SRCDIR)\export.c
243261
+translate$E $** > $@
244262
245
-$(OBJDIR)\encode$O : encode_.c encode.h
246
- $(TCC) -o$@ -c encode_.c
247
-
248
-encode_.c : $(SRCDIR)\encode.c
249
- +translate$E $** > $@
250
-
251263
$(OBJDIR)\file$O : file_.c file.h
252264
$(TCC) -o$@ -c file_.c
253265
254266
file_.c : $(SRCDIR)\file.c
255267
+translate$E $** > $@
@@ -425,10 +437,16 @@
425437
$(OBJDIR)\sqlcmd$O : sqlcmd_.c sqlcmd.h
426438
$(TCC) -o$@ -c sqlcmd_.c
427439
428440
sqlcmd_.c : $(SRCDIR)\sqlcmd.c
429441
+translate$E $** > $@
442
+
443
+$(OBJDIR)\stash$O : stash_.c stash.h
444
+ $(TCC) -o$@ -c stash_.c
445
+
446
+stash_.c : $(SRCDIR)\stash.c
447
+ +translate$E $** > $@
430448
431449
$(OBJDIR)\stat$O : stat_.c stat.h
432450
$(TCC) -o$@ -c stat_.c
433451
434452
stat_.c : $(SRCDIR)\stat.c
@@ -541,7 +559,7 @@
541559
542560
zip_.c : $(SRCDIR)\zip.c
543561
+translate$E $** > $@
544562
545563
headers: makeheaders$E page_index.h VERSION.h
546
- +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
564
+ +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
547565
@copy /Y nul: headers
548566
549567
ADDED win/Makefile.mingw
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -1,10 +1,9 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run
5 # "tclsh src/makemake.tcl dmc > win/Makefile.dmc"
6 # to regenerate this file.
7 B = ..
8 SRCDIR = $B\src
9 OBJDIR = .
10 O = .obj
@@ -16,42 +15,46 @@
16 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(DMDIR)\extra\include
17
18 #SSL = -DFOSSIL_ENABLE_SSL=1
19 SSL =
20
21 DMCDEF = -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp
22 I18N = -DFOSSIL_I18N=0
23
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32
28
29 SRC = add_.c allrepo_.c attach_.c bag_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c info_.c import_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
30
31 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\shell$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
 
32
33 RC=$(DMDIR)\bin\rcc
34 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
35
36 APPNAME = $(OBJDIR)\fossil$(E)
37
38 all: $(APPNAME)
39
40 $(APPNAME) : translate$E mkindex$E headers fossil.res $(OBJ) $(OBJDIR)\link
41 cd $(OBJDIR)
42 $(DMDIR)\bin\link @link
43
44 fossil.res: $B\win\fossil.rc
45 $(RC) $(RCFLAGS) -o$@ $**
46
47 $(OBJDIR)\link: $B\win\Makefile.dmc
48 +echo add allrepo attach bag blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 shell th th_lang > $@
49 +echo fossil >> $@
50 +echo fossil >> $@
51 +echo $(LIBS) >> $@
 
 
52 +echo. >> $@
 
 
53 +echo fossil >> $@
54
55
56
57 translate$E: $(SRCDIR)\translate.c
@@ -65,11 +68,14 @@
65
66 version$E: $B\win\version.c
67 $(BCC) -o$@ $**
68
69 $(OBJDIR)\shell$O : $(SRCDIR)\shell.c
70 $(TCC) -o$@ -c -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 $**
 
 
 
71
72 $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
73 $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
74
75 $(OBJDIR)\th$O : $(SRCDIR)\th.c
@@ -113,10 +119,16 @@
113 $(OBJDIR)\bag$O : bag_.c bag.h
114 $(TCC) -o$@ -c bag_.c
115
116 bag_.c : $(SRCDIR)\bag.c
117 +translate$E $** > $@
 
 
 
 
 
 
118
119 $(OBJDIR)\blob$O : blob_.c blob.h
120 $(TCC) -o$@ -c blob_.c
121
122 blob_.c : $(SRCDIR)\blob.c
@@ -227,10 +239,16 @@
227 $(OBJDIR)\doc$O : doc_.c doc.h
228 $(TCC) -o$@ -c doc_.c
229
230 doc_.c : $(SRCDIR)\doc.c
231 +translate$E $** > $@
 
 
 
 
 
 
232
233 $(OBJDIR)\event$O : event_.c event.h
234 $(TCC) -o$@ -c event_.c
235
236 event_.c : $(SRCDIR)\event.c
@@ -240,16 +258,10 @@
240 $(TCC) -o$@ -c export_.c
241
242 export_.c : $(SRCDIR)\export.c
243 +translate$E $** > $@
244
245 $(OBJDIR)\encode$O : encode_.c encode.h
246 $(TCC) -o$@ -c encode_.c
247
248 encode_.c : $(SRCDIR)\encode.c
249 +translate$E $** > $@
250
251 $(OBJDIR)\file$O : file_.c file.h
252 $(TCC) -o$@ -c file_.c
253
254 file_.c : $(SRCDIR)\file.c
255 +translate$E $** > $@
@@ -425,10 +437,16 @@
425 $(OBJDIR)\sqlcmd$O : sqlcmd_.c sqlcmd.h
426 $(TCC) -o$@ -c sqlcmd_.c
427
428 sqlcmd_.c : $(SRCDIR)\sqlcmd.c
429 +translate$E $** > $@
 
 
 
 
 
 
430
431 $(OBJDIR)\stat$O : stat_.c stat.h
432 $(TCC) -o$@ -c stat_.c
433
434 stat_.c : $(SRCDIR)\stat.c
@@ -541,7 +559,7 @@
541
542 zip_.c : $(SRCDIR)\zip.c
543 +translate$E $** > $@
544
545 headers: makeheaders$E page_index.h VERSION.h
546 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
547 @copy /Y nul: headers
548
549 DDED win/Makefile.mingw
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -1,10 +1,9 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
 
5 # to regenerate this file.
6 B = ..
7 SRCDIR = $B\src
8 OBJDIR = .
9 O = .obj
@@ -16,42 +15,46 @@
15 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(DMDIR)\extra\include
16
17 #SSL = -DFOSSIL_ENABLE_SSL=1
18 SSL =
19
 
20 I18N = -DFOSSIL_I18N=0
21
22 CFLAGS = -o
23 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
24 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
25 LIBS = $(DMDIR)\extra\lib\ zlib wsock32
26
27 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
28
29 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
30
31
32 RC=$(DMDIR)\bin\rcc
33 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
34
35 APPNAME = $(OBJDIR)\fossil$(E)
36
37 all: $(APPNAME)
38
39 $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link
40 cd $(OBJDIR)
41 $(DMDIR)\bin\link @link
42
43 fossil.res: $B\win\fossil.rc
44 $(RC) $(RCFLAGS) -o$@ $**
45
46 $(OBJDIR)\link: $B\win\Makefile.dmc
47 +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip shell sqlcmd sqlite3 th th_lang > $@
48 +echo fossil >> $@
49 +echo fossil >> $@
50 +echo $(LIBS) >> $@
51
52
53 +echo. >> $@
54
55
56 +echo fossil >> $@
57
58
59
60 translate$E: $(SRCDIR)\translate.c
@@ -65,11 +68,14 @@
68
69 version$E: $B\win\version.c
70 $(BCC) -o$@ $**
71
72 $(OBJDIR)\shell$O : $(SRCDIR)\shell.c
73 $(TCC) -o$@ -c -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
74
75 $(OBJDIR)\sqlcmd$O : $(SRCDIR)\sqlcmd.c
76 $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
77
78 $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
79 $(TCC) -o$@ -c -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 $**
80
81 $(OBJDIR)\th$O : $(SRCDIR)\th.c
@@ -113,10 +119,16 @@
119 $(OBJDIR)\bag$O : bag_.c bag.h
120 $(TCC) -o$@ -c bag_.c
121
122 bag_.c : $(SRCDIR)\bag.c
123 +translate$E $** > $@
124
125 $(OBJDIR)\bisect$O : bisect_.c bisect.h
126 $(TCC) -o$@ -c bisect_.c
127
128 bisect_.c : $(SRCDIR)\bisect.c
129 +translate$E $** > $@
130
131 $(OBJDIR)\blob$O : blob_.c blob.h
132 $(TCC) -o$@ -c blob_.c
133
134 blob_.c : $(SRCDIR)\blob.c
@@ -227,10 +239,16 @@
239 $(OBJDIR)\doc$O : doc_.c doc.h
240 $(TCC) -o$@ -c doc_.c
241
242 doc_.c : $(SRCDIR)\doc.c
243 +translate$E $** > $@
244
245 $(OBJDIR)\encode$O : encode_.c encode.h
246 $(TCC) -o$@ -c encode_.c
247
248 encode_.c : $(SRCDIR)\encode.c
249 +translate$E $** > $@
250
251 $(OBJDIR)\event$O : event_.c event.h
252 $(TCC) -o$@ -c event_.c
253
254 event_.c : $(SRCDIR)\event.c
@@ -240,16 +258,10 @@
258 $(TCC) -o$@ -c export_.c
259
260 export_.c : $(SRCDIR)\export.c
261 +translate$E $** > $@
262
 
 
 
 
 
 
263 $(OBJDIR)\file$O : file_.c file.h
264 $(TCC) -o$@ -c file_.c
265
266 file_.c : $(SRCDIR)\file.c
267 +translate$E $** > $@
@@ -425,10 +437,16 @@
437 $(OBJDIR)\sqlcmd$O : sqlcmd_.c sqlcmd.h
438 $(TCC) -o$@ -c sqlcmd_.c
439
440 sqlcmd_.c : $(SRCDIR)\sqlcmd.c
441 +translate$E $** > $@
442
443 $(OBJDIR)\stash$O : stash_.c stash.h
444 $(TCC) -o$@ -c stash_.c
445
446 stash_.c : $(SRCDIR)\stash.c
447 +translate$E $** > $@
448
449 $(OBJDIR)\stat$O : stat_.c stat.h
450 $(TCC) -o$@ -c stat_.c
451
452 stat_.c : $(SRCDIR)\stat.c
@@ -541,7 +559,7 @@
559
560 zip_.c : $(SRCDIR)\zip.c
561 +translate$E $** > $@
562
563 headers: makeheaders$E page_index.h VERSION.h
564 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
565 @copy /Y nul: headers
566
567 DDED win/Makefile.mingw
--- a/win/Makefile.mingw
+++ b/win/Makefile.mingw
@@ -0,0 +1,5 @@
1
+wikiO@8_httphttphttphttpDcrypto -lssl
2
+endif
3
+ogmaogogin_.c:wikiO@8_httphttph/mingw/lib -I/mingwclean:
4
+ del $(OBJDIR)/*
5
+ del
--- a/win/Makefile.mingw
+++ b/win/Makefile.mingw
@@ -0,0 +1,5 @@
 
 
 
 
 
--- a/win/Makefile.mingw
+++ b/win/Makefile.mingw
@@ -0,0 +1,5 @@
1 wikiO@8_httphttphttphttpDcrypto -lssl
2 endif
3 ogmaogogin_.c:wikiO@8_httphttph/mingw/lib -I/mingwclean:
4 del $(OBJDIR)/*
5 del
+41 -7
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -1,10 +1,9 @@
11
# DO NOT EDIT
22
#
33
# This file is automatically generated. Instead of editing this
4
-# file, edit "makemake.tcl" then run
5
-# "tclsh src/makemake.tcl msc > win/Makefile.msc"
4
+# file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
65
# to regenerate this file.
76
B = ..
87
SRCDIR = $B\src
98
OBJDIR = .
109
O = .obj
@@ -28,22 +27,21 @@
2827
ZLIBDIR = $(MSCDIR)\extra\lib
2928
ZLIB = zlib.lib
3029
3130
INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(MSCDIR)\extra\include -I$(ZINCDIR)
3231
33
-MSCDEF = -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp
3432
I18N = -DFOSSIL_I18N=0
3533
3634
CFLAGS = -nologo -MT -O2
3735
BCC = $(CC) $(CFLAGS)
3836
TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
3937
LIBS = $(ZLIB) ws2_32.lib $(SSLLIB)
4038
LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
4139
42
-SRC = add_.c allrepo_.c attach_.c bag_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
40
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
4341
44
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
42
+OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
4543
4644
4745
APPNAME = $(OBJDIR)\fossil$(E)
4846
4947
all: $(OBJDIR) $(APPNAME)
@@ -51,11 +49,11 @@
5149
$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\linkopts
5250
cd $(OBJDIR)
5351
link -LINK -OUT:$@ $(LIBDIR) @linkopts
5452
5553
$(OBJDIR)\linkopts: $B\win\Makefile.msc
56
- echo add allrepo attach bag blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode file finfo graph http http_socket http_ssl http_transport info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
54
+ echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
5755
echo $(LIBS) >> $@
5856
5957
6058
6159
@@ -119,10 +117,16 @@
119117
$(OBJDIR)\bag$O : bag_.c bag.h
120118
$(TCC) /Fo$@ -c bag_.c
121119
122120
bag_.c : $(SRCDIR)\bag.c
123121
translate$E $** > $@
122
+
123
+$(OBJDIR)\bisect$O : bisect_.c bisect.h
124
+ $(TCC) /Fo$@ -c bisect_.c
125
+
126
+bisect_.c : $(SRCDIR)\bisect.c
127
+ translate$E $** > $@
124128
125129
$(OBJDIR)\blob$O : blob_.c blob.h
126130
$(TCC) /Fo$@ -c blob_.c
127131
128132
blob_.c : $(SRCDIR)\blob.c
@@ -239,10 +243,22 @@
239243
$(OBJDIR)\encode$O : encode_.c encode.h
240244
$(TCC) /Fo$@ -c encode_.c
241245
242246
encode_.c : $(SRCDIR)\encode.c
243247
translate$E $** > $@
248
+
249
+$(OBJDIR)\event$O : event_.c event.h
250
+ $(TCC) /Fo$@ -c event_.c
251
+
252
+event_.c : $(SRCDIR)\event.c
253
+ translate$E $** > $@
254
+
255
+$(OBJDIR)\export$O : export_.c export.h
256
+ $(TCC) /Fo$@ -c export_.c
257
+
258
+export_.c : $(SRCDIR)\export.c
259
+ translate$E $** > $@
244260
245261
$(OBJDIR)\file$O : file_.c file.h
246262
$(TCC) /Fo$@ -c file_.c
247263
248264
file_.c : $(SRCDIR)\file.c
@@ -281,10 +297,16 @@
281297
$(OBJDIR)\http_transport$O : http_transport_.c http_transport.h
282298
$(TCC) /Fo$@ -c http_transport_.c
283299
284300
http_transport_.c : $(SRCDIR)\http_transport.c
285301
translate$E $** > $@
302
+
303
+$(OBJDIR)\import$O : import_.c import.h
304
+ $(TCC) /Fo$@ -c import_.c
305
+
306
+import_.c : $(SRCDIR)\import.c
307
+ translate$E $** > $@
286308
287309
$(OBJDIR)\info$O : info_.c info.h
288310
$(TCC) /Fo$@ -c info_.c
289311
290312
info_.c : $(SRCDIR)\info.c
@@ -407,10 +429,22 @@
407429
$(OBJDIR)\skins$O : skins_.c skins.h
408430
$(TCC) /Fo$@ -c skins_.c
409431
410432
skins_.c : $(SRCDIR)\skins.c
411433
translate$E $** > $@
434
+
435
+$(OBJDIR)\sqlcmd$O : sqlcmd_.c sqlcmd.h
436
+ $(TCC) /Fo$@ -c sqlcmd_.c
437
+
438
+sqlcmd_.c : $(SRCDIR)\sqlcmd.c
439
+ translate$E $** > $@
440
+
441
+$(OBJDIR)\stash$O : stash_.c stash.h
442
+ $(TCC) /Fo$@ -c stash_.c
443
+
444
+stash_.c : $(SRCDIR)\stash.c
445
+ translate$E $** > $@
412446
413447
$(OBJDIR)\stat$O : stat_.c stat.h
414448
$(TCC) /Fo$@ -c stat_.c
415449
416450
stat_.c : $(SRCDIR)\stat.c
@@ -523,7 +557,7 @@
523557
524558
zip_.c : $(SRCDIR)\zip.c
525559
translate$E $** > $@
526560
527561
headers: makeheaders$E page_index.h VERSION.h
528
- makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
562
+ makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
529563
@copy /Y nul: headers
530564
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -1,10 +1,9 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run
5 # "tclsh src/makemake.tcl msc > win/Makefile.msc"
6 # to regenerate this file.
7 B = ..
8 SRCDIR = $B\src
9 OBJDIR = .
10 O = .obj
@@ -28,22 +27,21 @@
28 ZLIBDIR = $(MSCDIR)\extra\lib
29 ZLIB = zlib.lib
30
31 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(MSCDIR)\extra\include -I$(ZINCDIR)
32
33 MSCDEF = -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp
34 I18N = -DFOSSIL_I18N=0
35
36 CFLAGS = -nologo -MT -O2
37 BCC = $(CC) $(CFLAGS)
38 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
39 LIBS = $(ZLIB) ws2_32.lib $(SSLLIB)
40 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
41
42 SRC = add_.c allrepo_.c attach_.c bag_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
43
44 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
45
46
47 APPNAME = $(OBJDIR)\fossil$(E)
48
49 all: $(OBJDIR) $(APPNAME)
@@ -51,11 +49,11 @@
51 $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\linkopts
52 cd $(OBJDIR)
53 link -LINK -OUT:$@ $(LIBDIR) @linkopts
54
55 $(OBJDIR)\linkopts: $B\win\Makefile.msc
56 echo add allrepo attach bag blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode file finfo graph http http_socket http_ssl http_transport info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
57 echo $(LIBS) >> $@
58
59
60
61
@@ -119,10 +117,16 @@
119 $(OBJDIR)\bag$O : bag_.c bag.h
120 $(TCC) /Fo$@ -c bag_.c
121
122 bag_.c : $(SRCDIR)\bag.c
123 translate$E $** > $@
 
 
 
 
 
 
124
125 $(OBJDIR)\blob$O : blob_.c blob.h
126 $(TCC) /Fo$@ -c blob_.c
127
128 blob_.c : $(SRCDIR)\blob.c
@@ -239,10 +243,22 @@
239 $(OBJDIR)\encode$O : encode_.c encode.h
240 $(TCC) /Fo$@ -c encode_.c
241
242 encode_.c : $(SRCDIR)\encode.c
243 translate$E $** > $@
 
 
 
 
 
 
 
 
 
 
 
 
244
245 $(OBJDIR)\file$O : file_.c file.h
246 $(TCC) /Fo$@ -c file_.c
247
248 file_.c : $(SRCDIR)\file.c
@@ -281,10 +297,16 @@
281 $(OBJDIR)\http_transport$O : http_transport_.c http_transport.h
282 $(TCC) /Fo$@ -c http_transport_.c
283
284 http_transport_.c : $(SRCDIR)\http_transport.c
285 translate$E $** > $@
 
 
 
 
 
 
286
287 $(OBJDIR)\info$O : info_.c info.h
288 $(TCC) /Fo$@ -c info_.c
289
290 info_.c : $(SRCDIR)\info.c
@@ -407,10 +429,22 @@
407 $(OBJDIR)\skins$O : skins_.c skins.h
408 $(TCC) /Fo$@ -c skins_.c
409
410 skins_.c : $(SRCDIR)\skins.c
411 translate$E $** > $@
 
 
 
 
 
 
 
 
 
 
 
 
412
413 $(OBJDIR)\stat$O : stat_.c stat.h
414 $(TCC) /Fo$@ -c stat_.c
415
416 stat_.c : $(SRCDIR)\stat.c
@@ -523,7 +557,7 @@
523
524 zip_.c : $(SRCDIR)\zip.c
525 translate$E $** > $@
526
527 headers: makeheaders$E page_index.h VERSION.h
528 makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
529 @copy /Y nul: headers
530
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -1,10 +1,9 @@
1 # DO NOT EDIT
2 #
3 # This file is automatically generated. Instead of editing this
4 # file, edit "makemake.tcl" then run "tclsh src/makemake.tcl"
 
5 # to regenerate this file.
6 B = ..
7 SRCDIR = $B\src
8 OBJDIR = .
9 O = .obj
@@ -28,22 +27,21 @@
27 ZLIBDIR = $(MSCDIR)\extra\lib
28 ZLIB = zlib.lib
29
30 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(MSCDIR)\extra\include -I$(ZINCDIR)
31
 
32 I18N = -DFOSSIL_I18N=0
33
34 CFLAGS = -nologo -MT -O2
35 BCC = $(CC) $(CFLAGS)
36 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
37 LIBS = $(ZLIB) ws2_32.lib $(SSLLIB)
38 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
39
40 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c
41
42 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
43
44
45 APPNAME = $(OBJDIR)\fossil$(E)
46
47 all: $(OBJDIR) $(APPNAME)
@@ -51,11 +49,11 @@
49 $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\linkopts
50 cd $(OBJDIR)
51 link -LINK -OUT:$@ $(LIBDIR) @linkopts
52
53 $(OBJDIR)\linkopts: $B\win\Makefile.msc
54 echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
55 echo $(LIBS) >> $@
56
57
58
59
@@ -119,10 +117,16 @@
117 $(OBJDIR)\bag$O : bag_.c bag.h
118 $(TCC) /Fo$@ -c bag_.c
119
120 bag_.c : $(SRCDIR)\bag.c
121 translate$E $** > $@
122
123 $(OBJDIR)\bisect$O : bisect_.c bisect.h
124 $(TCC) /Fo$@ -c bisect_.c
125
126 bisect_.c : $(SRCDIR)\bisect.c
127 translate$E $** > $@
128
129 $(OBJDIR)\blob$O : blob_.c blob.h
130 $(TCC) /Fo$@ -c blob_.c
131
132 blob_.c : $(SRCDIR)\blob.c
@@ -239,10 +243,22 @@
243 $(OBJDIR)\encode$O : encode_.c encode.h
244 $(TCC) /Fo$@ -c encode_.c
245
246 encode_.c : $(SRCDIR)\encode.c
247 translate$E $** > $@
248
249 $(OBJDIR)\event$O : event_.c event.h
250 $(TCC) /Fo$@ -c event_.c
251
252 event_.c : $(SRCDIR)\event.c
253 translate$E $** > $@
254
255 $(OBJDIR)\export$O : export_.c export.h
256 $(TCC) /Fo$@ -c export_.c
257
258 export_.c : $(SRCDIR)\export.c
259 translate$E $** > $@
260
261 $(OBJDIR)\file$O : file_.c file.h
262 $(TCC) /Fo$@ -c file_.c
263
264 file_.c : $(SRCDIR)\file.c
@@ -281,10 +297,16 @@
297 $(OBJDIR)\http_transport$O : http_transport_.c http_transport.h
298 $(TCC) /Fo$@ -c http_transport_.c
299
300 http_transport_.c : $(SRCDIR)\http_transport.c
301 translate$E $** > $@
302
303 $(OBJDIR)\import$O : import_.c import.h
304 $(TCC) /Fo$@ -c import_.c
305
306 import_.c : $(SRCDIR)\import.c
307 translate$E $** > $@
308
309 $(OBJDIR)\info$O : info_.c info.h
310 $(TCC) /Fo$@ -c info_.c
311
312 info_.c : $(SRCDIR)\info.c
@@ -407,10 +429,22 @@
429 $(OBJDIR)\skins$O : skins_.c skins.h
430 $(TCC) /Fo$@ -c skins_.c
431
432 skins_.c : $(SRCDIR)\skins.c
433 translate$E $** > $@
434
435 $(OBJDIR)\sqlcmd$O : sqlcmd_.c sqlcmd.h
436 $(TCC) /Fo$@ -c sqlcmd_.c
437
438 sqlcmd_.c : $(SRCDIR)\sqlcmd.c
439 translate$E $** > $@
440
441 $(OBJDIR)\stash$O : stash_.c stash.h
442 $(TCC) /Fo$@ -c stash_.c
443
444 stash_.c : $(SRCDIR)\stash.c
445 translate$E $** > $@
446
447 $(OBJDIR)\stat$O : stat_.c stat.h
448 $(TCC) /Fo$@ -c stat_.c
449
450 stat_.c : $(SRCDIR)\stat.c
@@ -523,7 +557,7 @@
557
558 zip_.c : $(SRCDIR)\zip.c
559 translate$E $** > $@
560
561 headers: makeheaders$E page_index.h VERSION.h
562 makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
563 @copy /Y nul: headers
564
--- win/version.c
+++ win/version.c
@@ -1,5 +1,10 @@
1
+/*
2
+** This C program exists to do the job that AWK would do for the unix
3
+** makefile - to extract information from the "mainfest" and "manifest.uuid"
4
+** files for this project in order to generate the "VERSION.h" header file.
5
+*/
16
#include <stdio.h>
27
38
int main(int argc, char *argv[]){
49
FILE *m,*u;
510
char b[10240];
611
--- win/version.c
+++ win/version.c
@@ -1,5 +1,10 @@
 
 
 
 
 
1 #include <stdio.h>
2
3 int main(int argc, char *argv[]){
4 FILE *m,*u;
5 char b[10240];
6
--- win/version.c
+++ win/version.c
@@ -1,5 +1,10 @@
1 /*
2 ** This C program exists to do the job that AWK would do for the unix
3 ** makefile - to extract information from the "mainfest" and "manifest.uuid"
4 ** files for this project in order to generate the "VERSION.h" header file.
5 */
6 #include <stdio.h>
7
8 int main(int argc, char *argv[]){
9 FILE *m,*u;
10 char b[10240];
11

Keyboard Shortcuts

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