summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.toolchain')
-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