Install/Uninstall the C static library

Symbol stripping is done explicitly with strip command,
since stripping with install command removes too many
symbols, making the result library unusable.

Signed-off-by: Lance Chen <cyen0312@gmail.com>
pull/183/head
Lance Chen 9 years ago
parent c6ef86bd1f
commit a9b7237d09
No known key found for this signature in database
GPG Key ID: 2B9B29056A82FEB1

@ -39,6 +39,8 @@ install : all
$(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}
ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so
$(INSTALL) libmosquitto.a ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.a
${CROSS_COMPILE}${STRIP} -g --strip-unneeded ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.a
$(INSTALL) -d ${DESTDIR}${prefix}/include/
$(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h
$(MAKE) -C cpp install
@ -46,6 +48,7 @@ install : all
uninstall :
-rm -f ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
-rm -f ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so
-rm -f ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.a
-rm -f ${DESTDIR}${prefix}/include/mosquitto.h
reallyclean : clean

Loading…
Cancel
Save