Files
mosquitto/plugins/persist-sqlite/Makefile
Jesús Fernández Manzano c6669ef715 Fix makefile build with WITH_SQLITE disabled
When using WITH_SQLITE=no, the build system correctly avoids to compile
the plugin, but the install step fails because it tries to install it
even if it has not been compiled.

This commit fixes this behaviour by totally omitting the plugin if
WITH_SQLITE=no is specified, so no compilation and no installation is
performed

Signed-off-by: Jesús Fernández Manzano <jesus.fernandez@titanos.tv>
2026-02-24 00:35:15 +00:00

36 lines
612 B
Makefile

R=../..
include ${R}/config.mk
PLUGIN_NAME=mosquitto_persist_sqlite
LOCAL_CFLAGS+=
LOCAL_CPPFLAGS+=-I${R}/src/ -I${R}/plugins/common
LOCAL_LIBADD+=-lsqlite3 ${LIBMOSQ_COMMON}
LOCAL_LDFLAGS+=
OBJS = \
base_msgs.o \
clients.o \
client_msgs.o \
common.o \
init.o \
plugin.o \
restore.o \
retain_msgs.o \
subscriptions.o \
tick.o \
will.o
OBJS_EXTERNAL = \
json_help.o
ALL_DEPS:= binary
all : ${ALL_DEPS}
json_help.o : ${R}/common/json_help.c ${R}/common/json_help.h
${CROSS_COMPILE}${CC} $(LOCAL_CPPFLAGS) $(LOCAL_CFLAGS) -c $< -o $@
EXTRA_DEPS:=persist_sqlite.h
include ${R}/plugins/plugin.mk