diff --git a/config.mk b/config.mk index 4f7d4e77..09beb8a0 100644 --- a/config.mk +++ b/config.mk @@ -155,10 +155,10 @@ LIB_CXXFLAGS:=$(CXXFLAGS) LIB_LDFLAGS:=$(LDFLAGS) LIB_LIBADD:=$(LIBADD) -BROKER_CPPFLAGS:=$(LIB_CPPFLAGS) -I../lib +BROKER_CPPFLAGS:=$(LIB_CPPFLAGS) -I../lib -I/usr/include/cjson -I/usr/local/include/cjson BROKER_CFLAGS:=${CFLAGS} -DVERSION="\"${VERSION}\"" -DWITH_BROKER BROKER_LDFLAGS:=${LDFLAGS} -BROKER_LDADD:= +BROKER_LDADD:=-lcjson CLIENT_CPPFLAGS:=$(CPPFLAGS) -I.. -I../include CLIENT_CFLAGS:=${CFLAGS} -DVERSION="\"${VERSION}\"" @@ -167,6 +167,8 @@ CLIENT_LDADD:= PASSWD_LDADD:= +PLUGIN_CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../include + ifneq ($(or $(findstring $(UNAME),FreeBSD), $(findstring $(UNAME),OpenBSD), $(findstring $(UNAME),NetBSD)),) BROKER_LDADD:=$(BROKER_LDADD) -lm SEDINPLACE:=-i "" @@ -339,6 +341,8 @@ endif ifeq ($(WITH_COVERAGE),yes) BROKER_CFLAGS:=$(BROKER_CFLAGS) -coverage BROKER_LDFLAGS:=$(BROKER_LDFLAGS) -coverage + PLUGIN_CFLAGS:=$(PLUGIN_CFLAGS) -coverage + PLUGIN_LDFLAGS:=$(PLUGIN_LDFLAGS) -coverage LIB_CFLAGS:=$(LIB_CFLAGS) -coverage LIB_LDFLAGS:=$(LIB_LDFLAGS) -coverage CLIENT_CFLAGS:=$(CLIENT_CFLAGS) -coverage diff --git a/plugins/message-timestamp/Makefile b/plugins/message-timestamp/Makefile index f7383c4f..d8a06ff6 100644 --- a/plugins/message-timestamp/Makefile +++ b/plugins/message-timestamp/Makefile @@ -1,3 +1,5 @@ +include ../../config.mk + .PHONY : all binary check clean reallyclean test install uninstall PLUGIN_NAME=mosquitto_message_timestamp @@ -7,7 +9,7 @@ all : binary binary : ${PLUGIN_NAME}.so ${PLUGIN_NAME}.so : ${PLUGIN_NAME}.c - $(CC) -I../../include -fPIC -shared $< -o $@ + $(CROSS_COMPILE)$(CC) $(PLUGIN_CPPFLAGS) $(PLUGIN_CFLAGS) $(PLUGIN_LDFLAGS) -fPIC -shared $< -o $@ reallyclean : clean clean: