mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-06 05:22:10 +00:00
BUILD/MEDIUM: deviceatlas: addon build rework.
- Removing the legacy v2 support, which in turn suppress the need to set a regex engine. - Moving the options and addon into its distrinct build unit, cleaning up the main one in the process. - Adding a new option to disable the cache if desired or if having a C++ toolchain is not a possibility.
This commit is contained in:
parent
e5ac9fc98b
commit
9cfd6c8f8e
38
addons/deviceatlas/Makefile.inc
Normal file
38
addons/deviceatlas/Makefile.inc
Normal file
@ -0,0 +1,38 @@
|
||||
# DEVICEATLAS_SRC : DeviceAtlas API source root path
|
||||
|
||||
|
||||
CXX := c++
|
||||
CXXLIB := -lstdc++
|
||||
|
||||
CURL_CONFIG := curl-config
|
||||
CURLDIR := $(shell $(CURL_CONFIG) --prefix 2>/dev/null || echo /usr/local)
|
||||
CURL_INC := $(CURLDIR)/include
|
||||
CURL_LIB := $(CURLDIR)/lib
|
||||
CURL_LDFLAGS := $(shell $(CURL_CONFIG) --libs 2>/dev/null || echo -L /usr/local/lib -lcurl)
|
||||
|
||||
ifeq ($(DEVICEATLAS_SRC),)
|
||||
OPTIONS_LDFLAGS += -lda
|
||||
else
|
||||
DEVICEATLAS_INC = $(DEVICEATLAS_SRC)
|
||||
DEVICEATLAS_LIB = $(DEVICEATLAS_SRC)
|
||||
OPTIONS_LDFLAGS += $(CURL_LDFLAGS) -lz -lzip -lpthread
|
||||
OPTIONS_CFLAGS += -DDATLAS_CURL -DDATLAS_CURLSSET -DDATLAS_GZ -DDATLAS_ZIP
|
||||
OPTIONS_CFLAGS += -I$(DEVICEATLAS_INC) -I$(CURL_INC)
|
||||
ifeq ($(DEVICEATLAS_NOCACHE),)
|
||||
CXXFLAGS := $(OPTIONS_CFLAGS) -std=gnu++11
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/dacache.o
|
||||
OPTIONS_LDFLAGS += $(CXXLIB)
|
||||
else
|
||||
OPTIONS_CFLAGS += -DAPINOCACHE
|
||||
endif
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/dac.o
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/json.o
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/dasch.o
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/dadwarc.o
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/dadwcom.o
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/dadwcurl.o
|
||||
OPTIONS_OBJS += $(DEVICEATLAS_SRC)/Os/daunix.o
|
||||
endif
|
||||
|
||||
addons/deviceatlas/dummy/%.o: addons/deviceatlas/dummy/%.cpp
|
||||
$(cmd_CXX) $(CXXFLAGS) -c -o $@ $<
|
Loading…
Reference in New Issue
Block a user