summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2018-11-13 10:08:40 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-11-15 13:16:06 -0800
commit72a29e834d035c29e5127ad9dfba76d0ba06e694 (patch)
tree5e2c7831b4185ed521d6fe9fb43332ada5bd0336
parent1c95cff7463ef29bd0c6d087ce8c3d7e17f94c6a (diff)
downloadchrome-ec-72a29e834d035c29e5127ad9dfba76d0ba06e694.tar.gz
Makefile.toolchain: Add vars for libprotobuf-mutator.
libprotobuf-mutator is a helper library for fuzzing using protocol buffers. BRANCH=None BUG=None TEST=make -j buildfuzztests && make -j buildall Change-Id: I855691860042bdbdeafe68cc0e0d7bea0f2667cc Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/1334030 Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rw-r--r--Makefile.toolchain14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 20a01ebb43..fb2f9b3f1f 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -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