Fossil SCM

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

Keyboard Shortcuts

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