Add WITH_STRIP build option.

pull/190/head
Roger A. Light 9 years ago
parent 6c87f7a514
commit d90cd585dd

@ -48,6 +48,9 @@ Client:
- Connections now default to using MQTT v3.1.1. - Connections now default to using MQTT v3.1.1.
- Default to using port 8883 when using TLS. - Default to using port 8883 when using TLS.
Build:
- Add WITH_STRIP option (defaulting to "no") that when set to "yes" will strip
executables and shared libraries when installing.
1.4.7 - 20151221 1.4.7 - 20151221
================ ================

@ -32,8 +32,8 @@ client_shared.o : client_shared.c client_shared.h
install : all install : all
$(INSTALL) -d ${DESTDIR}$(prefix)/bin $(INSTALL) -d ${DESTDIR}$(prefix)/bin
$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub $(INSTALL) ${STRIP_OPTS} mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub
$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub $(INSTALL) ${STRIP_OPTS} mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub
uninstall : uninstall :
-rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub -rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub

@ -80,6 +80,9 @@ WITH_DOCS:=yes
# Build with client support for SOCK5 proxy. # Build with client support for SOCK5 proxy.
WITH_SOCKS:=yes WITH_SOCKS:=yes
# Strip executables and shared libraries on install.
WITH_STRIP:=no
# ============================================================================= # =============================================================================
# End of user configuration # End of user configuration
# ============================================================================= # =============================================================================
@ -88,7 +91,6 @@ WITH_SOCKS:=yes
# Also bump lib/mosquitto.h, CMakeLists.txt, # Also bump lib/mosquitto.h, CMakeLists.txt,
# installer/mosquitto.nsi, installer/mosquitto64.nsi # installer/mosquitto.nsi, installer/mosquitto64.nsi
VERSION=1.4.90 VERSION=1.4.90
TIMESTAMP:=$(shell date "+%F %T%z")
# Client library SO version. Bump if incompatible API/ABI changes are made. # Client library SO version. Bump if incompatible API/ABI changes are made.
SOVERSION=1 SOVERSION=1
@ -97,6 +99,7 @@ SOVERSION=1
XSLTPROC=xsltproc XSLTPROC=xsltproc
# For html generation # For html generation
DB_HTML_XSL=man/html.xsl DB_HTML_XSL=man/html.xsl
TIMESTAMP:=$(shell date "+%F %T%z")
#MANCOUNTRIES=en_GB #MANCOUNTRIES=en_GB
@ -254,3 +257,7 @@ prefix=/usr/local
mandir=${prefix}/share/man mandir=${prefix}/share/man
localedir=${prefix}/share/locale localedir=${prefix}/share/locale
STRIP?=strip STRIP?=strip
ifeq ($(WITH_STRIP),yes)
STRIP_OPTS:=-s --strip-program=${CROSS_COMPILE}${STRIP}
endif

@ -37,7 +37,7 @@ all : libmosquitto.so.${SOVERSION} libmosquitto.a
install : all install : all
$(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/ $(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/
$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION} $(INSTALL) ${STRIP_OPTS} libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so
$(INSTALL) -d ${DESTDIR}${prefix}/include/ $(INSTALL) -d ${DESTDIR}${prefix}/include/
$(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h $(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h

@ -10,7 +10,7 @@ all : libmosquittopp.so.${SOVERSION}
install : all install : all
$(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/ $(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/
$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION} $(INSTALL) ${STRIP_OPTS} libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION}
ln -sf libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so ln -sf libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so
$(INSTALL) -d ${DESTDIR}${prefix}/include/ $(INSTALL) -d ${DESTDIR}${prefix}/include/
$(INSTALL) mosquittopp.h ${DESTDIR}${prefix}/include/mosquittopp.h $(INSTALL) mosquittopp.h ${DESTDIR}${prefix}/include/mosquittopp.h

@ -188,10 +188,12 @@ mosquitto_passwd.o : mosquitto_passwd.c
install : all install : all
$(INSTALL) -d ${DESTDIR}$(prefix)/sbin $(INSTALL) -d ${DESTDIR}$(prefix)/sbin
$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto ${DESTDIR}${prefix}/sbin/mosquitto $(INSTALL) ${STRIP_OPTS} mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
$(INSTALL) -d ${DESTDIR}$(prefix)/include
$(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h $(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h
ifeq ($(WITH_TLS),yes) ifeq ($(WITH_TLS),yes)
$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd $(INSTALL) -d ${DESTDIR}$(prefix)/bin
$(INSTALL) ${STRIP_OPTS} mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd
endif endif
uninstall : uninstall :

Loading…
Cancel
Save