]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: build: Allow linking to device-atlas library file
authorBertrand Jacquin <bertrand@jacquin.bzh>
Wed, 5 Oct 2016 23:32:39 +0000 (00:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Oct 2016 20:15:22 +0000 (22:15 +0200)
DeviceAtlas might be installed in a location where a user might not have
enough permissions to write json.o and dac.o

Makefile

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