diff -Naur mosquitto-2.0.14.orig/config.mk mosquitto-2.0.14/config.mk
--- mosquitto-2.0.14.orig/config.mk	2021-11-17 05:58:35.000000000 +0530
+++ mosquitto-2.0.14/config.mk	2022-08-01 16:51:49.915839760 +0530
@@ -15,106 +15,106 @@
 # =============================================================================
 
 # Uncomment to compile the broker with tcpd/libwrap support.
-#WITH_WRAP:=yes
+#WITH_WRAP?=yes
 
 # Comment out to disable SSL/TLS support in the broker and client.
 # Disabling this will also mean that passwords must be stored in plain text. It
 # is strongly recommended that you only disable WITH_TLS if you are not using
 # password authentication at all.
-WITH_TLS:=yes
+WITH_TLS?=yes
 
 # Comment out to disable TLS/PSK support in the broker and client. Requires
 # WITH_TLS=yes.
 # This must be disabled if using openssl < 1.0.
-WITH_TLS_PSK:=yes
+WITH_TLS_PSK?=yes
 
 # Comment out to disable client threading support.
-WITH_THREADING:=yes
+WITH_THREADING?=yes
 
 # Comment out to remove bridge support from the broker. This allow the broker
 # to connect to other brokers and subscribe/publish to topics. You probably
 # want to leave this included unless you want to save a very small amount of
 # memory size and CPU time.
-WITH_BRIDGE:=yes
+WITH_BRIDGE?=yes
 
 # Comment out to remove persistent database support from the broker. This
 # allows the broker to store retained messages and durable subscriptions to a
 # file periodically and on shutdown. This is usually desirable (and is
 # suggested by the MQTT spec), but it can be disabled if required.
-WITH_PERSISTENCE:=yes
+WITH_PERSISTENCE?=yes
 
 # Comment out to remove memory tracking support from the broker. If disabled,
 # mosquitto won't track heap memory usage nor export '$SYS/broker/heap/current
 # size', but will use slightly less memory and CPU time.
-WITH_MEMORY_TRACKING:=yes
+WITH_MEMORY_TRACKING?=yes
 
 # Compile with database upgrading support? If disabled, mosquitto won't
 # automatically upgrade old database versions.
 # Not currently supported.
-#WITH_DB_UPGRADE:=yes
+#WITH_DB_UPGRADE?=yes
 
 # Comment out to remove publishing of the $SYS topic hierarchy containing
 # information about the broker state.
-WITH_SYS_TREE:=yes
+WITH_SYS_TREE?=yes
 
 # Build with systemd support. If enabled, mosquitto will notify systemd after
 # initialization. See README in service/systemd/ for more information.
 # Setting to yes means the libsystemd-dev or similar package will need to be
 # installed.
-WITH_SYSTEMD:=no
+WITH_SYSTEMD?=no
 
 # Build with SRV lookup support.
-WITH_SRV:=no
+WITH_SRV?=no
 
 # Build with websockets support on the broker.
-WITH_WEBSOCKETS:=no
+WITH_WEBSOCKETS?=no
 
 # Use elliptic keys in broker
-WITH_EC:=yes
+WITH_EC?=yes
 
 # Build man page documentation by default.
-WITH_DOCS:=yes
+WITH_DOCS?=yes
 
 # Build with client support for SOCK5 proxy.
-WITH_SOCKS:=yes
+WITH_SOCKS?=yes
 
 # Strip executables and shared libraries on install.
-WITH_STRIP:=no
+WITH_STRIP?=no
 
 # Build static libraries
-WITH_STATIC_LIBRARIES:=no
+WITH_STATIC_LIBRARIES?=no
 
 # Use this variable to add extra library dependencies when building the clients
 # with the static libmosquitto library. This may be required on some systems
 # where e.g. -lz or -latomic are needed for openssl.
-CLIENT_STATIC_LDADD:=
+CLIENT_STATIC_LDADD?=
 
 # Build shared libraries
-WITH_SHARED_LIBRARIES:=yes
+WITH_SHARED_LIBRARIES?=yes
 
 # Build with async dns lookup support for bridges (temporary). Requires glibc.
 #WITH_ADNS:=yes
 
 # Build with epoll support.
-WITH_EPOLL:=yes
+WITH_EPOLL?=yes
 
 # Build with bundled uthash.h
-WITH_BUNDLED_DEPS:=yes
+WITH_BUNDLED_DEPS?=yes
 
 # Build with coverage options
-WITH_COVERAGE:=no
+WITH_COVERAGE?=no
 
 # Build with unix domain socket support
-WITH_UNIX_SOCKETS:=yes
+WITH_UNIX_SOCKETS?=yes
 
 # Build mosquitto_sub with cJSON support
-WITH_CJSON:=yes
+WITH_CJSON?=yes
 
 # Build mosquitto with support for the $CONTROL topics.
-WITH_CONTROL:=yes
+WITH_CONTROL?=yes
 
 # Build the broker with the jemalloc allocator
-WITH_JEMALLOC:=no
+WITH_JEMALLOC?=no
 
 # Build with xtreport capability. This is for debugging purposes and is
 # probably of no particular interest to end users.
@@ -142,15 +142,7 @@
 UNAME:=$(shell uname -s)
 ARCH:=$(shell uname -p)
 
-ifeq ($(UNAME),SunOS)
-	ifeq ($(CC),cc)
-		CFLAGS?=-O
-	else
-		CFLAGS?=-Wall -ggdb -O2
-	endif
-else
-	CFLAGS?=-Wall -ggdb -O2 -Wconversion -Wextra
-endif
+CFLAGS?=-Wall -ggdb -O2
 
 STATIC_LIB_DEPS:=
 
@@ -180,56 +172,19 @@
 PLUGIN_CFLAGS:=$(CFLAGS) -fPIC
 PLUGIN_LDFLAGS:=$(LDFLAGS)
 
-ifneq ($(or $(findstring $(UNAME),FreeBSD), $(findstring $(UNAME),OpenBSD), $(findstring $(UNAME),NetBSD)),)
-	BROKER_LDADD:=$(BROKER_LDADD) -lm
-	BROKER_LDFLAGS:=$(BROKER_LDFLAGS) -Wl,--dynamic-list=linker.syms
-	SEDINPLACE:=-i ""
-else
-	BROKER_LDADD:=$(BROKER_LDADD) -ldl -lm
-	SEDINPLACE:=-i
-endif
+BROKER_LDADD:=$(BROKER_LDADD) -ldl -lm
 
-ifeq ($(UNAME),Linux)
-	BROKER_LDADD:=$(BROKER_LDADD) -lrt
-	BROKER_LDFLAGS:=$(BROKER_LDFLAGS) -Wl,--dynamic-list=linker.syms
-	LIB_LIBADD:=$(LIB_LIBADD) -lrt
-endif
+BROKER_LDADD:=$(BROKER_LDADD) -lrt
+BROKER_LDFLAGS:=$(BROKER_LDFLAGS) -Wl,--dynamic-list=linker.syms
+LIB_LIBADD:=$(LIB_LIBADD) -lrt
 
 ifeq ($(WITH_SHARED_LIBRARIES),yes)
 	CLIENT_LDADD:=${CLIENT_LDADD} ../lib/libmosquitto.so.${SOVERSION}
 endif
 
-ifeq ($(UNAME),SunOS)
-	SEDINPLACE:=
-	ifeq ($(ARCH),sparc)
-		ifeq ($(CC),cc)
-			LIB_CFLAGS:=$(LIB_CFLAGS) -xc99 -KPIC
-		else
-			LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC
-		endif
-	endif
-	ifeq ($(ARCH),i386)
-		LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC
-	endif
-
-	ifeq ($(CXX),CC)
-		LIB_CXXFLAGS:=$(LIB_CXXFLAGS) -KPIC
-	else
-		LIB_CXXFLAGS:=$(LIB_CXXFLAGS) -fPIC
-	endif
-else
-	LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC
-	LIB_CXXFLAGS:=$(LIB_CXXFLAGS) -fPIC
-endif
-
-ifneq ($(UNAME),SunOS)
-	LIB_LDFLAGS:=$(LIB_LDFLAGS) -Wl,--version-script=linker.version -Wl,-soname,libmosquitto.so.$(SOVERSION)
-endif
-
-ifeq ($(UNAME),QNX)
-	BROKER_LDADD:=$(BROKER_LDADD) -lsocket
-	LIB_LIBADD:=$(LIB_LIBADD) -lsocket
-endif
+LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC
+LIB_CXXFLAGS:=$(LIB_CXXFLAGS) -fPIC
+LIB_LDFLAGS:=$(LIB_LDFLAGS) -Wl,--version-script=linker.version -Wl,-soname,libmosquitto.so.$(SOVERSION)
 
 ifeq ($(WITH_WRAP),yes)
 	BROKER_LDADD:=$(BROKER_LDADD) -lwrap
@@ -243,6 +198,7 @@
 	CLIENT_CPPFLAGS:=$(CLIENT_CPPFLAGS) -DWITH_TLS
 	LIB_CPPFLAGS:=$(LIB_CPPFLAGS) -DWITH_TLS
 	LIB_LIBADD:=$(LIB_LIBADD) -lssl -lcrypto
+	LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC
 	PASSWD_LDADD:=$(PASSWD_LDADD) -lcrypto
 	STATIC_LIB_DEPS:=$(STATIC_LIB_DEPS) -lssl -lcrypto
 
@@ -273,11 +229,7 @@
 	BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_PERSISTENCE
 endif
 
-ifeq ($(WITH_MEMORY_TRACKING),yes)
-	ifneq ($(UNAME),SunOS)
-		BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_MEMORY_TRACKING
-	endif
-endif
+BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_MEMORY_TRACKING
 
 ifeq ($(WITH_SYS_TREE),yes)
 	BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_SYS_TREE
@@ -295,10 +247,6 @@
 	STATIC_LIB_DEPS:=$(STATIC_LIB_DEPS) -lcares
 endif
 
-ifeq ($(UNAME),SunOS)
-	BROKER_LDADD:=$(BROKER_LDADD) -lsocket -lnsl
-	LIB_LIBADD:=$(LIB_LIBADD) -lsocket -lnsl
-endif
 
 ifeq ($(WITH_EC),yes)
 	BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_EC
@@ -334,7 +282,7 @@
 endif
 
 INSTALL?=install
-prefix?=/usr/local
+prefix?=/usr/
 incdir?=${prefix}/include
 libdir?=${prefix}/lib${LIB_SUFFIX}
 localedir?=${prefix}/share/locale
diff -Naur mosquitto-2.0.14.orig/Makefile mosquitto-2.0.14/Makefile
--- mosquitto-2.0.14.orig/Makefile	2021-11-17 05:58:35.000000000 +0530
+++ mosquitto-2.0.14/Makefile	2022-08-01 16:44:13.060666144 +0530
@@ -1,8 +1,8 @@
 include config.mk
 
 DIRS=lib apps client plugins src
-DOCDIRS=man
-DISTDIRS=man
+DOCDIRS=
+DISTDIRS=
 DISTFILES= \
 	apps/ \
 	client/ \
