|
1
|
#### config.mk file for Linux with GCC. |
|
2
|
# Copy this file as config.mk in the Fossil root directory to use. |
|
3
|
# Note that this is the default configuration for the build system. |
|
4
|
# |
|
5
|
|
|
6
|
#### OS-specific configuration for building Fossil on Linux systems. |
|
7
|
# |
|
8
|
|
|
9
|
#### The suffix to add to executable files. ".exe" for windows. |
|
10
|
# Nothing for unix. |
|
11
|
# |
|
12
|
E = |
|
13
|
|
|
14
|
#### The directory into which object code files should be written. |
|
15
|
# |
|
16
|
OBJDIR = ./obj |
|
17
|
|
|
18
|
#### The following variable definitions decide which features are turned on or |
|
19
|
# of when building Fossil. Comment out the features which are not needed by |
|
20
|
# this platform. |
|
21
|
# |
|
22
|
#ENABLE_STATIC = 1 # we want a static build |
|
23
|
ENABLE_SSL = 1 # we are using SSL |
|
24
|
#ENABLE_SOCKET = 1 # we are using libsocket (OpenSolaris and Solaris) |
|
25
|
#ENABLE_NSL = 1 # we are using libnsl library (Solaris) |
|
26
|
ENABLE_I18N = 1 # we are using i18n settings |
|
27
|
|
|
28
|
#### Compiler-specific configuration for users of the GCC compiler suite. |
|
29
|
# |
|
30
|
|
|
31
|
#### C Compiler and options for use in building executables that |
|
32
|
# will run on the platform that is doing the build. This is used |
|
33
|
# to compile code-generator programs as part of the build process. |
|
34
|
# See TCC below for the C compiler for building the finished binary. |
|
35
|
# |
|
36
|
BCC = gcc -g -O2 |
|
37
|
|
|
38
|
#### C Compile and options for use in building executables that |
|
39
|
# will run on the target platform. This is usually the same |
|
40
|
# as BCC, unless you are cross-compiling. This C compiler builds |
|
41
|
# the finished binary for fossil. The BCC compiler above is used |
|
42
|
# for building intermediate code-generator tools. |
|
43
|
# |
|
44
|
TCC = gcc -g -Os -Wall |
|
45
|
|
|
46
|
#### Compiler options. |
|
47
|
# The variables tested are defined in the make/PLATFORM-fragment.mk files. |
|
48
|
# |
|
49
|
ifdef ENABLE_SSL |
|
50
|
TCC += -DFOSSIL_ENABLE_SSL=1 |
|
51
|
endif |
|
52
|
ifndef ENABLE_I18N |
|
53
|
TCC += -DFOSSIL_I18N=0 |
|
54
|
endif |
|
55
|
|
|
56
|
#### Linker dependencies. Fossil only requires libz as an external dependency. |
|
57
|
# All other library settings are optional and toggled in platform-specific |
|
58
|
# make fragments. |
|
59
|
# |
|
60
|
LIB = -lz $(LDFLAGS) |
|
61
|
|
|
62
|
#### Linker options. |
|
63
|
# The variables tested are defined in the make/PLATFORM-fragment.mk files. |
|
64
|
# |
|
65
|
ifdef ENABLE_STATIC |
|
66
|
LIB += -static |
|
67
|
endif |
|
68
|
ifdef ENABLE_SSL |
|
69
|
LIB += -lcrypto -lssl |
|
70
|
endif |
|
71
|
ifdef ENABLE_SOCKET |
|
72
|
LIB += -lsocket |
|
73
|
endif |
|
74
|
ifdef ENABLE_NSL |
|
75
|
LIB += -lnsl |
|
76
|
endif |
|
77
|
|
|
78
|
#### Signal that we've used a config.mk file. |
|
79
|
# |
|
80
|
CONFIG_MK_COMPLETE=1 |
|
81
|
|
|
82
|
|