Artifact cb88682a83b0318a07f9dde011431170f220d1c8:
File
src/linux-gcc.mk
part of check-in
[dbda8d6ce9]
- Initial check-in of m1 sources.
by
drh on
2007-07-21 14:10:57.
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 0a 23 0a 53 52 43 44 49 52 20 3d 20 2e 2e 2f ..#.SRCDIR = ../
0050: 63 6f 64 65 2f 73 72 63 0a 0a 23 23 23 23 20 43 code/src..#### C
0060: 20 43 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6f 70 Compiler and op
0070: 74 69 6f 6e 73 20 66 6f 72 20 75 73 65 20 69 6e tions for use in
0080: 20 62 75 69 6c 64 69 6e 67 20 65 78 65 63 75 74 building execut
0090: 61 62 6c 65 73 20 74 68 61 74 0a 23 20 20 20 20 ables that.#
00a0: 77 69 6c 6c 20 72 75 6e 20 6f 6e 20 74 68 65 20 will run on the
00b0: 70 6c 61 74 66 6f 72 6d 20 74 68 61 74 20 69 73 platform that is
00c0: 20 64 6f 69 6e 67 20 74 68 65 20 62 75 69 6c 64 doing the build
00d0: 2e 0a 23 0a 42 43 43 20 3d 20 67 63 63 20 2d 67 ..#.BCC = gcc -g
00e0: 20 2d 4f 32 0a 0a 23 23 23 23 20 54 68 65 20 73 -O2..#### The s
00f0: 75 66 66 69 78 20 74 6f 20 61 64 64 20 74 6f 20 uffix to add to
0100: 65 78 65 63 75 74 61 62 6c 65 20 66 69 6c 65 73 executable files
0110: 2e 20 20 22 2e 65 78 65 22 20 66 6f 72 20 77 69 . ".exe" for wi
0120: 6e 64 6f 77 73 2e 0a 23 20 20 20 20 4e 6f 74 68 ndows..# Noth
0130: 69 6e 67 20 66 6f 72 20 75 6e 69 78 2e 0a 23 0a ing for unix..#.
0140: 45 20 3d 0a 0a 23 23 23 23 20 43 20 43 6f 6d 70 E =..#### C Comp
0150: 69 6c 65 20 61 6e 64 20 6f 70 74 69 6f 6e 73 20 ile and options
0160: 66 6f 72 20 75 73 65 20 69 6e 20 62 75 69 6c 64 for use in build
0170: 69 6e 67 20 65 78 65 63 75 74 61 62 6c 65 73 20 ing executables
0180: 74 68 61 74 20 0a 23 20 20 20 20 77 69 6c 6c 20 that .# will
0190: 72 75 6e 20 6f 6e 20 74 68 65 20 74 61 72 67 65 run on the targe
01a0: 74 20 70 6c 61 74 66 6f 72 6d 2e 20 20 54 68 69 t platform. Thi
01b0: 73 20 69 73 20 75 73 75 61 6c 6c 79 20 74 68 65 s is usually the
01c0: 20 73 61 6d 65 0a 23 20 20 20 20 61 73 20 42 43 same.# as BC
01d0: 43 2c 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 72 C, unless you ar
01e0: 65 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e e cross-compilin
01f0: 67 2e 0a 23 0a 23 54 43 43 20 3d 20 67 63 63 20 g..#.#TCC = gcc
0200: 2d 4f 36 0a 54 43 43 20 3d 20 67 63 63 20 2d 67 -O6.TCC = gcc -g
0210: 20 2d 4f 30 20 2d 57 61 6c 6c 0a 23 54 43 43 20 -O0 -Wall.#TCC
0220: 3d 20 67 63 63 20 2d 67 20 2d 4f 30 20 2d 57 61 = gcc -g -O0 -Wa
0230: 6c 6c 20 2d 66 70 72 6f 66 69 6c 65 2d 61 72 63 ll -fprofile-arc
0240: 73 20 2d 66 74 65 73 74 2d 63 6f 76 65 72 61 67 s -ftest-coverag
0250: 65 0a 54 43 43 20 2b 3d 20 2d 49 2e 2e 2f 6c 69 e.TCC += -I../li
0260: 62 74 6f 6d 63 72 79 70 74 2d 31 2e 30 32 2f 73 btomcrypt-1.02/s
0270: 72 63 2f 68 65 61 64 65 72 73 0a 0a 23 23 23 23 rc/headers..####
0280: 20 45 78 74 72 61 20 61 72 67 75 6d 65 6e 74 73 Extra arguments
0290: 20 66 6f 72 20 6c 69 6e 6b 69 6e 67 20 61 67 61 for linking aga
02a0: 69 6e 73 74 20 53 51 4c 69 74 65 0a 23 0a 4c 49 inst SQLite.#.LI
02b0: 42 53 51 4c 49 54 45 20 3d 20 2d 6c 73 71 6c 69 BSQLITE = -lsqli
02c0: 74 65 33 20 2d 6c 7a 20 2d 6c 6d 20 2e 2e 2f 6c te3 -lz -lm ../l
02d0: 69 62 74 6f 6d 63 72 79 70 74 2d 31 2e 30 32 2f ibtomcrypt-1.02/
02e0: 6c 69 62 74 6f 6d 63 72 79 70 74 2e 61 0a 0a 23 libtomcrypt.a..#
02f0: 23 23 23 20 49 6e 73 74 61 6c 6c 61 74 69 6f 6e ### Installation
0300: 20 64 69 72 65 63 74 6f 72 79 0a 23 0a 49 4e 53 directory.#.INS
0310: 54 41 4c 4c 44 49 52 20 3d 20 2f 76 61 72 2f 77 TALLDIR = /var/w
0320: 77 77 2f 63 67 69 2d 62 69 6e 0a 0a 0a 23 20 59 ww/cgi-bin...# Y
0330: 6f 75 20 73 68 6f 75 6c 64 20 6e 6f 74 20 6e 65 ou should not ne
0340: 65 64 20 74 6f 20 63 68 61 6e 67 65 20 61 6e 79 ed to change any
0350: 74 68 69 6e 67 20 62 65 6c 6f 77 20 74 68 69 73 thing below this
0360: 20 6c 69 6e 65 0a 23 23 23 23 23 23 23 23 23 23 line.##########
0370: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0380: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0390: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
03a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
03b0: 23 23 23 23 23 0a 69 6e 63 6c 75 64 65 20 24 28 #####.include $(
03c0: 53 52 43 44 49 52 29 2f 6d 61 69 6e 2e 6d 6b 0a SRCDIR)/main.mk.