BUILD: only build the systemd wrapper on Linux 2.6 and above
Attempting to build haproxy-systemd-wrapper on non-linux platforms sometimes results in build errors. Better move it into an EXTRA variable which is set to haproxy-systemd-wrapper only on Linux 2.6 and above. Proceeding this way also allows to disable building it in quick builds (eg: when developing).
This commit is contained in:
parent
6346f0a534
commit
bc289da0c7
10
Makefile
10
Makefile
|
@ -52,6 +52,8 @@
|
||||||
# by "haproxy -vv" in CFLAGS.
|
# by "haproxy -vv" in CFLAGS.
|
||||||
# SILENT_DEFINE may be used to specify other defines which will not be
|
# SILENT_DEFINE may be used to specify other defines which will not be
|
||||||
# reported by "haproxy -vv".
|
# reported by "haproxy -vv".
|
||||||
|
# EXTRA is used to force building or not building some extra tools. By
|
||||||
|
# default on Linux 2.6+, it contains "haproxy-systemd-wrapper".
|
||||||
# DESTDIR is not set by default and is used for installation only.
|
# DESTDIR is not set by default and is used for installation only.
|
||||||
# It might be useful to set DESTDIR if you want to install haproxy
|
# It might be useful to set DESTDIR if you want to install haproxy
|
||||||
# in a sandbox.
|
# in a sandbox.
|
||||||
|
@ -157,6 +159,10 @@ ADDLIB =
|
||||||
DEFINE =
|
DEFINE =
|
||||||
SILENT_DEFINE =
|
SILENT_DEFINE =
|
||||||
|
|
||||||
|
#### extra programs to build (eg: haproxy-systemd-wrapper)
|
||||||
|
# Force this to enable building extra programs or to disable them.
|
||||||
|
# It's automatically appended depending on the targets.
|
||||||
|
EXTRA =
|
||||||
|
|
||||||
#### CPU dependant optimizations
|
#### CPU dependant optimizations
|
||||||
# Some CFLAGS are set by default depending on the target CPU. Those flags only
|
# Some CFLAGS are set by default depending on the target CPU. Those flags only
|
||||||
|
@ -239,6 +245,7 @@ ifeq ($(TARGET),linux26)
|
||||||
USE_TPROXY = implicit
|
USE_TPROXY = implicit
|
||||||
USE_LIBCRYPT = implicit
|
USE_LIBCRYPT = implicit
|
||||||
USE_FUTEX = implicit
|
USE_FUTEX = implicit
|
||||||
|
EXTRA += haproxy-systemd-wrapper
|
||||||
else
|
else
|
||||||
ifeq ($(TARGET),linux2628)
|
ifeq ($(TARGET),linux2628)
|
||||||
# This is for standard Linux >= 2.6.28 with netfilter, epoll, tproxy and splice
|
# This is for standard Linux >= 2.6.28 with netfilter, epoll, tproxy and splice
|
||||||
|
@ -254,6 +261,7 @@ ifeq ($(TARGET),linux2628)
|
||||||
USE_FUTEX = implicit
|
USE_FUTEX = implicit
|
||||||
USE_CPU_AFFINITY= implicit
|
USE_CPU_AFFINITY= implicit
|
||||||
ASSUME_SPLICE_WORKS= implicit
|
ASSUME_SPLICE_WORKS= implicit
|
||||||
|
EXTRA += haproxy-systemd-wrapper
|
||||||
else
|
else
|
||||||
ifeq ($(TARGET),solaris)
|
ifeq ($(TARGET),solaris)
|
||||||
# This is for Solaris 8
|
# This is for Solaris 8
|
||||||
|
@ -635,7 +643,7 @@ all:
|
||||||
@echo
|
@echo
|
||||||
@exit 1
|
@exit 1
|
||||||
else
|
else
|
||||||
all: haproxy haproxy-systemd-wrapper
|
all: haproxy $(EXTRA)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocol.o \
|
OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocol.o \
|
||||||
|
|
Loading…
Reference in New Issue