Makefile.toolchain: Add TEST_FUZZ checks.
This prevents a bunch of warnings that show when trying to run
pkg-config for libprotobuf-mutator when not building the fuzzer
targets.
BRANCH=None
TEST=make -j buildall
@@ -106,6 +106,7 @@ endif
LIBFTDI_CFLAGS:=$(shell $(PKG_CONFIG) --cflags lib${LIBFTDI_NAME})
LIBFTDI_LDLIBS:=$(shell $(PKG_CONFIG) --libs lib${LIBFTDI_NAME})
+ifeq ($(TEST_FUZZ),y)
LIBPROTOBUF_CFLAGS:=$(shell $(PKG_CONFIG) --cflags protobuf)
LIBPROTOBUF_LDLIBS:=$(shell $(PKG_CONFIG) --libs protobuf)
@@ -113,6 +114,7 @@ LIBPROTOBUF_MUTATOR_CFLAGS:=${LIBPROTOBUF_CFLAGS} \
$(shell $(PKG_CONFIG) --cflags libprotobuf-mutator)
LIBPROTOBUF_MUTATOR_LDLIBS:=$(shell $(PKG_CONFIG) --libs libprotobuf-mutator) \
${LIBPROTOBUF_LDLIBS}
+endif
BUILD_CFLAGS= $(LIBFTDI_CFLAGS) $(BUILD_CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
HOST_CFLAGS=$(HOST_CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN) -DHOST_TOOLS_BUILD
