Refactor UTF-8 code to common static library.

This commit is contained in:
Roger A. Light
2024-03-17 07:15:47 +00:00
parent f5195ba442
commit 6eb56dc6f1
25 changed files with 179 additions and 55 deletions

35
libcommon/Makefile Normal file
View File

@@ -0,0 +1,35 @@
R=..
include ${R}/config.mk
LOCAL_CFLAGS+=-fPIC
LOCAL_CPPFLAGS+=
LOCAL_LDFLAGS+=-fPIC
LOCAL_LIBADD+=
# ------------------------------------------
# Targets
# ------------------------------------------
.PHONY : really clean install
OBJS= \
utf8_common.o
all : libmosquitto_common.a
install :
uninstall :
reallyclean : clean
clean :
-rm -f ${OBJS} libmosquitto_common.so.${SOVERSION} libmosquitto_common.so libmosquitto_common.a *.gcno *.gcda
libmosquitto_common.so.${SOVERSION} : ${OBJS}
${CROSS_COMPILE}$(CC) $(LOCAL_LDFLAGS) $^ -o $@ ${LOCAL_LIBADD}
libmosquitto_common.a : ${OBJS}
${CROSS_COMPILE}$(AR) cr $@ $^
${OBJS} : %.o: %.c
${CROSS_COMPILE}${CC} $(LOCAL_CPPFLAGS) $(LOCAL_CFLAGS) -c $< -o $@