From: Vicky Shrestha Date: Mon, 26 Dec 2016 08:05:49 +0000 (-0800) Subject: fixing makefile to compile protobuf if dnstap is enabled X-Git-Tag: v1.3.0~23^2~62^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfe5d23a7f2b0e2c0a2c374dda6ec298c9d14c6a;p=thirdparty%2Fknot-resolver.git fixing makefile to compile protobuf if dnstap is enabled --- diff --git a/Makefile b/Makefile index 167fbde70..88cb655bc 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ endif endif # check for fstrm and protobuf for dnstap -ifeq ($(HAS_libfstrm)&$(HAS_libprotobuf-c),yes&yes) +ifeq ($(HAS_libfstrm)|$(HAS_libprotobuf-c),yes|yes) BUILD_CFLAGS += -DENABLE_DNSTAP ENABLE_DNSTAP := yes endif diff --git a/contrib/contrib.mk b/contrib/contrib.mk index 3cb685c5b..bebb472bc 100644 --- a/contrib/contrib.mk +++ b/contrib/contrib.mk @@ -6,8 +6,7 @@ contrib_SOURCES := \ contrib/ucw/mempool.c \ contrib/murmurhash3/murmurhash3.c \ contrib/base32hex.c \ - contrib/base64.c \ - contrib/dnstap/dnstap.pb-c.c + contrib/base64.c contrib_CFLAGS := -fPIC contrib_TARGET := $(abspath contrib)/contrib$(AREXT) @@ -19,4 +18,8 @@ contrib_CFLAGS += -pthread contrib_LIBS += -pthread endif +ifeq ($(ENABLE_DNSTAP), yes) +contrib_SOURCES += contrib/dnstap/dnstap.pb-c.c +endif + $(eval $(call make_static,contrib,contrib))