22 Commits

Author SHA1 Message Date
Rich Mattes
ab4ac42b90 Fix libdir location in pkgconfig files.
The pkgconfig files currently hardcode the library directory as
${prefix}/lib, but the library installation directory in config.mk is
set as lib${LIB_SUFFIX}.  This causes a mismatch between the library
installation directory and the pkgconfig file on redhat-based 64-bit
systems.

This commit remedies the issue for both the Makefile and CMake build by
modifying the pkgconfig files to use CMAKE_INSTALL_LIBDIR instead of
"lib".  In the CMake system, this directly reflects the installation
path.  The Makefiles were modified to replace CMAKE_INSTALL_LIBDIR with
lib${LIB_SUFFIX}, matching the libdir definition in config.mk and
following the pattern used in defining the prefix.

Signed-off-by: Rich Mattes <richmattes@gmail.com>
2025-12-08 20:57:17 +00:00
Roger A. Light
ee485341dd Merge branch 'develop' of github.com:andreaskem/mosquitto into andreaskem-develop 2025-02-25 17:02:16 +00:00
Roger A. Light
4498193331 Refactor file functions to common static library. 2024-03-17 23:13:11 +00:00
Roger A. Light
d17a88d916 Refactor headers for easier discovery. 2023-12-23 12:59:58 +00:00
Roger A. Light
c8e313aac0 Fix build
This is for the case where command line overrides are set.
2023-09-19 22:48:24 +01:00
Roger A. Light
a31bee722f Simplify make build. 2023-05-10 16:20:06 +01:00
Roger A. Light
343a984083 Big rejig of library tests
Includes full consistency between C/C++ library tests
2023-01-02 11:45:09 +00:00
Andreas Kempf
28e3495012 Enable building on AIX
The AIX operating system by IBM does not provide the getifaddrs function
and requires a custom linker script syntax. This commit allows for a
basic GCC build on AIX 7.2.

The build was tested using the command lines

make CC=gcc WITH_CJSON=no WITH_DOCS=no WITH_STATIC_LIBRARIES=yes
and
CC=gcc cmake <srcpath> -DDOCUMENTATION=no

At this point, the persistence test suite seems to fail. The library, as
well as the mosquitto_sub and mosquitto_pub executables were tested and
appear to be functional.

Signed-off-by: Andreas Kempf <aakempf@gmail.com>
2022-05-18 17:20:41 +02:00
Roger A. Light
4c72542eae Move mosquittopp header to include dir. 2022-04-15 22:08:49 +01:00
Roger A. Light
5a3b42d4a4 Use path vars in Makefiles. 2022-02-09 14:44:09 +00:00
Roger A. Light
7f41e37f0f Fix use of sed on BSD.
Closes #1614. Thanks to Christoph Krey.
2020-03-12 11:52:58 +00:00
Roger A. Light
3b4a5419c3 Build fixes around CFLAGS et al.
- Split CFLAGS and CPPFLAGS, and LDFLAGS and LDADD/LIBADD.
- test/unit now respects CPPFLAGS and LDFLAGS.

Closes #1232. Thanks to Greg Troxel.
2019-04-26 17:06:54 +01:00
Roger A. Light
59bd07627d Various build improvements to help packaging. 2018-09-25 14:25:54 +01:00
Michael Heimpold
a459e93498 Install pkg-config files also for non-CMake builds
At the moment, pkg-config hint files are only installed when CMake is
used as build system. However, it is very convenient for programs using
libmosquitto to have these files always in place, so let's add it
here, too.

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
2018-09-18 15:25:22 +01:00
Michael Heimpold
48dec391f7 Quote ${DESTDIR} usage in various Makefiles
This prevents failures during make install when whitespace
is part of DESTDIR pathname.

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
2017-12-01 22:28:26 +00:00
Roger A. Light
fa2d3143a4 Separate the C and C++ static libraries. 2016-06-15 21:11:46 +01:00
Roger A. Light
2286caaca2 Merge branch 'enhance-bare-makefile-static-library-build' of https://github.com/Lance0312/mosquitto into Lance0312-enhance-bare-makefile-static-library-build 2016-06-15 20:59:34 +01:00
Roger A. Light
d90cd585dd Add WITH_STRIP build option. 2016-06-13 21:36:41 +01:00
Lance Chen
5ccd0dbb80 Add an build option to control building static libraries or not
The option WITH_STATIC_LIBRARIES is default to yes

Signed-off-by: Lance Chen <cyen0312@gmail.com>
2016-06-03 01:59:37 +08:00
Lance Chen
4b4817c3f0 Build the CPP static library with bare Makefiles
In order to make the CPP static library include all
objects from the C static library, the list of objects
(MOSQ_OBJS) is isolated into objects.mk to be used for
building the C and CPP static libraries.

Signed-off-by: Lance Chen <cyen0312@gmail.com>
2016-06-02 18:02:26 +08:00
Roger A. Light
330a7a882e Add CROSS_COMPILE to Makefiles. 2014-05-25 23:36:38 +01:00
Roger Light
0364bd1be7 Initial contribution. 2014-05-07 23:27:00 +01:00