MINOR: build: Allow linking to device-atlas library file

DeviceAtlas might be installed in a location where a user might not have
enough permissions to write json.o and dac.o
This commit is contained in:
Bertrand Jacquin 2016-10-06 00:32:39 +01:00 committed by Willy Tarreau
parent ef393a62d8
commit 3a2661d6b4
1 changed files with 4 additions and 0 deletions

View File

@ -623,8 +623,12 @@ endif
DEVICEATLAS_SRC = DEVICEATLAS_SRC =
DEVICEATLAS_INC = $(DEVICEATLAS_SRC) DEVICEATLAS_INC = $(DEVICEATLAS_SRC)
DEVICEATLAS_LIB = $(DEVICEATLAS_SRC) DEVICEATLAS_LIB = $(DEVICEATLAS_SRC)
ifeq ($(DEVICEATLAS_SRC),)
OPTIONS_LDFLAGS += -lda
else
OPTIONS_OBJS += $(DEVICEATLAS_LIB)/json.o OPTIONS_OBJS += $(DEVICEATLAS_LIB)/json.o
OPTIONS_OBJS += $(DEVICEATLAS_LIB)/dac.o OPTIONS_OBJS += $(DEVICEATLAS_LIB)/dac.o
endif
OPTIONS_OBJS += src/da.o OPTIONS_OBJS += src/da.o
OPTIONS_CFLAGS += -DUSE_DEVICEATLAS $(if $(DEVICEATLAS_INC),-I$(DEVICEATLAS_INC)) OPTIONS_CFLAGS += -DUSE_DEVICEATLAS $(if $(DEVICEATLAS_INC),-I$(DEVICEATLAS_INC))
BUILD_OPTIONS += $(call ignore_implicit,USE_DEVICEATLAS) BUILD_OPTIONS += $(call ignore_implicit,USE_DEVICEATLAS)