Separate the C and C++ static libraries.
This commit is contained in:
parent
2286caaca2
commit
fa2d3143a4
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,6 +32,7 @@ test/broker/c/auth_plugin.so
|
||||
test/broker/c/*.test
|
||||
|
||||
lib/cpp/libmosquittopp.so*
|
||||
lib/cpp/libmosquittopp.a
|
||||
lib/libmosquitto.so*
|
||||
lib/libmosquitto.a
|
||||
|
||||
|
35
lib/Makefile
35
lib/Makefile
@ -1,8 +1,37 @@
|
||||
include ../config.mk
|
||||
include objects.mk
|
||||
|
||||
.PHONY : really clean install
|
||||
|
||||
MOSQ_OBJS=mosquitto.o \
|
||||
handle_connack.o \
|
||||
handle_ping.o \
|
||||
handle_pubackcomp.o \
|
||||
handle_publish.o \
|
||||
handle_pubrec.o \
|
||||
handle_pubrel.o \
|
||||
handle_suback.o \
|
||||
handle_unsuback.o \
|
||||
helpers.o \
|
||||
logging_mosq.o \
|
||||
memory_mosq.o \
|
||||
messages_mosq.o \
|
||||
net_mosq.o \
|
||||
packet_mosq.o \
|
||||
read_handle.o \
|
||||
send_connect.o \
|
||||
send_disconnect.o \
|
||||
send_mosq.o \
|
||||
send_publish.o \
|
||||
send_subscribe.o \
|
||||
send_unsubscribe.o \
|
||||
socks_mosq.o \
|
||||
srv_mosq.o \
|
||||
thread_mosq.o \
|
||||
time_mosq.o \
|
||||
tls_mosq.o \
|
||||
util_mosq.o \
|
||||
will_mosq.o
|
||||
|
||||
ALL_DEPS=libmosquitto.so.${SOVERSION}
|
||||
|
||||
ifeq ($(WITH_STATIC_LIBRARIES),yes)
|
||||
@ -36,10 +65,10 @@ clean :
|
||||
-rm -f *.o libmosquitto.so.${SOVERSION} libmosquitto.so libmosquitto.a
|
||||
$(MAKE) -C cpp clean
|
||||
|
||||
libmosquitto.so.${SOVERSION} : ${MOSQ_C_OBJS}
|
||||
libmosquitto.so.${SOVERSION} : ${MOSQ_OBJS}
|
||||
${CROSS_COMPILE}$(CC) -shared $(LIB_LDFLAGS) $^ -o $@ ${LIB_LIBS}
|
||||
|
||||
libmosquitto.a : ${MOSQ_C_OBJS}
|
||||
libmosquitto.a : ${MOSQ_OBJS}
|
||||
${CROSS_COMPILE}$(AR) cr $@ $^
|
||||
|
||||
mosquitto.o : mosquitto.c mosquitto.h
|
||||
|
@ -1,5 +1,4 @@
|
||||
include ../../config.mk
|
||||
include ../objects.mk
|
||||
|
||||
ifneq ($(UNAME),SunOS)
|
||||
LIB_LDFLAGS:=$(LDFLAGS) -Wl,-soname,libmosquittopp.so.${SOVERSION}
|
||||
@ -38,7 +37,7 @@ clean :
|
||||
libmosquittopp.so.${SOVERSION} : mosquittopp.o
|
||||
${CROSS_COMPILE}$(CXX) -shared $(LIB_LDFLAGS) $< -o $@ ../libmosquitto.so.${SOVERSION}
|
||||
|
||||
libmosquittopp.a : mosquittopp.o ${MOSQ_C_OBJS}
|
||||
libmosquittopp.a : mosquittopp.o
|
||||
${CROSS_COMPILE}$(AR) cr $@ $^
|
||||
|
||||
mosquittopp.o : mosquittopp.cpp mosquittopp.h
|
||||
|
@ -1,32 +0,0 @@
|
||||
MOSQ_C_OBJ_NAMES=mosquitto.o \
|
||||
handle_connack.o \
|
||||
handle_ping.o \
|
||||
handle_pubackcomp.o \
|
||||
handle_publish.o \
|
||||
handle_pubrec.o \
|
||||
handle_pubrel.o \
|
||||
handle_suback.o \
|
||||
handle_unsuback.o \
|
||||
helpers.o \
|
||||
logging_mosq.o \
|
||||
memory_mosq.o \
|
||||
messages_mosq.o \
|
||||
net_mosq.o \
|
||||
packet_mosq.o \
|
||||
read_handle.o \
|
||||
send_connect.o \
|
||||
send_disconnect.o \
|
||||
send_mosq.o \
|
||||
send_publish.o \
|
||||
send_subscribe.o \
|
||||
send_unsubscribe.o \
|
||||
socks_mosq.o \
|
||||
srv_mosq.o \
|
||||
thread_mosq.o \
|
||||
time_mosq.o \
|
||||
tls_mosq.o \
|
||||
util_mosq.o \
|
||||
will_mosq.o
|
||||
|
||||
CURDIR=$(dir $(lastword $(MAKEFILE_LIST)))
|
||||
MOSQ_C_OBJS=$(addprefix $(CURDIR), $(MOSQ_C_OBJ_NAMES))
|
Loading…
Reference in New Issue
Block a user