mosquitto/Makefile

183 lines
5 KiB
Makefile
Raw Normal View History

2014-05-08 00:27:00 +02:00
include config.mk
DIRS=libcommon lib apps client plugins src
2014-05-08 00:27:00 +02:00
DOCDIRS=man
DISTDIRS=man
DISTFILES= \
2020-10-12 14:45:37 +02:00
apps/ \
client/ \
cmake/ \
2022-08-11 16:15:27 +02:00
common/ \
dashboard/ \
2020-10-13 00:58:55 +02:00
deps/ \
2026-01-15 09:44:51 +01:00
doc/ \
docker/ \
examples/ \
2026-01-15 09:44:51 +01:00
fuzzing/ \
2020-10-15 12:22:00 +02:00
include/ \
installer/ \
2025-04-04 20:53:31 +02:00
libcommon/ \
lib/ \
logo/ \
make/ \
man/ \
misc/ \
2020-10-15 12:22:00 +02:00
plugins/ \
security/ \
service/ \
snap/ \
src/ \
test/ \
2026-01-15 09:44:51 +01:00
www/ \
.github \
\
2026-01-15 09:44:51 +01:00
.editorconfig \
.gitignore \
.uncrustify.cfg \
buildtest.py \
codecov.yml \
CMakeLists.txt \
2026-01-15 09:44:51 +01:00
CITATION.cff \
CONTRIBUTING.md \
ChangeLog.txt \
2026-01-15 09:44:51 +01:00
format.sh \
LICENSE.txt \
Makefile \
about.html \
aclfile.example \
config.h \
config.mk \
edl-v10 \
2020-12-02 22:51:30 +01:00
epl-v20 \
libmosquitto.pc.in \
libmosquittopp.pc.in \
mosquitto.conf \
2021-05-13 18:37:26 +02:00
NOTICE.md \
pskfile.example \
pwfile.example \
2020-12-02 22:51:30 +01:00
README-compiling.md \
README-letsencrypt.md \
2026-01-15 09:44:51 +01:00
README-tests.md \
2020-12-02 22:51:30 +01:00
README-windows.txt \
2026-01-15 09:44:51 +01:00
README.md \
run_tests.py \
set-version.sh \
SECURITY.md \
THANKS.txt \
vcpkg.json
2022-10-16 08:59:44 +02:00
.PHONY : all mosquitto api docs binary check clean reallyclean test test-compile install uninstall dist sign copy localdocker
2014-05-08 00:27:00 +02:00
2022-10-16 12:04:35 +02:00
all : $(MAKE_ALL)
2014-05-08 00:27:00 +02:00
2017-04-21 22:51:00 +02:00
api :
mkdir -p api p
2023-08-02 11:43:01 +02:00
naturaldocs -o HTML api -i include -p p
2017-04-21 22:51:00 +02:00
rm -rf p
2014-05-08 00:27:00 +02:00
docs :
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d}; done
binary : mosquitto
2022-10-16 12:04:35 +02:00
binary-all : mosquitto test-compile
2014-05-08 00:27:00 +02:00
mosquitto :
ifeq ($(UNAME),Darwin)
$(error Please compile using CMake on Mac OS X)
endif
2014-05-08 00:27:00 +02:00
set -e; for d in ${DIRS}; do $(MAKE) -C $${d}; done
fuzzing : mosquitto
$(MAKE) -C fuzzing
2014-05-08 00:27:00 +02:00
clean :
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} clean; done
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} clean; done
$(MAKE) -C test clean
$(MAKE) -C fuzzing clean
2014-05-08 00:27:00 +02:00
2021-10-05 16:20:37 +02:00
reallyclean :
2014-05-08 00:27:00 +02:00
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} reallyclean; done
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} reallyclean; done
$(MAKE) -C test reallyclean
-rm -f *.orig
check : test
test-compile: mosquitto lib
2022-10-16 08:59:44 +02:00
$(MAKE) -C test test-compile
$(MAKE) -C plugins test-compile
2022-10-16 08:59:44 +02:00
test : mosquitto lib apps test-compile
$(MAKE) -C test test
$(MAKE) -C plugins test
ptest : mosquitto
$(MAKE) -C test ptest
utest : mosquitto
$(MAKE) -C test utest
2014-05-08 00:27:00 +02:00
install : all
2014-05-08 00:27:00 +02:00
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} install; done
ifeq ($(WITH_DOCS),yes)
2014-05-08 00:27:00 +02:00
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} install; done
endif
$(INSTALL) -d "${DESTDIR}/etc/mosquitto"
$(INSTALL) -m 644 mosquitto.conf "${DESTDIR}/etc/mosquitto/mosquitto.conf.example"
$(INSTALL) -m 644 aclfile.example "${DESTDIR}/etc/mosquitto/aclfile.example"
$(INSTALL) -m 644 pwfile.example "${DESTDIR}/etc/mosquitto/pwfile.example"
$(INSTALL) -m 644 pskfile.example "${DESTDIR}/etc/mosquitto/pskfile.example"
2023-12-23 13:59:58 +01:00
$(INSTALL) -d "${DESTDIR}$(prefix)/include/mosquitto"
$(INSTALL) include/mosquitto/*.h "${DESTDIR}${prefix}/include/mosquitto/"
$(INSTALL) include/mosquitto.h "${DESTDIR}${prefix}/include/mosquitto.h"
$(INSTALL) include/mosquitto_broker.h "${DESTDIR}${prefix}/include/mosquitto_broker.h"
$(INSTALL) include/mosquitto_plugin.h "${DESTDIR}${prefix}/include/mosquitto_plugin.h"
$(INSTALL) include/mosquittopp.h "${DESTDIR}${prefix}/include/mosquittopp.h"
$(INSTALL) include/mqtt_protocol.h "${DESTDIR}${prefix}/include/mqtt_protocol.h"
2014-05-08 00:27:00 +02:00
uninstall :
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} uninstall; done
rm -f "${DESTDIR}/etc/mosquitto/mosquitto.conf.example"
rm -f "${DESTDIR}/etc/mosquitto/aclfile.example"
rm -f "${DESTDIR}/etc/mosquitto/pwfile.example"
rm -f "${DESTDIR}/etc/mosquitto/pskfile.example"
2023-12-23 13:59:58 +01:00
rm -f "${DESTDIR}${prefix}/include/mosquitto.h"
rm -f "${DESTDIR}${prefix}/include/mosquitto/broker.h"
rm -f "${DESTDIR}${prefix}/include/mosquitto/broker_control.h"
rm -f "${DESTDIR}${prefix}/include/mosquitto/broker_plugin.h"
rm -f "${DESTDIR}${prefix}/include/mosquitto/libmosquittopp.h"
rm -f "${DESTDIR}${prefix}/include/mosquitto/mqtt_protocol.h"
rm -f "${DESTDIR}${prefix}/include/mosquitto_broker.h"
rm -f "${DESTDIR}${prefix}/include/mosquitto_plugin.h"
rm -f "${DESTDIR}${prefix}/include/mosquittopp.h"
rm -f "${DESTDIR}${prefix}/include/mqtt_protocol.h"
2014-05-08 00:27:00 +02:00
dist : reallyclean
set -e; for d in ${DISTDIRS}; do $(MAKE) -C $${d} dist; done
mkdir -p dist/mosquitto-${VERSION}
cp -r ${DISTFILES} dist/mosquitto-${VERSION}/
2014-05-08 00:27:00 +02:00
cd dist; tar -zcf mosquitto-${VERSION}.tar.gz mosquitto-${VERSION}/
sign : dist
cd dist; gpg --detach-sign -a mosquitto-${VERSION}.tar.gz
copy : sign
cd dist; scp mosquitto-${VERSION}.tar.gz mosquitto-${VERSION}.tar.gz.asc mosquitto:site/mosquitto.org/files/source/
scp ChangeLog.txt mosquitto:site/mosquitto.org/
2018-10-06 22:56:48 +02:00
coverage :
lcov --capture -d apps -d client -d lib -d plugins -d src --output-file coverage.info --no-external --ignore-errors empty
genhtml --ignore-errors inconsistent coverage.info --output-directory out
localdocker : reallyclean
set -e; for d in ${DISTDIRS}; do $(MAKE) -C $${d} dist; done
rm -rf dockertmp/
mkdir -p dockertmp/mosquitto-${VERSION}
cp -r ${DISTFILES} dockertmp/mosquitto-${VERSION}/
cd dockertmp/; tar -zcf mosq.tar.gz mosquitto-${VERSION}/
cp dockertmp/mosq.tar.gz docker/local
rm -rf dockertmp/
cd docker/local && docker build . -t eclipse-mosquitto:local --build-arg VERSION=${VERSION}