mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
We are reusing DEVICEATLAS_INC/DEVICEATLAS_LIB when the DeviceAtlas library had been compiled and installed with cmake and make install targets. Works fine except when ldconfig is unaware of the path, thus adding cflags/ldflags into the mix. Ideally, to be backported down to the lowest stable branch.
33 lines
1.0 KiB
Makefile
33 lines
1.0 KiB
Makefile
# DEVICEATLAS_SRC : DeviceAtlas API source root path
|
|
|
|
|
|
CXX := c++
|
|
CXXLIB := -lstdc++
|
|
|
|
ifeq ($(DEVICEATLAS_SRC),)
|
|
OPTIONS_CFLAGS += -I$(DEVICEATLAS_INC)
|
|
OPTIONS_LDFLAGS += -Wl,-rpath,$(DEVICEATLAS_LIB) -L$(DEVICEATLAS_LIB) -lda
|
|
else
|
|
DEVICEATLAS_INC = $(DEVICEATLAS_SRC)
|
|
DEVICEATLAS_LIB = $(DEVICEATLAS_SRC)
|
|
OPTIONS_LDFLAGS += -lpthread
|
|
OPTIONS_CFLAGS += -I$(DEVICEATLAS_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 $@ $<
|