mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-20 23:03:55 +08:00
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>
This commit is contained in:
+9
-1
@@ -7,14 +7,22 @@ endif
|
||||
|
||||
.PHONY : clean install
|
||||
|
||||
all : libmosquittopp.so.${SOVERSION} libmosquittopp.a
|
||||
ALL_DEPS=libmosquittopp.so.${SOVERSION}
|
||||
|
||||
ifeq ($(WITH_STATIC_LIBRARIES),yes)
|
||||
ALL_DEPS+=libmosquittopp.a
|
||||
endif
|
||||
|
||||
all : ${ALL_DEPS}
|
||||
|
||||
install : all
|
||||
$(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}
|
||||
ln -sf libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so
|
||||
ifeq ($(WITH_STATIC_LIBRARIES),yes)
|
||||
$(INSTALL) libmosquittopp.a ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.a
|
||||
${CROSS_COMPILE}${STRIP} -g --strip-unneeded ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.a
|
||||
endif
|
||||
$(INSTALL) -d ${DESTDIR}${prefix}/include/
|
||||
$(INSTALL) mosquittopp.h ${DESTDIR}${prefix}/include/mosquittopp.h
|
||||
|
||||
|
||||
Reference in New Issue
Block a user