Move example plugins to their own directory.
parent
dcb9ac93c7
commit
c17c6a9028
@ -1,5 +1,2 @@
|
||||
add_subdirectory(dynamic-security)
|
||||
if(NOT WIN32)
|
||||
add_subdirectory(message-timestamp)
|
||||
endif(NOT WIN32)
|
||||
add_subdirectory(payload-modification)
|
||||
add_subdirectory(examples)
|
||||
|
@ -0,0 +1,8 @@
|
||||
if(NOT WIN32)
|
||||
add_subdirectory(add-properties)
|
||||
add_subdirectory(message-timestamp)
|
||||
endif(NOT WIN32)
|
||||
add_subdirectory(auth-by-ip)
|
||||
add_subdirectory(client-properties)
|
||||
add_subdirectory(connection-state)
|
||||
add_subdirectory(payload-modification)
|
@ -0,0 +1,31 @@
|
||||
DIRS= \
|
||||
add-properties \
|
||||
auth-by-ip \
|
||||
client-properties \
|
||||
connection-state \
|
||||
message-timestamp \
|
||||
payload-modification
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
all :
|
||||
set -e; for d in ${DIRS}; do $(MAKE) -C $${d}; done
|
||||
|
||||
binary :
|
||||
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} $@; done
|
||||
|
||||
clean :
|
||||
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} $@; done
|
||||
|
||||
reallyclean :
|
||||
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} $@; done
|
||||
|
||||
check : test
|
||||
test :
|
||||
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} $@; done
|
||||
|
||||
install :
|
||||
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} $@; done
|
||||
|
||||
uninstall :
|
||||
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} $@; done
|
@ -0,0 +1,11 @@
|
||||
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/include
|
||||
${STDBOOL_H_PATH} ${STDINT_H_PATH})
|
||||
|
||||
add_library(mosquitto_add_properties SHARED mosquitto_add_properties.c)
|
||||
set_target_properties(mosquitto_add_properties PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE 1
|
||||
)
|
||||
set_target_properties(mosquitto_add_properties PROPERTIES PREFIX "")
|
||||
|
||||
# Don't install, these are example plugins only.
|
||||
#install(TARGETS mosquitto_add_properties RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
@ -1,8 +1,9 @@
|
||||
include ../../config.mk
|
||||
include ../../../config.mk
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
PLUGIN_NAME=add_properties
|
||||
PLUGIN_NAME=mosquitto_add_properties
|
||||
PLUGIN_CFLAGS+=-I../../../include -I../../../
|
||||
|
||||
all : binary
|
||||
|
@ -1,8 +1,9 @@
|
||||
include ../../config.mk
|
||||
include ../../../config.mk
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
PLUGIN_NAME=mosquitto_auth_by_ip
|
||||
PLUGIN_CFLAGS+=-I../../../include -I../../../
|
||||
|
||||
all : binary
|
||||
|
@ -0,0 +1,15 @@
|
||||
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/include
|
||||
${STDBOOL_H_PATH} ${STDINT_H_PATH})
|
||||
link_directories(${mosquitto_SOURCE_DIR})
|
||||
|
||||
add_library(mosquitto_client_properties SHARED mosquitto_client_properties.c)
|
||||
set_target_properties(mosquitto_client_properties PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE 1
|
||||
)
|
||||
set_target_properties(mosquitto_client_properties PROPERTIES PREFIX "")
|
||||
if(WIN32)
|
||||
target_link_libraries(mosquitto_client_properties mosquitto)
|
||||
endif(WIN32)
|
||||
|
||||
# Don't install, these are example plugins only.
|
||||
#install(TARGETS mosquitto_client_properties RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
@ -0,0 +1,28 @@
|
||||
include ../../../config.mk
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
PLUGIN_NAME=mosquitto_client_properties
|
||||
PLUGIN_CFLAGS+=-I../../../include -I../../../
|
||||
|
||||
all : binary
|
||||
|
||||
binary : ${PLUGIN_NAME}.so
|
||||
|
||||
${PLUGIN_NAME}.so : ${PLUGIN_NAME}.c
|
||||
$(CROSS_COMPILE)$(CC) $(PLUGIN_CPPFLAGS) $(PLUGIN_CFLAGS) $(PLUGIN_LDFLAGS) -fPIC -shared $< -o $@
|
||||
|
||||
reallyclean : clean
|
||||
clean:
|
||||
-rm -f *.o ${PLUGIN_NAME}.so *.gcda *.gcno
|
||||
|
||||
check: test
|
||||
test:
|
||||
|
||||
install: ${PLUGIN_NAME}.so
|
||||
# Don't install, these are examples only.
|
||||
#$(INSTALL) -d "${DESTDIR}$(libdir)"
|
||||
#$(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
|
||||
|
||||
uninstall :
|
||||
-rm -f "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
|
@ -1,8 +1,9 @@
|
||||
include ../../config.mk
|
||||
include ../../../config.mk
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
PLUGIN_NAME=mosquitto_connection_state
|
||||
PLUGIN_CFLAGS+=-I../../../include -I../../../
|
||||
|
||||
all : binary
|
||||
|
@ -1,8 +1,9 @@
|
||||
include ../../config.mk
|
||||
include ../../../config.mk
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
PLUGIN_NAME=mosquitto_message_timestamp
|
||||
PLUGIN_CFLAGS+=-I../../../include -I../../../
|
||||
|
||||
all : binary
|
||||
|
@ -1,8 +1,9 @@
|
||||
include ../../config.mk
|
||||
include ../../../config.mk
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
PLUGIN_NAME=mosquitto_payload_modification
|
||||
PLUGIN_CFLAGS+=-I../../../include -I../../../
|
||||
|
||||
all : binary
|
||||
|
@ -1,11 +0,0 @@
|
||||
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/include
|
||||
${STDBOOL_H_PATH} ${STDINT_H_PATH})
|
||||
|
||||
add_library(mosquitto_message_timestamp SHARED mosquitto_message_timestamp.c)
|
||||
set_target_properties(mosquitto_message_timestamp PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE 1
|
||||
)
|
||||
set_target_properties(mosquitto_message_timestamp PROPERTIES PREFIX "")
|
||||
|
||||
# Don't install, these are example plugins only.
|
||||
#install(TARGETS mosquitto_message_timestamp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
@ -1,15 +0,0 @@
|
||||
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/include
|
||||
${STDBOOL_H_PATH} ${STDINT_H_PATH})
|
||||
link_directories(${mosquitto_SOURCE_DIR})
|
||||
|
||||
add_library(mosquitto_payload_modification SHARED mosquitto_payload_modification.c)
|
||||
set_target_properties(mosquitto_payload_modification PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE 1
|
||||
)
|
||||
set_target_properties(mosquitto_payload_modification PROPERTIES PREFIX "")
|
||||
if(WIN32)
|
||||
target_link_libraries(mosquitto_payload_modification mosquitto)
|
||||
endif(WIN32)
|
||||
|
||||
# Don't install, these are example plugins only.
|
||||
#install(TARGETS mosquitto_payload_modification RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
@ -1,27 +0,0 @@
|
||||
include ../../config.mk
|
||||
|
||||
.PHONY : all binary check clean reallyclean test install uninstall
|
||||
|
||||
PLUGIN_NAME=printf_example
|
||||
|
||||
all : binary
|
||||
|
||||
binary : ${PLUGIN_NAME}.so
|
||||
|
||||
${PLUGIN_NAME}.so : ${PLUGIN_NAME}.c
|
||||
$(CROSS_COMPILE)$(CC) $(PLUGIN_CPPFLAGS) $(PLUGIN_CFLAGS) $(PLUGIN_LDFLAGS) -fPIC -shared $< -o $@
|
||||
|
||||
reallyclean : clean
|
||||
clean:
|
||||
-rm -f *.o ${PLUGIN_NAME}.so *.gcda *.gcno
|
||||
|
||||
check: test
|
||||
test:
|
||||
|
||||
install: ${PLUGIN_NAME}.so
|
||||
# Don't install, these are examples only.
|
||||
#$(INSTALL) -d "${DESTDIR}$(libdir)"
|
||||
#$(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
|
||||
|
||||
uninstall :
|
||||
-rm -f "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
|
Loading…
Reference in New Issue