Move headers to own directory.

This commit is contained in:
Roger A. Light 2020-10-07 22:04:15 +01:00
parent 908b33c0bd
commit a65f946e83
15 changed files with 44 additions and 34 deletions

View File

@ -144,7 +144,7 @@ endif
STATIC_LIB_DEPS:=
LIB_CPPFLAGS=$(CPPFLAGS) -I. -I.. -I../lib
LIB_CPPFLAGS=$(CPPFLAGS) -I. -I.. -I../include -I../../include
ifeq ($(WITH_BUNDLED_DEPS),yes)
LIB_CPPFLAGS:=$(LIB_CPPFLAGS) -I../src/deps
endif
@ -153,12 +153,12 @@ LIB_CXXFLAGS:=$(CXXFLAGS)
LIB_LDFLAGS:=$(LDFLAGS)
LIB_LIBADD:=$(LIBADD)
BROKER_CPPFLAGS:=$(LIB_CPPFLAGS)
BROKER_CPPFLAGS:=$(LIB_CPPFLAGS) -I../lib
BROKER_CFLAGS:=${CFLAGS} -DVERSION="\"${VERSION}\"" -DWITH_BROKER
BROKER_LDFLAGS:=${LDFLAGS}
BROKER_LDADD:=
CLIENT_CPPFLAGS:=$(CPPFLAGS) -I.. -I../lib
CLIENT_CPPFLAGS:=$(CPPFLAGS) -I.. -I../include
CLIENT_CFLAGS:=${CFLAGS} -DVERSION="\"${VERSION}\""
CLIENT_LDFLAGS:=$(LDFLAGS) -L../lib
CLIENT_LDADD:=

View File

@ -61,11 +61,13 @@ Section "Files" SecInstall
File "..\epl-v10"
SetOutPath "$INSTDIR\devel"
File "..\lib\mosquitto.h"
File "..\build\lib\Release\mosquitto.lib"
File "..\lib\cpp\mosquittopp.h"
File "..\build\lib\cpp\Release\mosquittopp.lib"
File "..\src\mosquitto_plugin.h"
File "..\include\mosquitto.h"
File "..\include\mosquitto_broker.h"
File "..\include\mosquitto_plugin.h"
File "..\include\mqtt_protocol.h"
File "..\lib\cpp\mosquittopp.h"
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "DisplayName" "Eclipse Mosquitto MQTT broker"
@ -108,9 +110,11 @@ Section "Uninstall"
Delete "$INSTDIR\devel\mosquitto.h"
Delete "$INSTDIR\devel\mosquitto.lib"
Delete "$INSTDIR\devel\mosquitto_broker.h"
Delete "$INSTDIR\devel\mosquitto_plugin.h"
Delete "$INSTDIR\devel\mosquittopp.h"
Delete "$INSTDIR\devel\mosquittopp.lib"
Delete "$INSTDIR\devel\mosquitto_plugin.h"
Delete "$INSTDIR\devel\mqtt_protocol.h"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"

View File

@ -62,11 +62,13 @@ Section "Files" SecInstall
File "..\epl-v10"
SetOutPath "$INSTDIR\devel"
File "..\lib\mosquitto.h"
File "..\build64\lib\Release\mosquitto.lib"
File "..\lib\cpp\mosquittopp.h"
File "..\build64\lib\cpp\Release\mosquittopp.lib"
File "..\src\mosquitto_plugin.h"
File "..\include\mosquitto.h"
File "..\include\mosquitto_broker.h"
File "..\include\mosquitto_plugin.h"
File "..\include\mqtt_protocol.h"
File "..\lib\cpp\mosquittopp.h"
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "DisplayName" "Eclipse Mosquitto MQTT broker (64 bit)"
@ -109,9 +111,12 @@ Section "Uninstall"
Delete "$INSTDIR\devel\mosquitto.h"
Delete "$INSTDIR\devel\mosquitto.lib"
Delete "$INSTDIR\devel\mosquitto_broker.h"
Delete "$INSTDIR\devel\mosquitto_plugin.h"
Delete "$INSTDIR\devel\mosquitto_plugin.h"
Delete "$INSTDIR\devel\mosquittopp.h"
Delete "$INSTDIR\devel\mosquittopp.lib"
Delete "$INSTDIR\devel\mosquitto_plugin.h"
Delete "$INSTDIR\devel\mqtt_protocol.h"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"

View File

@ -32,9 +32,9 @@ set(C_SRC
memory_mosq.c memory_mosq.h
messages_mosq.c messages_mosq.h
misc_mosq.c misc_mosq.h
mosquitto.c mosquitto.h
mosquitto.c ../include/mosquitto.h
mosquitto_internal.h
mqtt_protocol.h
../include/mqtt_protocol.h
net_mosq_ocsp.c net_mosq.c net_mosq.h
options.c
packet_datatypes.c
@ -115,4 +115,5 @@ if (WITH_STATIC_LIBRARIES)
install(TARGETS libmosquitto_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
endif (WITH_STATIC_LIBRARIES)
install(FILES mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES ../include/mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES ../include/mqtt_protocol.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

View File

@ -70,8 +70,8 @@ ifeq ($(WITH_STATIC_LIBRARIES),yes)
$(INSTALL) ${STRIP_OPTS} libmosquitto.a "${DESTDIR}${libdir}/libmosquitto.a"
endif
$(INSTALL) -d "${DESTDIR}${incdir}/"
$(INSTALL) mosquitto.h "${DESTDIR}${incdir}/mosquitto.h"
$(INSTALL) mqtt_protocol.h "${DESTDIR}${incdir}/mqtt_protocol.h"
$(INSTALL) ../include/mosquitto.h "${DESTDIR}${incdir}/mosquitto.h"
$(INSTALL) ../include/mqtt_protocol.h "${DESTDIR}${incdir}/mqtt_protocol.h"
$(INSTALL) -d "${DESTDIR}${libdir}/pkgconfig"
$(INSTALL) -m644 ../libmosquitto.pc.in "${DESTDIR}${libdir}/pkgconfig/libmosquitto.pc"
sed ${SEDINPLACE} -e "s#@CMAKE_INSTALL_PREFIX@#${prefix}#" -e "s#@VERSION@#${VERSION}#" "${DESTDIR}${libdir}/pkgconfig/libmosquitto.pc"
@ -97,16 +97,16 @@ libmosquitto.so.${SOVERSION} : ${MOSQ_OBJS}
libmosquitto.a : ${MOSQ_OBJS}
${CROSS_COMPILE}$(AR) cr $@ $^
mosquitto.o : mosquitto.c mosquitto.h mosquitto_internal.h
mosquitto.o : mosquitto.c ../include/mosquitto.h mosquitto_internal.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
actions.o : actions.c mosquitto.h mosquitto_internal.h
actions.o : actions.c ../include/mosquitto.h mosquitto_internal.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
callbacks.o : callbacks.c mosquitto.h mosquitto_internal.h
callbacks.o : callbacks.c ../include/mosquitto.h mosquitto_internal.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
connect.o : connect.c mosquitto.h mosquitto_internal.h
connect.o : connect.c ../include/mosquitto.h mosquitto_internal.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
handle_auth.o : handle_auth.c read_handle.h
@ -145,7 +145,7 @@ helpers.o : helpers.c
logging_mosq.o : logging_mosq.c logging_mosq.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
loop.o : loop.c mosquitto.h mosquitto_internal.h
loop.o : loop.c ../include/mosquitto.h mosquitto_internal.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
messages_mosq.o : messages_mosq.c messages_mosq.h
@ -163,7 +163,7 @@ net_mosq_ocsp.o : net_mosq_ocsp.c net_mosq.h
net_mosq.o : net_mosq.c net_mosq.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
options.o : options.c mosquitto.h mosquitto_internal.h
options.o : options.c ../include/mosquitto.h mosquitto_internal.h
${CROSS_COMPILE}$(CC) $(LIB_CPPFLAGS) $(LIB_CFLAGS) -c $< -o $@
packet_datatypes.o : packet_datatypes.c packet_mosq.h

View File

@ -30,7 +30,7 @@ set (MOSQ_SRCS
../lib/memory_mosq.c ../lib/memory_mosq.h
memory_public.c
mosquitto.c
mosquitto_broker.h mosquitto_broker_internal.h
../include/mosquitto_broker.h mosquitto_broker_internal.h
../lib/misc_mosq.c ../lib/misc_mosq.h
mux.c mux.h mux_epoll.c mux_poll.c
net.c
@ -203,7 +203,7 @@ if (UNIX)
endif (UNIX)
install(TARGETS mosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_SBINDIR}")
install(FILES mosquitto_broker.h mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES ../include/mosquitto_broker.h ../include/mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
if (WITH_TLS)
add_executable(mosquitto_passwd mosquitto_passwd.c ../lib/misc_mosq.c)

View File

@ -214,10 +214,10 @@ property_broker.o : property_broker.c mosquitto_broker_internal.h
property_mosq.o : ../lib/property_mosq.c ../lib/property_mosq.h
${CROSS_COMPILE}${CC} $(BROKER_CPPFLAGS) $(BROKER_CFLAGS) -c $< -o $@
plugin.o : plugin.c mosquitto_plugin.h mosquitto_broker_internal.h
plugin.o : plugin.c ../include/mosquitto_plugin.h mosquitto_broker_internal.h
${CROSS_COMPILE}${CC} $(BROKER_CPPFLAGS) $(BROKER_CFLAGS) -c $< -o $@
plugin_public.o : plugin_public.c mosquitto_plugin.h mosquitto_broker_internal.h
plugin_public.o : plugin_public.c ../include/mosquitto_plugin.h mosquitto_broker_internal.h
${CROSS_COMPILE}${CC} $(BROKER_CPPFLAGS) $(BROKER_CFLAGS) -c $< -o $@
read_handle.o : read_handle.c mosquitto_broker_internal.h
@ -310,18 +310,18 @@ mosquitto_passwd : mosquitto_passwd.o misc_mosq.o
mosquitto_passwd.o : mosquitto_passwd.c
${CROSS_COMPILE}${CC} -I.. -I../lib $(CPPFLAGS) $(CFLAGS) -c $< -o $@
plugin_defer.so : plugin_defer.c mosquitto_plugin.h mosquitto_broker.h mosquitto_broker_internal.h
plugin_defer.so : plugin_defer.c ../include/mosquitto_plugin.h ../include/mosquitto_broker.h mosquitto_broker_internal.h
${CROSS_COMPILE}${CC} -I. -I../lib -fPIC -shared $< -o $@
plugin_debug.so : plugin_debug.c mosquitto_plugin.h mosquitto_broker.h mosquitto_broker_internal.h
plugin_debug.so : plugin_debug.c ../include/mosquitto_plugin.../include/h mosquitto_broker.h mosquitto_broker_internal.h
${CROSS_COMPILE}${CC} -I. -I../lib -fPIC -shared $< -o $@
install : all
$(INSTALL) -d "${DESTDIR}$(prefix)/sbin"
$(INSTALL) ${STRIP_OPTS} mosquitto "${DESTDIR}${prefix}/sbin/mosquitto"
$(INSTALL) -d "${DESTDIR}$(prefix)/include"
$(INSTALL) mosquitto_broker.h "${DESTDIR}${prefix}/include/mosquitto_broker.h"
$(INSTALL) mosquitto_plugin.h "${DESTDIR}${prefix}/include/mosquitto_plugin.h"
$(INSTALL) ../include/mosquitto_broker.h "${DESTDIR}${prefix}/include/mosquitto_broker.h"
$(INSTALL) ../include/mosquitto_plugin.h "${DESTDIR}${prefix}/include/mosquitto_plugin.h"
ifeq ($(WITH_TLS),yes)
$(INSTALL) -d "${DESTDIR}$(prefix)/bin"
$(INSTALL) ${STRIP_OPTS} mosquitto_passwd "${DESTDIR}${prefix}/bin/mosquitto_passwd"

View File

@ -1,6 +1,6 @@
.PHONY: all test clean reallyclean
CFLAGS=-I../../../lib -I../../../src -Wall -Werror
CFLAGS=-I../../../include -Wall -Werror
PLUGIN_SRC = \
auth_plugin_v4.c \

View File

@ -1,6 +1,6 @@
.PHONY: all clean reallyclean
CFLAGS=-I../../../lib -Werror
CFLAGS=-I../../../include -Werror
LIBS=../../../lib/libmosquitto.so.1
SRC = \

View File

@ -1,6 +1,6 @@
.PHONY: all test 01 02 03 04 08 09 clean reallyclean
CFLAGS=-I../../../lib -I../../../lib/cpp -DDEBUG
CFLAGS=-I../../../include -I../../../lib/cpp -DDEBUG
LIBS=../../../lib/libmosquitto.so.1 ../../../lib/cpp/libmosquittopp.so.1
all : 01 02 03 04 08 09

View File

@ -2,7 +2,7 @@ include ../../config.mk
.PHONY: all check test test-broker test-lib clean coverage
CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../lib -I../../src
CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../include -I../../lib -I../../src
ifeq ($(WITH_BUNDLED_DEPS),yes)
CPPFLAGS:=$(CPPFLAGS) -I../../src/deps
endif