mosquitto/client/Makefile

38 lines
976 B
Makefile
Raw Normal View History

2014-05-07 22:27:00 +00:00
include ../config.mk
.PHONY: all install uninstall reallyclean clean
all : mosquitto_pub mosquitto_sub
mosquitto_pub : pub_client.o client_shared.o
${CC} $^ -o $@ ${CLIENT_LDFLAGS}
2014-05-07 22:27:00 +00:00
mosquitto_sub : sub_client.o client_shared.o
${CC} $^ -o $@ ${CLIENT_LDFLAGS}
2014-05-07 22:27:00 +00:00
pub_client.o : pub_client.c ../lib/libmosquitto.so.${SOVERSION}
${CC} -c $< -o $@ ${CLIENT_CFLAGS}
sub_client.o : sub_client.c ../lib/libmosquitto.so.${SOVERSION}
${CC} -c $< -o $@ ${CLIENT_CFLAGS}
client_shared.o : client_shared.c client_shared.h
${CC} -c $< -o $@ ${CLIENT_CFLAGS}
2014-05-07 22:27:00 +00:00
../lib/libmosquitto.so.${SOVERSION} :
$(MAKE) -C ../lib
install : all
$(INSTALL) -d ${DESTDIR}$(prefix)/bin
$(INSTALL) -s mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub
$(INSTALL) -s mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub
uninstall :
-rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub
-rm -f ${DESTDIR}${prefix}/bin/mosquitto_sub
reallyclean : clean
clean :
-rm -f *.o mosquitto_pub mosquitto_sub