Artifact eaef66a4a3fabcca9e68904d21c7199df81e5a55:
File
Makefile.w32
part of check-in
[5a30fa45df]
- Build from build directory
by
anonymous on
2007-09-24 19:32:26.
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 2e 2e 2f 73 72 63 0a 0a 23 23 23 23 20 = ../src..####
0100: 43 20 43 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6f C Compiler and o
0110: 70 74 69 6f 6e 73 20 66 6f 72 20 75 73 65 20 69 ptions for use i
0120: 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 65 63 75 n building execu
0130: 74 61 62 6c 65 73 20 74 68 61 74 0a 23 20 20 20 tables that.#
0140: 20 77 69 6c 6c 20 72 75 6e 20 6f 6e 20 74 68 65 will run on the
0150: 20 70 6c 61 74 66 6f 72 6d 20 74 68 61 74 20 69 platform that i
0160: 73 20 64 6f 69 6e 67 20 74 68 65 20 62 75 69 6c s doing the buil
0170: 64 2e 20 20 54 68 69 73 20 69 73 20 75 73 65 64 d. This is used
0180: 0a 23 20 20 20 20 74 6f 20 63 6f 6d 70 69 6c 65 .# to compile
0190: 20 63 6f 64 65 2d 67 65 6e 65 72 61 74 6f 72 20 code-generator
01a0: 70 72 6f 67 72 61 6d 73 20 61 73 20 70 61 72 74 programs as part
01b0: 20 6f 66 20 74 68 65 20 62 75 69 6c 64 20 70 72 of the build pr
01c0: 6f 63 65 73 73 2e 0a 23 20 20 20 20 53 65 65 20 ocess..# See
01d0: 54 43 43 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 TCC below for th
01e0: 65 20 43 20 63 6f 6d 70 69 6c 65 72 20 66 6f 72 e C compiler for
01f0: 20 62 75 69 6c 64 69 6e 67 20 74 68 65 20 66 69 building the fi
0200: 6e 69 73 68 65 64 20 62 69 6e 61 72 79 2e 0a 23 nished binary..#
0210: 0a 42 43 43 20 3d 20 67 63 63 20 2d 67 20 2d 4f .BCC = gcc -g -O
0220: 32 0a 0a 23 23 23 23 20 54 68 65 20 73 75 66 66 2..#### The suff
0230: 69 78 20 74 6f 20 61 64 64 20 74 6f 20 65 78 65 ix to add to exe
0240: 63 75 74 61 62 6c 65 20 66 69 6c 65 73 2e 20 20 cutable files.
0250: 22 2e 65 78 65 22 20 66 6f 72 20 77 69 6e 64 6f ".exe" for windo
0260: 77 73 2e 0a 23 20 20 20 20 4e 6f 74 68 69 6e 67 ws..# Nothing
0270: 20 66 6f 72 20 75 6e 69 78 2e 0a 23 0a 45 20 3d for unix..#.E =
0280: 0a 0a 23 23 23 23 20 43 20 43 6f 6d 70 69 6c 65 ..#### C Compile
0290: 20 61 6e 64 20 6f 70 74 69 6f 6e 73 20 66 6f 72 and options for
02a0: 20 75 73 65 20 69 6e 20 62 75 69 6c 64 69 6e 67 use in building
02b0: 20 65 78 65 63 75 74 61 62 6c 65 73 20 74 68 61 executables tha
02c0: 74 20 0a 23 20 20 20 20 77 69 6c 6c 20 72 75 6e t .# will run
02d0: 20 6f 6e 20 74 68 65 20 74 61 72 67 65 74 20 70 on the target p
02e0: 6c 61 74 66 6f 72 6d 2e 20 20 54 68 69 73 20 69 latform. This i
02f0: 73 20 75 73 75 61 6c 6c 79 20 74 68 65 20 73 61 s usually the sa
0300: 6d 65 0a 23 20 20 20 20 61 73 20 42 43 43 2c 20 me.# as BCC,
0310: 75 6e 6c 65 73 73 20 79 6f 75 20 61 72 65 20 63 unless you are c
0320: 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 2e 20 ross-compiling.
0330: 20 54 68 69 73 20 43 20 63 6f 6d 70 69 6c 65 72 This C compiler
0340: 20 62 75 69 6c 64 73 0a 23 20 20 20 20 74 68 65 builds.# the
0350: 20 66 69 6e 69 73 68 65 64 20 62 69 6e 61 72 79 finished binary
0360: 20 66 6f 72 20 66 6f 73 73 69 6c 2e 20 20 54 68 for fossil. Th
0370: 65 20 42 43 43 20 63 6f 6d 70 69 6c 65 72 20 61 e BCC compiler a
0380: 62 6f 76 65 20 69 73 20 75 73 65 64 0a 23 20 20 bove is used.#
0390: 20 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 69 for building i
03a0: 6e 74 65 72 6d 65 64 69 61 74 65 20 63 6f 64 65 ntermediate code
03b0: 2d 67 65 6e 65 72 61 74 6f 72 20 74 6f 6f 6c 73 -generator tools
03c0: 2e 0a 23 0a 23 54 43 43 20 3d 20 67 63 63 20 2d ..#.#TCC = gcc -
03d0: 4f 36 0a 23 54 43 43 20 3d 20 67 63 63 20 2d 67 O6.#TCC = gcc -g
03e0: 20 2d 4f 30 20 2d 57 61 6c 6c 20 2d 66 70 72 6f -O0 -Wall -fpro
03f0: 66 69 6c 65 2d 61 72 63 73 20 2d 66 74 65 73 74 file-arcs -ftest
0400: 2d 63 6f 76 65 72 61 67 65 0a 23 54 43 43 20 3d -coverage.#TCC =
0410: 20 67 63 63 20 2d 67 20 2d 4f 73 20 2d 57 61 6c gcc -g -Os -Wal
0420: 6c 0a 54 43 43 20 3d 20 67 63 63 20 2d 67 20 2d l.TCC = gcc -g -
0430: 4f 73 20 2d 57 61 6c 6c 20 2d 44 46 4f 53 53 49 Os -Wall -DFOSSI
0440: 4c 5f 49 31 38 4e 3d 30 0a 0a 23 23 23 23 20 45 L_I18N=0..#### E
0450: 78 74 72 61 20 61 72 67 75 6d 65 6e 74 73 20 66 xtra arguments f
0460: 6f 72 20 6c 69 6e 6b 69 6e 67 20 74 68 65 20 66 or linking the f
0470: 69 6e 69 73 68 65 64 20 62 69 6e 61 72 79 2e 20 inished binary.
0480: 20 46 6f 73 73 69 6c 20 6e 65 65 64 73 0a 23 20 Fossil needs.#
0490: 20 20 20 74 6f 20 6c 69 6e 6b 20 61 67 61 69 6e to link again
04a0: 73 74 20 74 68 65 20 5a 2d 4c 69 62 20 63 6f 6d st the Z-Lib com
04b0: 70 72 65 73 73 69 6f 6e 20 6c 69 62 72 61 72 79 pression library
04c0: 2e 20 20 54 68 65 72 65 20 61 72 65 20 6e 6f 0a . There are no.
04d0: 23 20 20 20 20 6f 74 68 65 72 20 64 65 70 65 6e # other depen
04e0: 64 65 6e 63 69 65 73 2e 20 20 57 65 20 73 6f 6d dencies. We som
04f0: 65 74 69 6d 65 73 20 61 64 64 20 74 68 65 20 2d etimes add the -
0500: 73 74 61 74 69 63 20 6f 70 74 69 6f 6e 20 68 65 static option he
0510: 72 65 0a 23 20 20 20 20 73 6f 20 74 68 61 74 20 re.# so that
0520: 77 65 20 63 61 6e 20 62 75 69 6c 64 20 61 20 73 we can build a s
0530: 74 61 74 69 63 20 65 78 65 63 75 74 61 62 6c 65 tatic executable
0540: 20 74 68 61 74 20 77 69 6c 6c 20 72 75 6e 20 69 that will run i
0550: 6e 20 61 0a 23 20 20 20 20 63 68 72 6f 6f 74 20 n a.# chroot
0560: 6a 61 69 6c 2e 0a 23 0a 23 4c 49 42 20 3d 20 2d jail..#.#LIB = -
0570: 6c 7a 0a 4c 49 42 20 3d 20 2d 6c 7a 20 2d 6c 77 lz.LIB = -lz -lw
0580: 73 32 5f 33 32 0a 0a 0a 23 23 23 23 20 54 63 6c s2_32...#### Tcl
0590: 20 73 68 65 6c 6c 20 66 6f 72 20 75 73 65 20 69 shell for use i
05a0: 6e 20 72 75 6e 6e 69 6e 67 20 74 68 65 20 66 6f n running the fo
05b0: 73 73 69 6c 20 74 65 73 74 73 75 69 74 65 2e 0a ssil testsuite..
05c0: 23 0a 54 43 4c 53 48 20 3d 20 74 63 6c 73 68 0a #.TCLSH = tclsh.
05d0: 0a 23 20 59 6f 75 20 73 68 6f 75 6c 64 20 6e 6f .# You should no
05e0: 74 20 6e 65 65 64 20 74 6f 20 63 68 61 6e 67 65 t need to change
05f0: 20 61 6e 79 74 68 69 6e 67 20 62 65 6c 6f 77 20 anything below
0600: 74 68 69 73 20 6c 69 6e 65 0a 23 23 23 23 23 23 this line.######
0610: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0620: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0630: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0640: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0650: 23 23 23 23 23 23 23 23 23 0a 69 6e 63 6c 75 64 #########.includ
0660: 65 20 24 28 53 52 43 44 49 52 29 2f 6d 61 69 6e e $(SRCDIR)/main
0670: 2e 6d 6b 0a .mk.