mosquitto/apps/mosquitto_passwd/Makefile

51 lines
981 B
Makefile
Raw Normal View History

2022-02-09 15:44:09 +01:00
R=../..
include ${R}/config.mk
2020-10-12 14:45:37 +02:00
LOCAL_CFLAGS+=
LOCAL_CPPFLAGS+=-I${R}/lib
LOCAL_LDFLAGS+=
2024-06-09 23:05:01 +02:00
LOCAL_LDADD+=-lcrypto ${LIBMOSQ_COMMON}
2023-05-10 17:20:06 +02:00
2020-10-12 14:45:37 +02:00
.PHONY: all install uninstall clean reallyclean
2023-05-10 17:20:06 +02:00
OBJS= \
mosquitto_passwd.o \
get_password.o \
2024-06-09 23:05:01 +02:00
OBJS_EXTERNAL=
2023-05-10 17:20:06 +02:00
2020-10-12 14:45:37 +02:00
2020-10-13 16:06:38 +02:00
ifeq ($(WITH_TLS),yes)
2023-02-05 00:35:22 +01:00
ifeq ($(WITH_FUZZING),yes)
all : mosquitto_passwd.a
else
all : mosquitto_passwd
endif
2020-10-13 16:06:38 +02:00
else
all:
endif
2023-05-10 17:20:06 +02:00
mosquitto_passwd : ${OBJS} ${OBJS_EXTERNAL}
${CROSS_COMPILE}${CC} ${LOCAL_LDFLAGS} $^ -o $@ $(LOCAL_LDADD)
2020-10-12 14:45:37 +02:00
2023-05-10 17:20:06 +02:00
mosquitto_passwd.a : ${OBJS} ${OBJS_EXTERNAL}
2023-02-05 00:35:22 +01:00
${CROSS_COMPILE}$(AR) cr $@ $^
2023-05-10 17:20:06 +02:00
${OBJS} : %.o: %.c
${CROSS_COMPILE}${CC} $(LOCAL_CPPFLAGS) $(LOCAL_CFLAGS) -c $< -o $@
2020-10-12 14:45:37 +02:00
install : all
ifeq ($(WITH_TLS),yes)
2020-10-12 14:45:37 +02:00
$(INSTALL) -d "${DESTDIR}$(prefix)/bin"
$(INSTALL) ${STRIP_OPTS} mosquitto_passwd "${DESTDIR}${prefix}/bin/mosquitto_passwd"
endif
2020-10-12 14:45:37 +02:00
uninstall :
-rm -f "${DESTDIR}${prefix}/bin/mosquitto_passwd"
clean :
2023-02-05 00:35:22 +01:00
-rm -f *.o *.a mosquitto_passwd *.gcda *.gcno
2020-10-12 14:45:37 +02:00
reallyclean : clean
-rm -rf *.orig *.db