Fossil SCM

fossil-scm / Makefile.classic
Blame History Raw 112 lines
1
#!/usr/bin/make
2
#
3
# This is the top-level makefile for Fossil when the build is occurring
4
# on a unix platform. This works out-of-the-box on most unix platforms.
5
# But you are free to vary some of the definitions if desired.
6
#
7
#### The toplevel directory of the source tree. Fossil can be built
8
# in a directory that is separate from the source tree. Just change
9
# the following to point from the build directory to the src/ folder.
10
#
11
SRCDIR = ./src
12
#### Upstream source files included directly in this repository.
13
#
14
SRCDIR_extsrc = ./extsrc
15
#### In-tree tools such as code generators and translators:
16
#
17
SRCDIR_tools = ./tools
18
19
#### The directory into which object code files should be written.
20
#
21
#
22
OBJDIR = ./bld
23
24
#### C Compiler and options for use in building executables that
25
# will run on the platform that is doing the build. This is used
26
# to compile code-generator programs as part of the build process.
27
# See TCC below for the C compiler for building the finished binary.
28
#
29
BCC = gcc
30
BCCFLAGS = $(CFLAGS)
31
32
#### The suffix to add to final executable file. When cross-compiling
33
# to windows, make this ".exe". Otherwise leave it blank.
34
#
35
E =
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 = gcc -O6
44
#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
45
TCC = gcc -g -Os -Wall
46
47
# To add support for HTTPS
48
TCC += -DFOSSIL_ENABLE_SSL
49
50
#### We sometimes add the -static option here so that we can build a
51
# static executable that will run in a chroot jail.
52
#LIB = -static
53
TCC += -DFOSSIL_DYNAMIC_BUILD=1
54
55
TCCFLAGS = $(CFLAGS)
56
57
# We don't attempt to use libedit or libreadline in this simplified
58
# build system (contrast auto.def and Makefile.in) so use the included
59
# copy of linenoise. MinGW can't make use of this, but linenoise is
60
# ifdef'd out elsewhere for that platform. Note that this is a make
61
# flag handled in src/main.mk, not a C preprocessor flag.
62
USE_LINENOISE := 1
63
64
#### Extra arguments for linking the finished binary. Fossil needs
65
# to link against the Z-Lib compression library. There are no
66
# other required dependencies.
67
ZLIB_LIB = -lz
68
69
# If using zlib:
70
LIB += $(ZLIB_LIB) $(LDFLAGS)
71
72
# If using HTTPS:
73
LIB += -lcrypto -lssl
74
75
# Many platforms put cos() needed by src/piechart.c in libm, rather than
76
# in libc. We cannot enable this by default because libm doesn't exist
77
# everywhere.
78
#LIB += -lm
79
80
#### Tcl shell for use in running the fossil testsuite. If you do not
81
# care about testing the end result, this can be blank.
82
#
83
TCLSH = tclsh
84
85
CFLAGS += -fPIE
86
CPPFLAGS += -I. -I$(SRCDIR_extsrc) -I$(SRCDIR)
87
LIB = -lm -lz -lssl
88
INSTALLDIR = $(DESTDIR)$(prefix)/bin
89
SQLITE3_ORIGINAL = 0
90
USE_LINENOISE = 1
91
92
93
# You should not need to change anything below this line
94
###############################################################################
95
#
96
# Automatic platform-specific options.
97
HOST_OS_CMD = uname -s
98
HOST_OS = $(HOST_OS_CMD:sh)
99
100
LIB.SunOS= -lsocket -lnsl -lrt
101
LIB += $(LIB.$(HOST_OS))
102
103
TCC.DragonFly += -DUSE_PREAD
104
TCC.FreeBSD += -DUSE_PREAD
105
TCC.NetBSD += -DUSE_PREAD
106
TCC.OpenBSD += -DUSE_PREAD
107
TCC += $(TCC.$(HOST_OS))
108
109
APPNAME = fossil$(E)
110
.PHONY: all tags
111
include $(SRCDIR)/main.mk
112

Keyboard Shortcuts

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