From 0ca65f8217669640f3f93c32aaa84b8b8e9587f9 Mon Sep 17 00:00:00 2001 From: Thomas Holmes Date: Tue, 12 May 2015 15:06:21 +0100 Subject: [PATCH] BUILD: add 51degrees options to makefile. To build with 51Degrees set USE_51DEGREES=1. 51DEGREES_INC, 51DEGREES_LIB, and 51DEGREES_SRC will need to be set to the 51Degrees pattern header and C file. --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 0aa48a7e8e..c353b039c6 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ # USE_NS : enable network namespace support. Supported on Linux >= 2.6.24. # USE_DL : enable it if your system requires -ldl. Automatic on Linux. # USE_DEVICEATLAS : enable DeviceAtlas api. +# USE_51DEGREES : enable third party device detection library from 51degrees # # Options can be forced by specifying "USE_xxx=1" or can be disabled by using # "USE_xxx=" (empty string). @@ -611,6 +612,15 @@ OPTIONS_CFLAGS += -DUSE_DEVICEATLAS $(if $(DEVICEATLAS_INC),-I$(DEVICEATLAS_INC) BUILD_OPTIONS += $(call ignore_implicit,USE_DEVICEATLAS) endif +ifneq ($(USE_51DEGREES),) +# Use 51DEGREES_INC and 51DEGREES_LIB to force path to 51degrees headers and libraries if needed. +51DEGREES_INC = +51DEGREES_LIB = +OPTIONS_CFLAGS += -DUSE_51DEGREES $(if $(51DEGREES_INC),-I$(51DEGREES_INC)) +BUILD_OPTIONS += $(call ignore_implicit,USE_51DEGREES) +OPTIONS_LDFLAGS += $(if $(51DEGREES_LIB),-L$(51DEGREES_LIB)) -lz +endif + ifneq ($(USE_PCRE)$(USE_STATIC_PCRE)$(USE_PCRE_JIT),) # PCREDIR is used to automatically construct the PCRE_INC and PCRE_LIB paths, # by appending /include and /lib respectively. If your system does not use the @@ -729,6 +739,10 @@ ifneq ($(TRACE),) OBJS += src/trace.o endif +ifneq ($(USE_51DEGREES),) +OBJS += $(51DEGREES_SRC)/51Degrees.o +endif + WRAPPER_OBJS = src/haproxy-systemd-wrapper.o # Not used right now