From a03fb1433de06a64972459405488ddc3aea4c27b Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 1 Jun 2015 14:00:07 +0200 Subject: [PATCH] BUILD: Makefile: add options to build with DeviceAtlas This diff updates the Makefile to compile conditionally via some new sets of flags, USE_DEVICEATLAS to enable the module and the couple DEVICEATLAS_INC/DEVICEATLAS_LIB which needs to point to the API root folder in order to compile the API and the module. --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index c0f4cb3b3..0aa48a7e8 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,7 @@ # USE_TFO : enable TCP fast open. Supported on Linux >= 3.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. # # Options can be forced by specifying "USE_xxx=1" or can be disabled by using # "USE_xxx=" (empty string). @@ -600,6 +601,16 @@ OPTIONS_LDFLAGS += $(LUA_LD_FLAGS) -l$(LUA_LIB_NAME) -lm OPTIONS_OBJS += src/hlua.o endif +ifneq ($(USE_DEVICEATLAS),) +DEVICEATLAS_INC = +DEVICEATLAS_LIB = +OPTIONS_OBJS += $(DEVICEATLAS_LIB)/json.o +OPTIONS_OBJS += $(DEVICEATLAS_LIB)/dac.o +OPTIONS_OBJS += src/da.o +OPTIONS_CFLAGS += -DUSE_DEVICEATLAS $(if $(DEVICEATLAS_INC),-I$(DEVICEATLAS_INC)) +BUILD_OPTIONS += $(call ignore_implicit,USE_DEVICEATLAS) +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