Artifact 01afc2365c963d2bbb5dd5d3b144a3fe717c2811:
File
Makefile.w32
part of check-in
[b54de50ac5]
- Update for making mycfg.exe.
WARNING: This is an incompatible change. Do not use this branch
of development to build a copy of fossil that needs to interoperate with
official releases.
by
urmil on
2008-11-03 09:55:46.
0000: 23 21 2f 75 73 72 2f 62 69 6e 2f 6d 61 6b 65 0a #!/usr/bin/make.
0010: 23 0a 23 23 23 23 20 54 68 65 20 74 6f 70 6c 65 #.#### The tople
0020: 76 65 6c 20 64 69 72 65 63 74 6f 72 79 20 6f 66 vel directory of
0030: 20 74 68 65 20 73 6f 75 72 63 65 20 74 72 65 65 the source tree
0040: 2e 20 20 46 6f 73 73 69 6c 20 63 61 6e 20 62 65 . Fossil can be
0050: 20 62 75 69 6c 74 0a 23 20 20 20 20 69 6e 20 61 built.# in a
0060: 20 64 69 72 65 63 74 6f 72 79 20 74 68 61 74 20 directory that
0070: 69 73 20 73 65 70 61 72 61 74 65 20 66 72 6f 6d is separate from
0080: 20 74 68 65 20 73 6f 75 72 63 65 20 74 72 65 65 the source tree
0090: 2e 20 20 4a 75 73 74 20 63 68 61 6e 67 65 0a 23 . Just change.#
00a0: 20 20 20 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e the followin
00b0: 67 20 74 6f 20 70 6f 69 6e 74 20 66 72 6f 6d 20 g to point from
00c0: 74 68 65 20 62 75 69 6c 64 20 64 69 72 65 63 74 the build direct
00d0: 6f 72 79 20 74 6f 20 74 68 65 20 73 72 63 2f 20 ory to the src/
00e0: 66 6f 6c 64 65 72 2e 0a 23 0a 53 52 43 44 49 52 folder..#.SRCDIR
00f0: 20 3d 20 73 72 63 0a 0a 23 23 23 23 20 43 20 43 = src..#### C C
0100: 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6f 70 74 69 ompiler and opti
0110: 6f 6e 73 20 66 6f 72 20 75 73 65 20 69 6e 20 62 ons for use in b
0120: 75 69 6c 64 69 6e 67 20 65 78 65 63 75 74 61 62 uilding executab
0130: 6c 65 73 20 74 68 61 74 0a 23 20 20 20 20 77 69 les that.# wi
0140: 6c 6c 20 72 75 6e 20 6f 6e 20 74 68 65 20 70 6c ll run on the pl
0150: 61 74 66 6f 72 6d 20 74 68 61 74 20 69 73 20 64 atform that is d
0160: 6f 69 6e 67 20 74 68 65 20 62 75 69 6c 64 2e 20 oing the build.
0170: 20 54 68 69 73 20 69 73 20 75 73 65 64 0a 23 20 This is used.#
0180: 20 20 20 74 6f 20 63 6f 6d 70 69 6c 65 20 63 6f to compile co
0190: 64 65 2d 67 65 6e 65 72 61 74 6f 72 20 70 72 6f de-generator pro
01a0: 67 72 61 6d 73 20 61 73 20 70 61 72 74 20 6f 66 grams as part of
01b0: 20 74 68 65 20 62 75 69 6c 64 20 70 72 6f 63 65 the build proce
01c0: 73 73 2e 0a 23 20 20 20 20 53 65 65 20 54 43 43 ss..# See TCC
01d0: 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 43 below for the C
01e0: 20 63 6f 6d 70 69 6c 65 72 20 66 6f 72 20 62 75 compiler for bu
01f0: 69 6c 64 69 6e 67 20 74 68 65 20 66 69 6e 69 73 ilding the finis
0200: 68 65 64 20 62 69 6e 61 72 79 2e 0a 23 0a 42 43 hed binary..#.BC
0210: 43 20 3d 20 67 63 63 20 2d 67 20 2d 4f 32 0a 0a C = gcc -g -O2..
0220: 23 23 23 23 20 54 68 65 20 73 75 66 66 69 78 20 #### The suffix
0230: 74 6f 20 61 64 64 20 74 6f 20 65 78 65 63 75 74 to add to execut
0240: 61 62 6c 65 20 66 69 6c 65 73 2e 20 20 22 2e 65 able files. ".e
0250: 78 65 22 20 66 6f 72 20 77 69 6e 64 6f 77 73 2e xe" for windows.
0260: 0a 23 20 20 20 20 4e 6f 74 68 69 6e 67 20 66 6f .# Nothing fo
0270: 72 20 75 6e 69 78 2e 0a 23 0a 45 20 3d 20 2e 65 r unix..#.E = .e
0280: 78 65 0a 0a 23 23 23 23 20 43 20 43 6f 6d 70 69 xe..#### C Compi
0290: 6c 65 20 61 6e 64 20 6f 70 74 69 6f 6e 73 20 66 le and options f
02a0: 6f 72 20 75 73 65 20 69 6e 20 62 75 69 6c 64 69 or use in buildi
02b0: 6e 67 20 65 78 65 63 75 74 61 62 6c 65 73 20 74 ng executables t
02c0: 68 61 74 20 0a 23 20 20 20 20 77 69 6c 6c 20 72 hat .# will r
02d0: 75 6e 20 6f 6e 20 74 68 65 20 74 61 72 67 65 74 un on the target
02e0: 20 70 6c 61 74 66 6f 72 6d 2e 20 20 54 68 69 73 platform. This
02f0: 20 69 73 20 75 73 75 61 6c 6c 79 20 74 68 65 20 is usually the
0300: 73 61 6d 65 0a 23 20 20 20 20 61 73 20 42 43 43 same.# as BCC
0310: 2c 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 72 65 , unless you are
0320: 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 cross-compiling
0330: 2e 20 20 54 68 69 73 20 43 20 63 6f 6d 70 69 6c . This C compil
0340: 65 72 20 62 75 69 6c 64 73 0a 23 20 20 20 20 74 er builds.# t
0350: 68 65 20 66 69 6e 69 73 68 65 64 20 62 69 6e 61 he finished bina
0360: 72 79 20 66 6f 72 20 66 6f 73 73 69 6c 2e 20 20 ry for fossil.
0370: 54 68 65 20 42 43 43 20 63 6f 6d 70 69 6c 65 72 The BCC compiler
0380: 20 61 62 6f 76 65 20 69 73 20 75 73 65 64 0a 23 above is used.#
0390: 20 20 20 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 for building
03a0: 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 63 6f intermediate co
03b0: 64 65 2d 67 65 6e 65 72 61 74 6f 72 20 74 6f 6f de-generator too
03c0: 6c 73 2e 0a 23 0a 23 54 43 43 20 3d 20 67 63 63 ls..#.#TCC = gcc
03d0: 20 2d 4f 36 0a 23 54 43 43 20 3d 20 67 63 63 20 -O6.#TCC = gcc
03e0: 2d 67 20 2d 4f 30 20 2d 57 61 6c 6c 20 2d 66 70 -g -O0 -Wall -fp
03f0: 72 6f 66 69 6c 65 2d 61 72 63 73 20 2d 66 74 65 rofile-arcs -fte
0400: 73 74 2d 63 6f 76 65 72 61 67 65 0a 23 54 43 43 st-coverage.#TCC
0410: 20 3d 20 67 63 63 20 2d 67 20 2d 4f 73 20 2d 57 = gcc -g -Os -W
0420: 61 6c 6c 0a 54 43 43 20 3d 20 69 35 38 36 2d 6d all.TCC = i586-m
0430: 69 6e 67 77 33 32 6d 73 76 63 2d 67 63 63 20 2d ingw32msvc-gcc -
0440: 67 20 2d 4f 73 20 2d 57 61 6c 6c 20 2d 44 46 4f g -Os -Wall -DFO
0450: 53 53 49 4c 5f 49 31 38 4e 3d 30 20 2d 4c 2f 75 SSIL_I18N=0 -L/u
0460: 73 72 2f 69 35 38 36 2d 6d 69 6e 67 77 33 32 6d sr/i586-mingw32m
0470: 73 76 63 2f 6c 69 62 20 2d 49 2f 75 73 72 2f 69 svc/lib -I/usr/i
0480: 35 38 36 2d 6d 69 6e 67 77 33 32 6d 73 76 63 2f 586-mingw32msvc/
0490: 69 6e 63 6c 75 64 65 0a 0a 23 23 23 23 20 45 78 include..#### Ex
04a0: 74 72 61 20 61 72 67 75 6d 65 6e 74 73 20 66 6f tra arguments fo
04b0: 72 20 6c 69 6e 6b 69 6e 67 20 74 68 65 20 66 69 r linking the fi
04c0: 6e 69 73 68 65 64 20 62 69 6e 61 72 79 2e 20 20 nished binary.
04d0: 46 6f 73 73 69 6c 20 6e 65 65 64 73 0a 23 20 20 Fossil needs.#
04e0: 20 20 74 6f 20 6c 69 6e 6b 20 61 67 61 69 6e 73 to link agains
04f0: 74 20 74 68 65 20 5a 2d 4c 69 62 20 63 6f 6d 70 t the Z-Lib comp
0500: 72 65 73 73 69 6f 6e 20 6c 69 62 72 61 72 79 2e ression library.
0510: 20 20 54 68 65 72 65 20 61 72 65 20 6e 6f 0a 23 There are no.#
0520: 20 20 20 20 6f 74 68 65 72 20 64 65 70 65 6e 64 other depend
0530: 65 6e 63 69 65 73 2e 20 20 57 65 20 73 6f 6d 65 encies. We some
0540: 74 69 6d 65 73 20 61 64 64 20 74 68 65 20 2d 73 times add the -s
0550: 74 61 74 69 63 20 6f 70 74 69 6f 6e 20 68 65 72 tatic option her
0560: 65 0a 23 20 20 20 20 73 6f 20 74 68 61 74 20 77 e.# so that w
0570: 65 20 63 61 6e 20 62 75 69 6c 64 20 61 20 73 74 e can build a st
0580: 61 74 69 63 20 65 78 65 63 75 74 61 62 6c 65 20 atic executable
0590: 74 68 61 74 20 77 69 6c 6c 20 72 75 6e 20 69 6e that will run in
05a0: 20 61 0a 23 20 20 20 20 63 68 72 6f 6f 74 20 6a a.# chroot j
05b0: 61 69 6c 2e 0a 23 0a 23 4c 49 42 20 3d 20 2d 6c ail..#.#LIB = -l
05c0: 7a 0a 4c 49 42 20 3d 20 2d 6c 7a 20 2d 6c 77 73 z.LIB = -lz -lws
05d0: 32 5f 33 32 0a 0a 0a 23 23 23 23 20 54 63 6c 20 2_32...#### Tcl
05e0: 73 68 65 6c 6c 20 66 6f 72 20 75 73 65 20 69 6e shell for use in
05f0: 20 72 75 6e 6e 69 6e 67 20 74 68 65 20 66 6f 73 running the fos
0600: 73 69 6c 20 74 65 73 74 73 75 69 74 65 2e 0a 23 sil testsuite..#
0610: 0a 54 43 4c 53 48 20 3d 20 74 63 6c 73 68 0a 0a .TCLSH = tclsh..
0620: 23 20 59 6f 75 20 73 68 6f 75 6c 64 20 6e 6f 74 # You should not
0630: 20 6e 65 65 64 20 74 6f 20 63 68 61 6e 67 65 20 need to change
0640: 61 6e 79 74 68 69 6e 67 20 62 65 6c 6f 77 20 74 anything below t
0650: 68 69 73 20 6c 69 6e 65 0a 23 23 23 23 23 23 23 his line.#######
0660: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0670: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0680: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0690: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
06a0: 23 23 23 23 23 23 23 23 0a 69 6e 63 6c 75 64 65 ########.include
06b0: 20 24 28 53 52 43 44 49 52 29 2f 6d 61 69 6e 2e $(SRCDIR)/main.
06c0: 6d 6b 0a mk.