Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 606 lines (528 sloc) 21.797 kb
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
1 # This GNU Makefile supports different OS and CPU combinations.
2 #
eedaa9f * released 1.1.23
willy tarreau authored
3 # You should use it this way :
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
4 # [g]make TARGET=os ARCH=arch CPU=cpu USE_xxx=1 ...
f2ef8c5 [MEDIUM] Added easier support for Doug Lea's malloc (dlmalloc)
Willy Tarreau authored
5 #
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
6 # Valid USE_* options are the following. Most of them are automatically set by
7 # the TARGET, others have to be explictly specified :
8 # USE_CTTPROXY : enable CTTPROXY on Linux (needs kernel patch).
f14358b [BUILD] ensure that makefile understands USE_DLMALLOC=1
Willy Tarreau authored
9 # USE_DLMALLOC : enable use of dlmalloc (see DLMALLOC_SRC)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
10 # USE_EPOLL : enable epoll() on Linux 2.6. Automatic.
11 # USE_GETSOCKNAME : enable getsockname() on Linux 2.2. Automatic.
12 # USE_KQUEUE : enable kqueue() on BSD. Automatic.
13 # USE_MY_EPOLL : redefine epoll_* syscalls. Automatic.
43d8fb2 [REORG] build: move syscall redefinition to specific places
Willy Tarreau authored
14 # USE_MY_SPLICE : redefine the splice syscall if build fails without.
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
15 # USE_NETFILTER : enable netfilter on Linux. Automatic.
16 # USE_PCRE : enable use of libpcre for regex. Recommended.
17 # USE_POLL : enable poll(). Automatic.
18 # USE_REGPARM : enable regparm optimization. Recommended on x86.
19 # USE_SEPOLL : enable speculative epoll(). Automatic.
20 # USE_STATIC_PCRE : enable static libpcre. Recommended.
21 # USE_TPROXY : enable transparent proxy. Automatic.
b94af61 [DOC] report minimum kernel version for tproxy in the Makefile
Arnaud Cornet authored
22 # USE_LINUX_TPROXY : enable full transparent proxy (needs kernel 2.6.28).
88e458a [BUILD] add USE_LINUX_SPLICE to enable LINUX_SPLICE on linux 2.6
Willy Tarreau authored
23 # USE_LINUX_SPLICE : enable kernel 2.6 splicing (broken on old kernels)
890a33e [BUILD] fix platform-dependant build issues related to crypt()
Willy Tarreau authored
24 # USE_LIBCRYPT : enable crypted passwords using -lcrypt
25 # USE_CRYPT_H : set it if your system requires including crypt.h
48d84c1 [OPTIM] linux: add support for bypassing libc to force using vsyscalls
Willy Tarreau authored
26 # USE_VSYSCALL : enable vsyscall on Linux x86, bypassing libc
64bc40b [BUILD] add the USE_GETADDRINFO build option
Willy Tarreau authored
27 # USE_GETADDRINFO : use getaddrinfo() to resolve IPv6 host names.
f2ef8c5 [MEDIUM] Added easier support for Doug Lea's malloc (dlmalloc)
Willy Tarreau authored
28 #
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
29 # Options can be forced by specifying "USE_xxx=1" or can be disabled by using
30 # "USE_xxx=" (empty string).
31 #
32 # Variables useful for packagers :
33 # CC is set to "gcc" by default and is used for compilation only.
34 # LD is set to "gcc" by default and is used for linking only.
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
35 # ARCH may be useful to force build of 32-bit binary on 64-bit systems
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
36 # CFLAGS is automatically set for the specified CPU and may be overridden.
37 # LDFLAGS is automatically set to -g and may be overridden.
38 # SMALL_OPTS may be used to specify some options to shrink memory usage.
39 # DEBUG may be used to set some internal debugging options.
40 # ADDINC may be used to complete the include path in the form -Ipath.
41 # ADDLIB may be used to complete the library list in the form -Lpath -llib.
42 # DEFINE may be used to specify any additional define, which will be reported
43 # by "haproxy -vv" in CFLAGS.
44 # SILENT_DEFINE may be used to specify other defines which will not be
45 # reported by "haproxy -vv".
a184aa2 @morfoh [BUILD] Added support for 'make install'
morfoh authored
46 # DESTDIR is not set by default and is used for installation only.
47 # It might be useful to set DESTDIR if you want to install haproxy
48 # in a sandbox.
49 # PREFIX is set to "/usr/local" by default and is used for installation only.
50 # SBINDIR is set to "$(PREFIX)/sbin" by default and is used for installation
51 # only.
19b5029 @morfoh [BUILD] Added 'install-man' make target for installing the man page
morfoh authored
52 # MANDIR is set to "$(PREFIX)/share/man" by default and is used for
53 # installation only.
bf34eb4 @morfoh [BUILD] Added 'install-doc' make target
morfoh authored
54 # DOCDIR is set to "$(PREFIX)/doc/haproxy" by default and is used for
55 # installation only.
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
56 #
57 # Other variables :
58 # DLMALLOC_SRC : build with dlmalloc, indicate the location of dlmalloc.c.
59 # DLMALLOC_THRES : should match PAGE_SIZE on every platform (default: 4096).
60 # PCREDIR : force the path to libpcre.
61 # IGNOREGIT : ignore GIT commit versions if set.
62 # VERSION : force haproxy version reporting.
63 # SUBVERS : add a sub-version (eg: platform, model, ...).
64 # VERDATE : force haproxy's release date.
65
a184aa2 @morfoh [BUILD] Added support for 'make install'
morfoh authored
66 #### Installation options.
67 DESTDIR =
68 PREFIX = /usr/local
69 SBINDIR = $(PREFIX)/sbin
ef3b403 @copiousfreetime [BUILD] fix MANDIR default location to match documentation
copiousfreetime authored
70 MANDIR = $(PREFIX)/share/man
bf34eb4 @morfoh [BUILD] Added 'install-doc' make target
morfoh authored
71 DOCDIR = $(PREFIX)/doc/haproxy
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
72
73 #### TARGET system
74 # Use TARGET=<target_name> to optimize for a specifc target OS among the
75 # following list (use the default "generic" if uncertain) :
b181465 [BUILD] makefile: remove unused references to linux24eold and EPOLL_CTL_...
Willy Tarreau authored
76 # generic, linux22, linux24, linux24e, linux26, solaris,
3208731 [BUILD] add support for build under Cygwin
Yitzhak Sapir authored
77 # freebsd, openbsd, cygwin, custom
e4208cb [BUILD] ensure that users don't build without setting the target anymore...
Willy Tarreau authored
78 TARGET =
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
79
80 #### TARGET CPU
81 # Use CPU=<cpu_name> to optimize for a particular CPU, among the following
82 # list :
a5899aa [BUILD] add the CPU=native and ARCH=32/64 build options
Willy Tarreau authored
83 # generic, native, i586, i686, ultrasparc, custom
eedaa9f * released 1.1.23
willy tarreau authored
84 CPU = generic
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
85
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
86 #### Architecture, used when not building for native architecture
87 # Use ARCH=<arch_name> to force build for a specific architecture. Known
88 # architectures will lead to "-m32" or "-m64" being added to CFLAGS and
89 # LDFLAGS. This can be required to build 32-bit binaries on 64-bit targets.
a5899aa [BUILD] add the CPU=native and ARCH=32/64 build options
Willy Tarreau authored
90 # Currently, only 32, 64, x86_64, i386, i486, i586 and i686 are understood.
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
91 ARCH =
92
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
93 #### Toolchain options.
94 # GCC is normally used both for compiling and linking.
eedaa9f * released 1.1.23
willy tarreau authored
95 CC = gcc
f630830 @morfoh [BUILD] Replace hardcoded 'LD = gcc' with 'LD = $(CC)'
morfoh authored
96 LD = $(CC)
eedaa9f * released 1.1.23
willy tarreau authored
97
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
98 #### Debug flags (typically "-g").
99 # Those flags only feed CFLAGS so it is not mandatory to use this form.
100 DEBUG_CFLAGS = -g
5cbea6f * released 1.1.0
willy tarreau authored
101
3c9a3fb [BUILD] add -fno-strict-aliasing to fix warnings with gcc >= 4.4
Willy Tarreau authored
102 #### Compiler-specific flags that may be used to disable some negative over-
103 # optimization or to silence some warnings. -fno-strict-aliasing is needed with
104 # gcc >= 4.4.
105 SPEC_CFLAGS = -fno-strict-aliasing
106
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
107 #### Memory usage tuning
108 # If small memory footprint is required, you can reduce the buffer size. There
109 # are 2 buffers per concurrent session, so 16 kB buffers will eat 32 MB memory
110 # with 1000 concurrent sessions. Putting it slightly lower than a page size
111 # will prevent the additional parameters to go beyond a page. 8030 bytes is
112 # exactly 5.5 TCP segments of 1460 bytes and is generally good. Useful tuning
113 # macros include :
114 # SYSTEM_MAXCONN, BUFSIZE, MAXREWRITE, REQURI_LEN, CAPTURE_LEN.
115 # Example: SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
116 SMALL_OPTS =
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
117
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
118 #### Debug settings
119 # You can enable debugging on specific code parts by setting DEBUG=-DDEBUG_xxx.
120 # Currently defined DEBUG macros include DEBUG_FULL, DEBUG_MEMORY, DEBUG_FSM,
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
121 # DEBUG_HASH and DEBUG_AUTH. Please check sources for exact meaning or do not
122 # use at all.
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
123 DEBUG =
eedaa9f * released 1.1.23
willy tarreau authored
124
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
125 #### Additional include and library dirs
126 # Redefine this if you want to add some special PATH to include/libs
127 ADDINC =
128 ADDLIB =
036e1ce * released 1.1.18
willy tarreau authored
129
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
130 #### Specific macro definitions
131 # Use DEFINE=-Dxxx to set any tunable macro. Anything declared here will appear
132 # in the build options reported by "haproxy -vv". Use SILENT_DEFINE if you do
133 # not want to pollute the report with complex defines.
134 DEFINE =
135 SILENT_DEFINE =
136
137
138 #### CPU dependant optimizations
139 # Some CFLAGS are set by default depending on the target CPU. Those flags only
140 # feed CPU_CFLAGS, which in turn feed CFLAGS, so it is not mandatory to use
141 # them. You should not have to change these options. Better use CPU_CFLAGS or
142 # even CFLAGS instead.
143 CPU_CFLAGS.generic = -O2
a5899aa [BUILD] add the CPU=native and ARCH=32/64 build options
Willy Tarreau authored
144 CPU_CFLAGS.native = -O2 -march=native
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
145 CPU_CFLAGS.i586 = -O2 -march=i586
146 CPU_CFLAGS.i686 = -O2 -march=i686
147 CPU_CFLAGS.ultrasparc = -O6 -mcpu=v9 -mtune=ultrasparc
148 CPU_CFLAGS = $(CPU_CFLAGS.$(CPU))
149
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
150 #### ARCH dependant flags, may be overriden by CPU flags
a5899aa [BUILD] add the CPU=native and ARCH=32/64 build options
Willy Tarreau authored
151 ARCH_FLAGS.32 = -m32
152 ARCH_FLAGS.64 = -m64
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
153 ARCH_FLAGS.i386 = -m32 -march=i386
154 ARCH_FLAGS.i486 = -m32 -march=i486
155 ARCH_FLAGS.i586 = -m32 -march=i586
156 ARCH_FLAGS.i686 = -m32 -march=i686
157 ARCH_FLAGS.x86_64 = -m64 -march=x86-64
158 ARCH_FLAGS = $(ARCH_FLAGS.$(ARCH))
159
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
160 #### Common CFLAGS
161 # These CFLAGS contain general optimization options, CPU-specific optimizations
162 # and debug flags. They may be overridden by some distributions which prefer to
163 # set all of them at once instead of playing with the CPU and DEBUG variables.
3c9a3fb [BUILD] add -fno-strict-aliasing to fix warnings with gcc >= 4.4
Willy Tarreau authored
164 CFLAGS = $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS) $(SPEC_CFLAGS)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
165
166 #### Common LDFLAGS
167 # These LDFLAGS are used as the first "ld" options, regardless of any library
168 # path or any other option. They may be changed to add any linker-specific
169 # option at the beginning of the ld command line.
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
170 LDFLAGS = $(ARCH_FLAGS) -g
036e1ce * released 1.1.18
willy tarreau authored
171
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
172 #### Target system options
173 # Depending on the target platform, some options are set, as well as some
174 # CFLAGS and LDFLAGS. The USE_* values are set to "implicit" so that they are
175 # not reported in the build options string. You should not have to change
176 # anything there.
177 ifeq ($(TARGET),generic)
178 # generic system target has nothing specific
179 USE_POLL = implicit
180 USE_TPROXY = implicit
181 else
182 ifeq ($(TARGET),linux22)
183 # This is for Linux 2.2
184 USE_GETSOCKNAME = implicit
185 USE_POLL = implicit
186 USE_TPROXY = implicit
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
187 USE_LIBCRYPT = implicit
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
188 else
189 ifeq ($(TARGET),linux24)
190 # This is for standard Linux 2.4 with netfilter but without epoll()
191 USE_GETSOCKNAME = implicit
192 USE_NETFILTER = implicit
193 USE_POLL = implicit
194 USE_TPROXY = implicit
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
195 USE_LIBCRYPT = implicit
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
196 else
197 ifeq ($(TARGET),linux24e)
198 # This is for enhanced Linux 2.4 with netfilter and epoll() patch > 0.21
199 USE_GETSOCKNAME = implicit
200 USE_NETFILTER = implicit
201 USE_POLL = implicit
202 USE_EPOLL = implicit
203 USE_SEPOLL = implicit
204 USE_MY_EPOLL = implicit
205 USE_TPROXY = implicit
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
206 USE_LIBCRYPT = implicit
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
207 else
208 ifeq ($(TARGET),linux26)
209 # This is for standard Linux 2.6 with netfilter and standard epoll()
210 USE_GETSOCKNAME = implicit
211 USE_NETFILTER = implicit
212 USE_POLL = implicit
213 USE_EPOLL = implicit
214 USE_SEPOLL = implicit
215 USE_TPROXY = implicit
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
216 USE_LIBCRYPT = implicit
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
217 else
218 ifeq ($(TARGET),solaris)
219 # This is for Solaris 8
64bc40b [BUILD] add the USE_GETADDRINFO build option
Willy Tarreau authored
220 # We also enable getaddrinfo() which works since solaris 8.
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
221 USE_POLL = implicit
222 TARGET_CFLAGS = -fomit-frame-pointer -DFD_SETSIZE=65536 -D_REENTRANT
223 TARGET_LDFLAGS = -lnsl -lsocket
224 USE_TPROXY = implicit
890a33e [BUILD] fix platform-dependant build issues related to crypt()
Willy Tarreau authored
225 USE_LIBCRYPT = implicit
226 USE_CRYPT_H = implicit
64bc40b [BUILD] add the USE_GETADDRINFO build option
Willy Tarreau authored
227 USE_GETADDRINFO = implicit
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
228 else
229 ifeq ($(TARGET),freebsd)
230 # This is for FreeBSD
231 USE_POLL = implicit
232 USE_KQUEUE = implicit
233 USE_TPROXY = implicit
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
234 USE_LIBCRYPT = implicit
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
235 else
236 ifeq ($(TARGET),openbsd)
237 # This is for OpenBSD >= 3.0
238 USE_POLL = implicit
239 USE_KQUEUE = implicit
240 USE_TPROXY = implicit
3208731 [BUILD] add support for build under Cygwin
Yitzhak Sapir authored
241 else
242 ifeq ($(TARGET),cygwin)
243 # This is for Cygwin
244 # Cygwin adds IPv6 support only in version 1.7 (in beta right now).
245 USE_POLL = implicit
246 USE_TPROXY = implicit
247 TARGET_CFLAGS = $(if $(filter 1.5.%, $(shell uname -r)), -DUSE_IPV6 -DAF_INET6=23 -DINET6_ADDRSTRLEN=46, )
248 endif # cygwin
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
249 endif # openbsd
250 endif # freebsd
251 endif # solaris
252 endif # linux26
253 endif # linux24e
254 endif # linux24
255 endif # linux22
256 endif # generic
257
258
259 #### Old-style REGEX library settings for compatibility with previous setups.
260 # It is still possible to use REGEX=<regex_lib> to select an alternative regex
261 # library. By default, we use libc's regex. On Solaris 8/Sparc, grouping seems
262 # to be broken using libc, so consider using pcre instead. Supported values are
263 # "libc", "pcre", and "static-pcre". Use of this method is deprecated in favor
264 # of "USE_PCRE" and "USE_STATIC_PCRE" (see build options below).
265 REGEX = libc
266
267 ifeq ($(REGEX),pcre)
268 USE_PCRE = 1
269 $(warning WARNING! use of "REGEX=pcre" is deprecated, consider using "USE_PCRE=1" instead.)
270 endif
4373b96 * added "static-pcre" to the list of supported regex options in the Make...
willy tarreau authored
271
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
272 ifeq ($(REGEX),static-pcre)
273 USE_STATIC_PCRE = 1
274 $(warning WARNING! use of "REGEX=pcre-static" is deprecated, consider using "USE_STATIC_PCRE=1" instead.)
275 endif
9da061b * updated to version 1.0.2
willy tarreau authored
276
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
277 #### Old-style TPROXY settings
278 ifneq ($(findstring -DTPROXY,$(DEFINE)),)
279 USE_TPROXY = 1
280 $(warning WARNING! use of "DEFINE=-DTPROXY" is deprecated, consider using "USE_TPROXY=1" instead.)
281 endif
0174f31 * released 1.2.3 (1.1.30)
willy tarreau authored
282
1c2ad21 * released 1.2.5-pre4
willy tarreau authored
283
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
284 #### Determine version, sub-version and release date.
285 # If GIT is found, and IGNOREGIT is not set, VERSION, SUBVERS and VERDATE are
286 # extracted from the last commit. Otherwise, use the contents of the files
287 # holding the same names in the current directory.
0174f31 * released 1.2.3 (1.1.30)
willy tarreau authored
288
6620dbb [RELEASE] released 1.3.4
Willy Tarreau authored
289 ifeq ($(IGNOREGIT),)
0131269 [BUILD] always match official tags when doing git-tar
Willy Tarreau authored
290 VERSION := $(shell [ -d .git/. ] && ref=`(git describe --tags --match 'v*') 2>/dev/null` && ref=$${ref%-g*} && echo "$${ref\#v}")
9bf6c6e [BUILD] makefile now detects and uses git to set the version
Willy Tarreau authored
291 ifneq ($(VERSION),)
292 # OK git is there and works.
446024e [BUILD] report commit date and not author's date as build date
Willy Tarreau authored
293 SUBVERS := $(shell comms=`git log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit `; [ $$comms -gt 0 ] && echo "-$$comms" )
294 VERDATE := $(shell date +%Y/%m/%d -d "`git log --pretty=fuller HEAD^.. 2>/dev/null | sed -ne '/^CommitDate:/{s/\(^[^ ]*:\)\|\( [-+].*\)//gp;q}'`" )
ec69256 [BUILD] centralize version and date into one file for each
Willy Tarreau authored
295 endif
296 endif
297
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
298 # Last commit version not found, take it from the files.
ec69256 [BUILD] centralize version and date into one file for each
Willy Tarreau authored
299 ifeq ($(VERSION),)
300 VERSION := $(shell cat VERSION 2>/dev/null || touch VERSION)
301 endif
302 ifeq ($(SUBVERS),)
303 SUBVERS := $(shell cat SUBVERS 2>/dev/null || touch SUBVERS)
304 endif
305 ifeq ($(VERDATE),)
306 VERDATE := $(shell cat VERDATE 2>/dev/null || touch VERDATE)
9bf6c6e [BUILD] makefile now detects and uses git to set the version
Willy Tarreau authored
307 endif
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
308
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
309 #### Build options
310 # Do not change these ones, enable USE_* variables instead.
311 OPTIONS_CFLAGS =
312 OPTIONS_LDFLAGS =
313 OPTIONS_OBJS =
314
315 # This variable collects all USE_* values except those set to "implicit". This
316 # is used to report a list of all flags which were used to build this version.
317 # Do not assign anything to it.
318 BUILD_OPTIONS =
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
319
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
320 # Return USE_xxx=$(USE_xxx) unless $(USE_xxx) = "implicit"
321 # Usage:
322 # BUILD_OPTIONS += $(call ignore_implicit,USE_xxx)
323 ignore_implicit = $(patsubst %=implicit,,$(1)=$($(1)))
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
324
6d1a988 [MAJOR] complete support and doc for tcp-splicing
Willy Tarreau authored
325 ifneq ($(USE_TCPSPLICE),)
b55932d [MEDIUM] remove old experimental tcpsplice option
Willy Tarreau authored
326 $(error experimental option USE_TCPSPLICE has been removed, check USE_LINUX_SPLICE)
6d1a988 [MAJOR] complete support and doc for tcp-splicing
Willy Tarreau authored
327 endif
328
88e458a [BUILD] add USE_LINUX_SPLICE to enable LINUX_SPLICE on linux 2.6
Willy Tarreau authored
329 ifneq ($(USE_LINUX_SPLICE),)
330 OPTIONS_CFLAGS += -DCONFIG_HAP_LINUX_SPLICE
331 BUILD_OPTIONS += $(call ignore_implicit,USE_LINUX_SPLICE)
332 endif
333
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
334 ifneq ($(USE_CTTPROXY),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
335 OPTIONS_CFLAGS += -DCONFIG_HAP_CTTPROXY
336 OPTIONS_OBJS += src/cttproxy.o
337 BUILD_OPTIONS += $(call ignore_implicit,USE_CTTPROXY)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
338 endif
339
340 ifneq ($(USE_TPROXY),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
341 OPTIONS_CFLAGS += -DTPROXY
342 BUILD_OPTIONS += $(call ignore_implicit,USE_TPROXY)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
343 endif
344
b1e52e8 [MEDIUM] support fully transparent proxy on Linux (USE_LINUX_TPROXY)
Willy Tarreau authored
345 ifneq ($(USE_LINUX_TPROXY),)
346 OPTIONS_CFLAGS += -DCONFIG_HAP_LINUX_TPROXY
347 BUILD_OPTIONS += $(call ignore_implicit,USE_LINUX_TPROXY)
348 endif
349
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
350 ifneq ($(USE_LIBCRYPT),)
351 OPTIONS_CFLAGS += -DCONFIG_HAP_CRYPT
352 BUILD_OPTIONS += $(call ignore_implicit,USE_LIBCRYPT)
353 OPTIONS_LDFLAGS += -lcrypt
354 endif
355
890a33e [BUILD] fix platform-dependant build issues related to crypt()
Willy Tarreau authored
356 ifneq ($(USE_CRYPT_H),)
357 OPTIONS_CFLAGS += -DNEED_CRYPT_H
358 BUILD_OPTIONS += $(call ignore_implicit,USE_CRYPT_H)
359 endif
360
64bc40b [BUILD] add the USE_GETADDRINFO build option
Willy Tarreau authored
361 ifneq ($(USE_GETADDRINFO),)
362 OPTIONS_CFLAGS += -DUSE_GETADDRINFO
363 BUILD_OPTIONS += $(call ignore_implicit,USE_GETADDRINFO)
364 endif
365
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
366 ifneq ($(USE_POLL),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
367 OPTIONS_CFLAGS += -DENABLE_POLL
368 OPTIONS_OBJS += src/ev_poll.o
369 BUILD_OPTIONS += $(call ignore_implicit,USE_POLL)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
370 endif
371
372 ifneq ($(USE_EPOLL),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
373 OPTIONS_CFLAGS += -DENABLE_EPOLL
374 OPTIONS_OBJS += src/ev_epoll.o
375 BUILD_OPTIONS += $(call ignore_implicit,USE_EPOLL)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
376 endif
377
de99e99 [MAJOR] introduced speculative I/O with epoll()
Willy Tarreau authored
378 ifneq ($(USE_SEPOLL),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
379 OPTIONS_CFLAGS += -DENABLE_SEPOLL
380 OPTIONS_OBJS += src/ev_sepoll.o
381 BUILD_OPTIONS += $(call ignore_implicit,USE_SEPOLL)
de99e99 [MAJOR] introduced speculative I/O with epoll()
Willy Tarreau authored
382 endif
383
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
384 ifneq ($(USE_MY_EPOLL),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
385 OPTIONS_CFLAGS += -DUSE_MY_EPOLL
386 BUILD_OPTIONS += $(call ignore_implicit,USE_MY_EPOLL)
387 endif
388
389 ifneq ($(USE_KQUEUE),)
390 OPTIONS_CFLAGS += -DENABLE_KQUEUE
391 OPTIONS_OBJS += src/ev_kqueue.o
392 BUILD_OPTIONS += $(call ignore_implicit,USE_KQUEUE)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
393 endif
394
48d84c1 [OPTIM] linux: add support for bypassing libc to force using vsyscalls
Willy Tarreau authored
395 ifneq ($(USE_VSYSCALL),)
396 OPTIONS_OBJS += src/i386-linux-vsys.o
397 OPTIONS_CFLAGS += -DCONFIG_HAP_LINUX_VSYSCALL
398 BUILD_OPTIONS += $(call ignore_implicit,USE_VSYSCALL)
399 endif
400
43d8fb2 [REORG] build: move syscall redefinition to specific places
Willy Tarreau authored
401 ifneq ($(USE_MY_SPLICE),)
402 OPTIONS_CFLAGS += -DUSE_MY_SPLICE
403 BUILD_OPTIONS += $(call ignore_implicit,USE_MY_SPLICE)
404 endif
405
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
406 ifneq ($(USE_NETFILTER),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
407 OPTIONS_CFLAGS += -DNETFILTER
408 BUILD_OPTIONS += $(call ignore_implicit,USE_NETFILTER)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
409 endif
410
411 ifneq ($(USE_GETSOCKNAME),)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
412 OPTIONS_CFLAGS += -DUSE_GETSOCKNAME
413 BUILD_OPTIONS += $(call ignore_implicit,USE_GETSOCKNAME)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
414 endif
415
416 ifneq ($(USE_REGPARM),)
cc05fba [BUG] definitely fix regparm issues between haproxy core and ebtree
Willy Tarreau authored
417 OPTIONS_CFLAGS += -DCONFIG_REGPARM=3
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
418 BUILD_OPTIONS += $(call ignore_implicit,USE_REGPARM)
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
419 endif
420
f32d19a [CLEANUP] report dlmalloc's source path only if explictly specified
Willy Tarreau authored
421 # report DLMALLOC_SRC only if explicitly specified
422 ifneq ($(DLMALLOC_SRC),)
423 BUILD_OPTIONS += DLMALLOC_SRC=$(DLMALLOC_SRC)
424 endif
425
f14358b [BUILD] ensure that makefile understands USE_DLMALLOC=1
Willy Tarreau authored
426 ifneq ($(USE_DLMALLOC),)
427 BUILD_OPTIONS += $(call ignore_implicit,USE_DLMALLOC)
428 ifeq ($(DLMALLOC_SRC),)
429 DLMALLOC_SRC=src/dlmalloc.c
430 endif
431 endif
432
f2ef8c5 [MEDIUM] Added easier support for Doug Lea's malloc (dlmalloc)
Willy Tarreau authored
433 ifneq ($(DLMALLOC_SRC),)
f32d19a [CLEANUP] report dlmalloc's source path only if explictly specified
Willy Tarreau authored
434 # DLMALLOC_THRES may be changed to match PAGE_SIZE on every platform
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
435 DLMALLOC_THRES = 4096
436 OPTIONS_OBJS += src/dlmalloc.o
f2ef8c5 [MEDIUM] Added easier support for Doug Lea's malloc (dlmalloc)
Willy Tarreau authored
437 endif
438
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
439 ifneq ($(USE_PCRE),)
440 # PCREDIR is the directory hosting include/pcre.h and lib/libpcre.*. It is
32d0272 BUILD: make it possible to look for pcre in the default system paths
Willy Tarreau authored
441 # automatically detected but can be forced if required. Forcing it to an empty
442 # string will result in search only in the default paths.
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
443 ifeq ($(PCREDIR),)
444 PCREDIR := $(shell pcre-config --prefix 2>/dev/null || echo /usr/local)
79b34bf [BUILD] version and date now come from the makefile
Willy Tarreau authored
445 endif
c820300 @morfoh [BUILD] Fixed Makefile for linking pcre
morfoh authored
446 ifeq ($(USE_STATIC_PCRE),)
32d0272 BUILD: make it possible to look for pcre in the default system paths
Willy Tarreau authored
447 OPTIONS_CFLAGS += -DUSE_PCRE $(if $(PCREDIR),-I$(PCREDIR)/include)
448 OPTIONS_LDFLAGS += $(if $(PCREDIR),-L$(PCREDIR)/lib) -lpcreposix -lpcre
c820300 @morfoh [BUILD] Fixed Makefile for linking pcre
morfoh authored
449 endif
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
450 BUILD_OPTIONS += $(call ignore_implicit,USE_PCRE)
79b34bf [BUILD] version and date now come from the makefile
Willy Tarreau authored
451 endif
452
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
453 ifneq ($(USE_STATIC_PCRE),)
454 # PCREDIR is the directory hosting include/pcre.h and lib/libpcre.*. It is
455 # automatically detected but can be forced if required.
456 ifeq ($(PCREDIR),)
457 PCREDIR := $(shell pcre-config --prefix 2>/dev/null || echo /usr/local)
458 endif
32d0272 BUILD: make it possible to look for pcre in the default system paths
Willy Tarreau authored
459 OPTIONS_CFLAGS += -DUSE_PCRE $(if $(PCREDIR),-I$(PCREDIR)/include)
460 OPTIONS_LDFLAGS += $(if $(PCREDIR),-L$(PCREDIR)/lib) -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
461 BUILD_OPTIONS += $(call ignore_implicit,USE_STATIC_PCRE)
462 endif
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
463
45cb4fb [MEDIUM] build: switch ebtree users to use new ebtree version
Willy Tarreau authored
464 # This one can be changed to look for ebtree files in an external directory
465 EBTREE_DIR := ebtree
77074d5 [MAJOR] support for source binding via cttproxy
Willy Tarreau authored
466
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
467 #### Global compile options
468 VERBOSE_CFLAGS = $(CFLAGS) $(TARGET_CFLAGS) $(SMALL_OPTS) $(DEFINE)
45cb4fb [MEDIUM] build: switch ebtree users to use new ebtree version
Willy Tarreau authored
469 COPTS = -Iinclude -I$(EBTREE_DIR) -Wall
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
470 COPTS += $(CFLAGS) $(TARGET_CFLAGS) $(SMALL_OPTS) $(DEFINE) $(SILENT_DEFINE)
471 COPTS += $(DEBUG) $(OPTIONS_CFLAGS) $(ADDINC)
eedaa9f * released 1.1.23
willy tarreau authored
472
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
473 ifneq ($(VERSION)$(SUBVERS),)
474 COPTS += -DCONFIG_HAPROXY_VERSION=\"$(VERSION)$(SUBVERS)\"
475 endif
6d1a988 [MAJOR] complete support and doc for tcp-splicing
Willy Tarreau authored
476
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
477 ifneq ($(VERDATE),)
478 COPTS += -DCONFIG_HAPROXY_DATE=\"$(VERDATE)\"
6d1a988 [MAJOR] complete support and doc for tcp-splicing
Willy Tarreau authored
479 endif
480
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
481 #### Global link options
482 # These options are added at the end of the "ld" command line. Use LDFLAGS to
483 # add options at the beginning of the "ld" command line if needed.
484 LDOPTS = $(TARGET_LDFLAGS) $(OPTIONS_LDFLAGS) $(ADDLIB)
9da061b * updated to version 1.0.2
willy tarreau authored
485
e4208cb [BUILD] ensure that users don't build without setting the target anymore...
Willy Tarreau authored
486 ifeq ($(TARGET),)
487 all:
488 @echo
489 @echo "Due to too many reports of suboptimized setups, building without"
490 @echo "specifying the target is no longer supported. Please specify the"
491 @echo "target OS in the TARGET variable, in the following form:"
492 @echo
493 @echo " $ make TARGET=xxx"
494 @echo
495 @echo "Please choose the target among the following supported list :"
496 @echo
b181465 [BUILD] makefile: remove unused references to linux24eold and EPOLL_CTL_...
Willy Tarreau authored
497 @echo " linux26, linux24, linux24e, linux22, solaris"
3208731 [BUILD] add support for build under Cygwin
Yitzhak Sapir authored
498 @echo " freebsd, openbsd, cygwin, custom, generic"
e4208cb [BUILD] ensure that users don't build without setting the target anymore...
Willy Tarreau authored
499 @echo
500 @echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
501 @echo "want to precisely tweak every option, or choose the target which"
502 @echo "matches your OS the most in order to gain the maximum performance"
503 @echo "out of it. Please check the Makefile in case of doubts."
504 @echo
505 @exit 1
506 else
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
507 all: haproxy
e4208cb [BUILD] ensure that users don't build without setting the target anymore...
Willy Tarreau authored
508 endif
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
509
dd81598 [MAJOR] added generic protocol support
Willy Tarreau authored
510 OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
baaee00 [BIGMOVE] exploded the monolithic haproxy.c file into multiple files.
Willy Tarreau authored
511 src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \
982b6e3 [MEDIUM] introduce pipe pools
Willy Tarreau authored
512 src/time.o src/fd.o src/pipe.o src/regex.o src/cfgparse.o src/server.o \
2b920a1 [MAJOR] Add new files src/peer.c, include/proto/peers.h and include/type...
Emeric Brun authored
513 src/checks.o src/queue.o src/frontend.o src/proxy.o src/peers.o \
514 src/stick_table.o src/proto_uxst.o \
baaee00 [BIGMOVE] exploded the monolithic haproxy.c file into multiple files.
Willy Tarreau authored
515 src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \
f09c660 MEDIUM: backend: add the 'first' balancing algorithm
Willy Tarreau authored
516 src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o src/lb_fas.o \
dded32d [MINOR] replace client_retnclose() with stream_int_retnclose()
Willy Tarreau authored
517 src/stream_interface.o src/dumpstats.o src/proto_tcp.o \
bc5258d [BUILD] add signal.o to all makefiles
Willy Tarreau authored
518 src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \
9610504 [MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki authored
519 src/acl.o src/pattern.o src/memory.o src/freq_ctr.o src/auth.o
baaee00 [BIGMOVE] exploded the monolithic haproxy.c file into multiple files.
Willy Tarreau authored
520
45cb4fb [MEDIUM] build: switch ebtree users to use new ebtree version
Willy Tarreau authored
521 EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o \
522 $(EBTREE_DIR)/eb32tree.o $(EBTREE_DIR)/eb64tree.o \
523 $(EBTREE_DIR)/ebmbtree.o $(EBTREE_DIR)/ebsttree.o \
524 $(EBTREE_DIR)/ebimtree.o $(EBTREE_DIR)/ebistree.o
525
526 # Not used right now
527 LIB_EBTREE = $(EBTREE_DIR)/libebtree.a
528
529 haproxy: $(OBJS) $(OPTIONS_OBJS) $(EBTREE_OBJS)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
530 $(LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
531
45cb4fb [MEDIUM] build: switch ebtree users to use new ebtree version
Willy Tarreau authored
532 $(LIB_EBTREE): $(EBTREE_OBJS)
533 $(AR) rv $@ $^
534
baaee00 [BIGMOVE] exploded the monolithic haproxy.c file into multiple files.
Willy Tarreau authored
535 objsize: haproxy
536 @objdump -t $^|grep ' g '|grep -F '.text'|awk '{print $$5 FS $$6}'|sort
537
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
538 %.o: %.c
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
539 $(CC) $(COPTS) -c -o $@ $<
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
540
7b066db [MINOR] store the build options to report with -vv
Willy Tarreau authored
541 src/haproxy.o: src/haproxy.c
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
542 $(CC) $(COPTS) \
543 -DBUILD_TARGET='"$(strip $(TARGET))"' \
ef7341d [BUILD] make it possible to pass alternative arch at build time
Willy Tarreau authored
544 -DBUILD_ARCH='"$(strip $(ARCH))"' \
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
545 -DBUILD_CPU='"$(strip $(CPU))"' \
546 -DBUILD_CC='"$(strip $(CC))"' \
547 -DBUILD_CFLAGS='"$(strip $(VERBOSE_CFLAGS))"' \
548 -DBUILD_OPTIONS='"$(strip $(BUILD_OPTIONS))"' \
549 -c -o $@ $<
7b066db [MINOR] store the build options to report with -vv
Willy Tarreau authored
550
f2ef8c5 [MEDIUM] Added easier support for Doug Lea's malloc (dlmalloc)
Willy Tarreau authored
551 src/dlmalloc.o: $(DLMALLOC_SRC)
9f2b730 [BUILD] major rework of the GNU Makefile
Willy Tarreau authored
552 $(CC) $(COPTS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
f2ef8c5 [MEDIUM] Added easier support for Doug Lea's malloc (dlmalloc)
Willy Tarreau authored
553
19b5029 @morfoh [BUILD] Added 'install-man' make target for installing the man page
morfoh authored
554 install-man:
ce8f342 @morfoh [BUILD] Removed "/" after '$(DESTDIR)' in install targets
morfoh authored
555 install -d $(DESTDIR)$(MANDIR)/man1
556 install -m 644 doc/haproxy.1 $(DESTDIR)$(MANDIR)/man1
19b5029 @morfoh [BUILD] Added 'install-man' make target for installing the man page
morfoh authored
557
bf34eb4 @morfoh [BUILD] Added 'install-doc' make target
morfoh authored
558 install-doc:
ce8f342 @morfoh [BUILD] Removed "/" after '$(DESTDIR)' in install targets
morfoh authored
559 install -d $(DESTDIR)$(DOCDIR)
bf34eb4 @morfoh [BUILD] Added 'install-doc' make target
morfoh authored
560 for x in configuration architecture haproxy-en haproxy-fr; do \
ce8f342 @morfoh [BUILD] Removed "/" after '$(DESTDIR)' in install targets
morfoh authored
561 install -m 644 doc/$$x.txt $(DESTDIR)$(DOCDIR) ; \
bf34eb4 @morfoh [BUILD] Added 'install-doc' make target
morfoh authored
562 done
563
e9bc01e [BUILD] make install should depend on haproxy not "all"
Willy Tarreau authored
564 install-bin: haproxy
ce8f342 @morfoh [BUILD] Removed "/" after '$(DESTDIR)' in install targets
morfoh authored
565 install -d $(DESTDIR)$(SBINDIR)
566 install haproxy $(DESTDIR)$(SBINDIR)
a184aa2 @morfoh [BUILD] Added support for 'make install'
morfoh authored
567
db5238d @morfoh [BUILD] Changed 'install' target to install the binaries first
morfoh authored
568 install: install-bin install-man install-doc
4cf5d57 @morfoh [BUILD] Added 'install-bin' make target
morfoh authored
569
0f7af91 * initial commit of version 1.0.0
willy tarreau authored
570 clean:
45cb4fb [MEDIUM] build: switch ebtree users to use new ebtree version
Willy Tarreau authored
571 rm -f *.[oas] src/*.[oas] ebtree/*.[oas] haproxy test
572 for dir in . src include/* doc ebtree; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done
9bf6c6e [BUILD] makefile now detects and uses git to set the version
Willy Tarreau authored
573 rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS).tar.gz
574 rm -f haproxy-$(VERSION) nohup.out gmon.out
efae184 * released 1.1.1
willy tarreau authored
575
ebe0af4 [BUILD] add a 'make tags' target
Willy Tarreau authored
576 tags:
42d2c6c [BUILD] 'make tags' did not consider files ending in '.c'
Willy Tarreau authored
577 find src include \( -name '*.c' -o -name '*.h' \) -print0 | \
ebe0af4 [BUILD] add a 'make tags' target
Willy Tarreau authored
578 xargs -0 etags --declarations --members
579
e114bf9 cleaned the 'tar' target and allowed the 'clean' target to remove the ta...
willy tarreau authored
580 tar: clean
cee272f Added the 'tar' target to build the tar.gz archive directly from git.
willy tarreau authored
581 ln -s . haproxy-$(VERSION)
baaee00 [BIGMOVE] exploded the monolithic haproxy.c file into multiple files.
Willy Tarreau authored
582 tar --exclude=haproxy-$(VERSION)/.git \
583 --exclude=haproxy-$(VERSION)/haproxy-$(VERSION) \
584 --exclude=haproxy-$(VERSION)/haproxy-$(VERSION).tar.gz \
585 -cf - haproxy-$(VERSION)/* | gzip -c9 >haproxy-$(VERSION).tar.gz
cee272f Added the 'tar' target to build the tar.gz archive directly from git.
willy tarreau authored
586 rm -f haproxy-$(VERSION)
587
9f0a901 [BUILD] added the 'git-tar' target to the Makefile
Willy Tarreau authored
588 git-tar: clean
63076b3 [BUILD] use "git cmd" instead of "git-cmd"
Willy Tarreau authored
589 git archive --format=tar --prefix="haproxy-$(VERSION)/" HEAD | gzip -9 > haproxy-$(VERSION)$(SUBVERS).tar.gz
ec69256 [BUILD] centralize version and date into one file for each
Willy Tarreau authored
590
591 version:
592 @echo "VERSION: $(VERSION)"
593 @echo "SUBVERS: $(SUBVERS)"
594 @echo "VERDATE: $(VERDATE)"
595
596 # never use this one if you don't know what it is used for.
597 update-version:
598 @echo "Ready to update the following versions :"
599 @echo "VERSION: $(VERSION)"
600 @echo "SUBVERS: $(SUBVERS)"
601 @echo "VERDATE: $(VERDATE)"
602 @echo "Press [ENTER] to continue or Ctrl-C to abort now.";read
603 echo "$(VERSION)" > VERSION
604 echo "$(SUBVERS)" > SUBVERS
605 echo "$(VERDATE)" > VERDATE
Something went wrong with that request. Please try again.