-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathPrometheus-Support.mk
More file actions
26 lines (20 loc) · 841 Bytes
/
Prometheus-Support.mk
File metadata and controls
26 lines (20 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
# Includes flags and libraries to compile&link with "prometheus-cpp" library
# https://github.com/f18m/cmonitor
# Francesco Montorsi (c) 2019
#
ifeq ($(PROMETHEUS_SUPPORT),1)
$(info INFO: Prometheus support is ENABLED)
ifeq ($(wildcard $(ROOT_DIR)/conandeps.mk),)
$(error Please run 'conan install . --build=missing' first)
endif
# include prometheus-cpp depedency through the GNU make variables provided by Conan at install time
# NOTE: for some reason "dl pthread" libraries must be explicitly listed
include $(ROOT_DIR)/conandeps.mk
LIBS += $(foreach libdir,$(CONAN_LIB_DIRS),-L$(libdir)) $(foreach lib,$(CONAN_LIBS),-l$(lib)) -ldl -lpthread
CXXFLAGS += $(CONAN_CXXFLAGS) -I$(CONAN_INCLUDE_DIRS_PROMETHEUS_CPP)
DEFS += -DPROMETHEUS_SUPPORT=1
else
$(info INFO: Prometheus support is DISABLED)
DEFS += -DNO_PROMETHEUS_SUPPORT
endif