mirror of https://github.com/eclipse/paho.mqtt.c
Merge branch 'develop'
This commit is contained in:
commit
5f1bfaea87
39
Makefile
39
Makefile
|
|
@ -23,6 +23,24 @@
|
|||
SHELL = /bin/sh
|
||||
.PHONY: clean, mkdir, install, uninstall, html
|
||||
|
||||
ifndef release.version
|
||||
release.version = 1.0.3
|
||||
endif
|
||||
|
||||
# determine current platform
|
||||
BUILD_TYPE ?= debug
|
||||
ifeq ($(OS),Windows_NT)
|
||||
OSTYPE ?= $(OS)
|
||||
MACHINETYPE ?= $(PROCESSOR_ARCHITECTURE)
|
||||
else
|
||||
OSTYPE ?= $(shell uname -s)
|
||||
MACHINETYPE ?= $(shell uname -m)
|
||||
build.level = $(shell date)
|
||||
endif # OS
|
||||
ifeq ($(OSTYPE),linux)
|
||||
OSTYPE = Linux
|
||||
endif
|
||||
|
||||
# assume this is normally run in the main Paho directory
|
||||
ifndef srcdir
|
||||
srcdir = src
|
||||
|
|
@ -78,19 +96,6 @@ MQTTLIB_CS = paho-mqtt3cs
|
|||
MQTTLIB_A = paho-mqtt3a
|
||||
MQTTLIB_AS = paho-mqtt3as
|
||||
|
||||
# determine current platform
|
||||
BUILD_TYPE ?= debug
|
||||
ifeq ($(OS),Windows_NT)
|
||||
OSTYPE ?= $(OS)
|
||||
MACHINETYPE ?= $(PROCESSOR_ARCHITECTURE)
|
||||
else
|
||||
OSTYPE ?= $(shell uname -s)
|
||||
MACHINETYPE ?= $(shell uname -m)
|
||||
endif # OS
|
||||
ifeq ($(OSTYPE),linux)
|
||||
OSTYPE = Linux
|
||||
endif
|
||||
|
||||
CC ?= gcc
|
||||
|
||||
ifndef INSTALL
|
||||
|
|
@ -121,6 +126,8 @@ LDFLAGS_AS = $(LDFLAGS) -shared $(START_GROUP) -lpthread $(EXTRA_LIB) -lssl -lcr
|
|||
|
||||
ifeq ($(OSTYPE),Linux)
|
||||
|
||||
SED_COMMAND = sed -i "s/\#\#MQTTCLIENT_VERSION_TAG\#\#/${release.version}/g; s/\#\#MQTTCLIENT_BUILD_TAG\#\#/${build.level}/g"
|
||||
|
||||
MQTTCLIENT_INIT = MQTTClient_init
|
||||
MQTTASYNC_INIT = MQTTAsync_init
|
||||
START_GROUP = -Wl,--start-group
|
||||
|
|
@ -135,6 +142,8 @@ LDFLAGS_AS += -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -Wl,-no-whole-arc
|
|||
|
||||
else ifeq ($(OSTYPE),Darwin)
|
||||
|
||||
SED_COMMAND = sed -i "" -e "s/\#\#MQTTCLIENT_VERSION_TAG\#\#/${release.version}/g" -e "s/\#\#MQTTCLIENT_BUILD_TAG\#\#/${build.level}/g"
|
||||
|
||||
MQTTCLIENT_INIT = _MQTTClient_init
|
||||
MQTTASYNC_INIT = _MQTTAsync_init
|
||||
START_GROUP =
|
||||
|
|
@ -181,21 +190,25 @@ ${ASYNC_SAMPLES}: ${blddir}/samples/%: ${srcdir}/samples/%.c $(MQTTLIB_A_TARGET)
|
|||
${CC} -o $@ $< -l${MQTTLIB_A} ${FLAGS_EXE}
|
||||
|
||||
${MQTTLIB_C_TARGET}: ${SOURCE_FILES_C} ${HEADERS_C}
|
||||
$(SED_COMMAND) $(srcdir)/MQTTClient.c
|
||||
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_C} ${LDFLAGS_C}
|
||||
-ln -s lib$(MQTTLIB_C).so.${VERSION} ${blddir}/lib$(MQTTLIB_C).so.${MAJOR_VERSION}
|
||||
-ln -s lib$(MQTTLIB_C).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_C).so
|
||||
|
||||
${MQTTLIB_CS_TARGET}: ${SOURCE_FILES_CS} ${HEADERS_C}
|
||||
$(SED_COMMAND) $(srcdir)/MQTTClient.c
|
||||
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_CS} -DOPENSSL ${LDFLAGS_CS}
|
||||
-ln -s lib$(MQTTLIB_CS).so.${VERSION} ${blddir}/lib$(MQTTLIB_CS).so.${MAJOR_VERSION}
|
||||
-ln -s lib$(MQTTLIB_CS).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_CS).so
|
||||
|
||||
${MQTTLIB_A_TARGET}: ${SOURCE_FILES_A} ${HEADERS_A}
|
||||
$(SED_COMMAND) $(srcdir)/MQTTAsync.c
|
||||
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_A} ${LDFLAGS_A}
|
||||
-ln -s lib$(MQTTLIB_A).so.${VERSION} ${blddir}/lib$(MQTTLIB_A).so.${MAJOR_VERSION}
|
||||
-ln -s lib$(MQTTLIB_A).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_A).so
|
||||
|
||||
${MQTTLIB_AS_TARGET}: ${SOURCE_FILES_AS} ${HEADERS_A}
|
||||
$(SED_COMMAND) $(srcdir)/MQTTAsync.c
|
||||
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_AS} -DOPENSSL ${LDFLAGS_AS}
|
||||
-ln -s lib$(MQTTLIB_AS).so.${VERSION} ${blddir}/lib$(MQTTLIB_AS).so.${MAJOR_VERSION}
|
||||
-ln -s lib$(MQTTLIB_AS).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_AS).so
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2014 IBM Corp.
|
||||
* Copyright (c) 2009, 2015 IBM Corp.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* @cond MQTTAsync_main
|
||||
* @mainpage Asynchronous MQTT client library for C
|
||||
*
|
||||
* © Copyright IBM Corp. 2009, 2014
|
||||
* © Copyright IBM Corp. 2009, 2015
|
||||
*
|
||||
* @brief An Asynchronous MQTT client library for C.
|
||||
*
|
||||
|
|
@ -447,7 +447,7 @@ DLLExport int MQTTAsync_setCallbacks(MQTTAsync handle, void* context, MQTTAsync_
|
|||
* @param serverURI A null-terminated string specifying the server to
|
||||
* which the client will connect. It takes the form <i>protocol://host:port</i>.
|
||||
* <i>protocol</i> must be <i>tcp</i> or <i>ssl</i>. For <i>host</i>, you can
|
||||
* specify either an IP address or a domain name. For instance, to connect to
|
||||
* specify either an IP address or a host name. For instance, to connect to
|
||||
* a server running on the local machines with the default MQTT port, specify
|
||||
* <i>tcp://localhost:1883</i>.
|
||||
* @param clientId The client identifier passed to the server when the
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2014 IBM Corp.
|
||||
* Copyright (c) 2009, 2015 IBM Corp.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
* @endcond
|
||||
* @cond MQTTClient_main
|
||||
* @mainpage MQTT Client library for C
|
||||
* © Copyright IBM Corp. 2009, 2014
|
||||
* © Copyright IBM Corp. 2009, 2015
|
||||
*
|
||||
* @brief An MQTT client library in C.
|
||||
*
|
||||
|
|
@ -370,8 +370,9 @@ DLLExport int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClie
|
|||
* this function.
|
||||
* @param serverURI A null-terminated string specifying the server to
|
||||
* which the client will connect. It takes the form <i>protocol://host:port</i>.
|
||||
* Currently, <i>protocol</i> must be <i>tcp</i>. For <i>host</i>, you can
|
||||
* specify either an IP address or a domain name. For instance, to connect to
|
||||
* Currently, <i>protocol</i> must be <i>tcp</i> or <i>ssl</i>.
|
||||
* For <i>host</i>, you can
|
||||
* specify either an IP address or a host name. For instance, to connect to
|
||||
* a server running on the local machines with the default MQTT port, specify
|
||||
* <i>tcp://localhost:1883</i>.
|
||||
* @param clientId The client identifier passed to the server when the
|
||||
|
|
@ -567,13 +568,13 @@ typedef struct
|
|||
*/
|
||||
MQTTClient_willOptions* will;
|
||||
/**
|
||||
* MQTT servers that support the MQTT v3.1 protocol provide authentication
|
||||
* MQTT servers that support the MQTT v3.1.1 protocol provide authentication
|
||||
* and authorisation by user name and password. This is the user name
|
||||
* parameter.
|
||||
*/
|
||||
const char* username;
|
||||
/**
|
||||
* MQTT servers that support the MQTT v3.1 protocol provide authentication
|
||||
* MQTT servers that support the MQTT v3.1.1 protocol provide authentication
|
||||
* and authorisation by user name and password. This is the password
|
||||
* parameter.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2014 IBM Corp.
|
||||
* Copyright (c) 2012, 2015 IBM Corp.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
|
|
@ -178,7 +178,7 @@ void printEyecatchers(char* filename)
|
|||
int main(int argc, char** argv)
|
||||
{
|
||||
printf("MQTTVersion: print the version strings of an MQTT client library\n");
|
||||
printf("Copyright (c) 2013 IBM Corp.\n");
|
||||
printf("Copyright (c) 2012, 2015 IBM Corp.\n");
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue