tools: acrn-crashlog: compile without telemetrics client

Define a macro HAVE_TELEMETRICS_CLIENT to distinguish the compiling
environment which is not include telemetrics client.

Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Jack Ren <jack.ren@intel.com>
This commit is contained in:
Liu, Xinwu
2018-05-23 19:33:59 +08:00
committed by Jack Ren
parent a9e36bdb4e
commit 05927b1592
5 changed files with 22 additions and 7 deletions

View File

@@ -19,15 +19,20 @@ export INCLUDE
export BUILDDIR
export CC
export RM
export CFLAGS
SYSTEMD_LIBS = -lsystemd
EXTRA_LIBS = -lsystemd
LDCNF := $(shell ldconfig -p)
LIB_EXIST = $(findstring libsystemd-journal.so, $(LDCNF))
ifeq ($(strip $(LIB_EXIST)),libsystemd-journal.so)
SYSTEMD_LIBS = -lsystemd-journal
EXTRA_LIBS = -lsystemd-journal
endif
export SYSTEMD_LIBS
LIB_EXIST = $(findstring libtelemetry.so, $(LDCNF))
ifeq ($(strip $(LIB_EXIST)),libtelemetryxx.so)
CFLAGS += -DHAVE_TELEMETRICS_CLIENT
EXTRA_LIBS += -ltelemetry
endif
export CFLAGS
export EXTRA_LIBS
.PHONY:all
all: