提交 5f1bfaea 编写于 作者: I Ian Craggs

Merge branch 'develop'

...@@ -23,6 +23,24 @@ ...@@ -23,6 +23,24 @@
SHELL = /bin/sh SHELL = /bin/sh
.PHONY: clean, mkdir, install, uninstall, html .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 # assume this is normally run in the main Paho directory
ifndef srcdir ifndef srcdir
srcdir = src srcdir = src
...@@ -78,19 +96,6 @@ MQTTLIB_CS = paho-mqtt3cs ...@@ -78,19 +96,6 @@ MQTTLIB_CS = paho-mqtt3cs
MQTTLIB_A = paho-mqtt3a MQTTLIB_A = paho-mqtt3a
MQTTLIB_AS = paho-mqtt3as 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 CC ?= gcc
ifndef INSTALL ifndef INSTALL
...@@ -121,6 +126,8 @@ LDFLAGS_AS = $(LDFLAGS) -shared $(START_GROUP) -lpthread $(EXTRA_LIB) -lssl -lcr ...@@ -121,6 +126,8 @@ LDFLAGS_AS = $(LDFLAGS) -shared $(START_GROUP) -lpthread $(EXTRA_LIB) -lssl -lcr
ifeq ($(OSTYPE),Linux) 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 MQTTCLIENT_INIT = MQTTClient_init
MQTTASYNC_INIT = MQTTAsync_init MQTTASYNC_INIT = MQTTAsync_init
START_GROUP = -Wl,--start-group START_GROUP = -Wl,--start-group
...@@ -135,6 +142,8 @@ LDFLAGS_AS += -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -Wl,-no-whole-arc ...@@ -135,6 +142,8 @@ LDFLAGS_AS += -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -Wl,-no-whole-arc
else ifeq ($(OSTYPE),Darwin) 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 MQTTCLIENT_INIT = _MQTTClient_init
MQTTASYNC_INIT = _MQTTAsync_init MQTTASYNC_INIT = _MQTTAsync_init
START_GROUP = START_GROUP =
...@@ -181,21 +190,25 @@ ${ASYNC_SAMPLES}: ${blddir}/samples/%: ${srcdir}/samples/%.c $(MQTTLIB_A_TARGET) ...@@ -181,21 +190,25 @@ ${ASYNC_SAMPLES}: ${blddir}/samples/%: ${srcdir}/samples/%.c $(MQTTLIB_A_TARGET)
${CC} -o $@ $< -l${MQTTLIB_A} ${FLAGS_EXE} ${CC} -o $@ $< -l${MQTTLIB_A} ${FLAGS_EXE}
${MQTTLIB_C_TARGET}: ${SOURCE_FILES_C} ${HEADERS_C} ${MQTTLIB_C_TARGET}: ${SOURCE_FILES_C} ${HEADERS_C}
$(SED_COMMAND) $(srcdir)/MQTTClient.c
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_C} ${LDFLAGS_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.${VERSION} ${blddir}/lib$(MQTTLIB_C).so.${MAJOR_VERSION}
-ln -s lib$(MQTTLIB_C).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_C).so -ln -s lib$(MQTTLIB_C).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_C).so
${MQTTLIB_CS_TARGET}: ${SOURCE_FILES_CS} ${HEADERS_C} ${MQTTLIB_CS_TARGET}: ${SOURCE_FILES_CS} ${HEADERS_C}
$(SED_COMMAND) $(srcdir)/MQTTClient.c
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_CS} -DOPENSSL ${LDFLAGS_CS} ${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.${VERSION} ${blddir}/lib$(MQTTLIB_CS).so.${MAJOR_VERSION}
-ln -s lib$(MQTTLIB_CS).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_CS).so -ln -s lib$(MQTTLIB_CS).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_CS).so
${MQTTLIB_A_TARGET}: ${SOURCE_FILES_A} ${HEADERS_A} ${MQTTLIB_A_TARGET}: ${SOURCE_FILES_A} ${HEADERS_A}
$(SED_COMMAND) $(srcdir)/MQTTAsync.c
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_A} ${LDFLAGS_A} ${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.${VERSION} ${blddir}/lib$(MQTTLIB_A).so.${MAJOR_VERSION}
-ln -s lib$(MQTTLIB_A).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_A).so -ln -s lib$(MQTTLIB_A).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_A).so
${MQTTLIB_AS_TARGET}: ${SOURCE_FILES_AS} ${HEADERS_A} ${MQTTLIB_AS_TARGET}: ${SOURCE_FILES_AS} ${HEADERS_A}
$(SED_COMMAND) $(srcdir)/MQTTAsync.c
${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_AS} -DOPENSSL ${LDFLAGS_AS} ${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.${VERSION} ${blddir}/lib$(MQTTLIB_AS).so.${MAJOR_VERSION}
-ln -s lib$(MQTTLIB_AS).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_AS).so -ln -s lib$(MQTTLIB_AS).so.${MAJOR_VERSION} ${blddir}/lib$(MQTTLIB_AS).so
......
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2009, 2014 IBM Corp. * Copyright (c) 2009, 2015 IBM Corp.
* *
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* @cond MQTTAsync_main * @cond MQTTAsync_main
* @mainpage Asynchronous MQTT client library for C * @mainpage Asynchronous MQTT client library for C
* *
* &copy; Copyright IBM Corp. 2009, 2014 * &copy; Copyright IBM Corp. 2009, 2015
* *
* @brief An Asynchronous MQTT client library for C. * @brief An Asynchronous MQTT client library for C.
* *
...@@ -447,7 +447,7 @@ DLLExport int MQTTAsync_setCallbacks(MQTTAsync handle, void* context, MQTTAsync_ ...@@ -447,7 +447,7 @@ DLLExport int MQTTAsync_setCallbacks(MQTTAsync handle, void* context, MQTTAsync_
* @param serverURI A null-terminated string specifying the server to * @param serverURI A null-terminated string specifying the server to
* which the client will connect. It takes the form <i>protocol://host:port</i>. * 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 * <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 * a server running on the local machines with the default MQTT port, specify
* <i>tcp://localhost:1883</i>. * <i>tcp://localhost:1883</i>.
* @param clientId The client identifier passed to the server when the * @param clientId The client identifier passed to the server when the
......
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2009, 2014 IBM Corp. * Copyright (c) 2009, 2015 IBM Corp.
* *
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* @endcond * @endcond
* @cond MQTTClient_main * @cond MQTTClient_main
* @mainpage MQTT Client library for C * @mainpage MQTT Client library for C
* &copy; Copyright IBM Corp. 2009, 2014 * &copy; Copyright IBM Corp. 2009, 2015
* *
* @brief An MQTT client library in C. * @brief An MQTT client library in C.
* *
...@@ -370,8 +370,9 @@ DLLExport int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClie ...@@ -370,8 +370,9 @@ DLLExport int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClie
* this function. * this function.
* @param serverURI A null-terminated string specifying the server to * @param serverURI A null-terminated string specifying the server to
* which the client will connect. It takes the form <i>protocol://host:port</i>. * 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 * Currently, <i>protocol</i> must be <i>tcp</i> or <i>ssl</i>.
* specify either an IP address or a domain name. For instance, to connect to * 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 * a server running on the local machines with the default MQTT port, specify
* <i>tcp://localhost:1883</i>. * <i>tcp://localhost:1883</i>.
* @param clientId The client identifier passed to the server when the * @param clientId The client identifier passed to the server when the
...@@ -567,13 +568,13 @@ typedef struct ...@@ -567,13 +568,13 @@ typedef struct
*/ */
MQTTClient_willOptions* will; 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 * and authorisation by user name and password. This is the user name
* parameter. * parameter.
*/ */
const char* username; 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 * and authorisation by user name and password. This is the password
* parameter. * parameter.
*/ */
......
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2012, 2014 IBM Corp. * Copyright (c) 2012, 2015 IBM Corp.
* *
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
...@@ -178,7 +178,7 @@ void printEyecatchers(char* filename) ...@@ -178,7 +178,7 @@ void printEyecatchers(char* filename)
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
printf("MQTTVersion: print the version strings of an MQTT client library\n"); 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) if (argc == 1)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册