# USE_DL : enable it if your system requires -ldl. Automatic on Linux.
# USE_RT : enable it if your system requires -lrt. Automatic on Linux.
# USE_BACKTRACE : enable backtrace(). Automatic on Linux.
+# USE_PROMEX : enable the Prometheus exporter
# USE_DEVICEATLAS : enable DeviceAtlas api.
# USE_51DEGREES : enable third party device detection library from 51Degrees
# USE_WURFL : enable WURFL detection library from Scientiamobile
USE_CLOSEFROM USE_ZLIB USE_SLZ USE_CPU_AFFINITY USE_TFO USE_NS \
USE_DL USE_RT USE_DEVICEATLAS USE_51DEGREES USE_WURFL USE_SYSTEMD \
USE_OBSOLETE_LINKER USE_PRCTL USE_THREAD_DUMP USE_EVPORTS USE_OT \
- USE_QUIC
+ USE_QUIC USE_PROMEX
#### Target system options
# Depending on the target platform, some options are set, as well as some
OPTIONS_OBJS += src/hlua.o src/hlua_fcn.o
endif
+ifneq ($(USE_PROMEX),)
+OPTIONS_OBJS += contrib/prometheus-exporter/service-prometheus.o
+endif
+
ifneq ($(USE_DEVICEATLAS),)
# Use DEVICEATLAS_SRC and possibly DEVICEATLAS_INC and DEVICEATLAS_LIB to force path
# to DeviceAtlas headers and libraries if needed.
However, PROMEX is not built by default with HAProxy. It is provided as an extra
component for everyone want to use it. So you need to explicitly build HAProxy
-with the PROMEX service, using the Makefile variable "EXTRA_OBJS". For instance:
+with the PROMEX service, setting the Makefile variable "USE_PROMEX" to "1". For
+instance:
- > make TARGET=linux-glibc EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
+ > make TARGET=linux-glibc USE_PROMEX=1
if HAProxy provides the PROMEX service, the following build option will be
reported by the command "haproxy -vv":