Makefile.toolchain: Add vars for libprotobuf-mutator.
libprotobuf-mutator is a helper library for fuzzing using protocol
buffers.
BRANCH=None
TEST=make -j buildfuzztests && make -j buildall
@@ -96,15 +96,23 @@ endif
CFLAGS+= -DCHROMIUM_EC
CXXFLAGS+=-DPROTOBUF_INLINE_NOT_IN_HEADERS=0
-FTDIVERSION=$(shell $(PKG_CONFIG) --modversion libftdi1 2>/dev/null)
+FTDIVERSION:=$(shell $(PKG_CONFIG) --modversion libftdi1 2>/dev/null)
ifneq ($(FTDIVERSION),)
LIBFTDI_NAME=ftdi1
else
LIBFTDI_NAME=ftdi
endif
-LIBFTDI_CFLAGS=$(shell $(PKG_CONFIG) --cflags lib${LIBFTDI_NAME})
-LIBFTDI_LDLIBS=$(shell $(PKG_CONFIG) --libs lib${LIBFTDI_NAME})
+LIBFTDI_CFLAGS:=$(shell $(PKG_CONFIG) --cflags lib${LIBFTDI_NAME})
+LIBFTDI_LDLIBS:=$(shell $(PKG_CONFIG) --libs lib${LIBFTDI_NAME})
+
+LIBPROTOBUF_CFLAGS:=$(shell $(PKG_CONFIG) --cflags protobuf)
+LIBPROTOBUF_LDLIBS:=$(shell $(PKG_CONFIG) --libs protobuf)
+
+LIBPROTOBUF_MUTATOR_CFLAGS:=${LIBPROTOBUF_CFLAGS} \
+ $(shell $(PKG_CONFIG) --cflags libprotobuf-mutator)
+LIBPROTOBUF_MUTATOR_LDLIBS:=$(shell $(PKG_CONFIG) --libs libprotobuf-mutator) \
+ ${LIBPROTOBUF_LDLIBS}
BUILD_CFLAGS= $(LIBFTDI_CFLAGS) $(BUILD_CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
HOST_CFLAGS=$(HOST_CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN) -DHOST_TOOLS_BUILD
