Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
dce08beb
Commit
dce08beb
authored
Aug 19, 2013
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change test port back to 1883
parent
c48ba955
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
240 additions
and
1 deletion
+240
-1
build.xml
build.xml
+2
-1
build.xml~
build.xml~
+238
-0
No files found.
build.xml
View file @
dce08beb
...
@@ -167,7 +167,8 @@
...
@@ -167,7 +167,8 @@
<target
name=
"runAtest"
>
<target
name=
"runAtest"
>
<exec
executable=
"./${aTest}"
failonerror=
"true"
dir=
"${output.folder}"
>
<exec
executable=
"./${aTest}"
failonerror=
"true"
dir=
"${output.folder}"
>
<arg
value=
"--connection"
/>
<arg
value=
"--connection"
/>
<arg
value=
"tcp://${test.hostname}:18883"
/>
<arg
value=
"tcp://${test.hostname}:1883"
/>
<arg
value=
"--verbose"
/>
<env
key=
"LD_LIBRARY_PATH"
value=
"."
/>
<env
key=
"LD_LIBRARY_PATH"
value=
"."
/>
</exec>
</exec>
</target>
</target>
...
...
build.xml~
0 → 100644
View file @
dce08beb
<project name="MQTT C Client" default="full">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="/opt/public/cbi/build/3rdPartyJars/ant-contrib.jar" />
<pathelement location="/usr/share/java/ant-contrib.jar" />
</classpath>
</taskdef>
<property name="output.folder" value="build/output" />
<property name="release.version" value="1.0.0.2" />
<property name="libname" value="mqttv3c" />
<property name="libname.ssl" value="mqttv3cs" />
<property name="libname.async" value="mqttv3a" />
<property name="libname.async.ssl" value="mqttv3as" />
<property name="ssl" value="yes" />
<target name="init">
<tstamp>
<format property="buildTimestamp" pattern="yyyyMMddHHmm" />
</tstamp>
<property name="test.hostname" value="m2m.eclipse.org"/>
<fileset id="sync.source.fileset" dir="src">
<include name="*.c"/>
<exclude name="MQTTAsync.c"/>
<exclude name="MQTTVersion.c"/>
</fileset>
<pathconvert refid="sync.source.fileset" property="sync.source.files" pathsep=" "/>
<fileset id="async.source.fileset" dir="src">
<include name="*.c"/>
<exclude name="MQTTClient.c"/>
<exclude name="MQTTVersion.c"/>
</fileset>
<pathconvert refid="async.source.fileset" property="async.source.files" pathsep=" "/>
</target>
<target name="version" depends="init" description="replace tags in the source with the right levels">
<property name="build.level" value="${DSTAMP}${TSTAMP}" />
<replace file="src/MQTTClient.c" token="##MQTTCLIENT_BUILD_TAG##" value="${build.level}" />
<replace file="src/MQTTClient.c" token="##MQTTCLIENT_VERSION_TAG##" value="${release.version}" />
<replace file="src/MQTTAsync.c" token="##MQTTCLIENT_BUILD_TAG##" value="${build.level}" />
<replace file="src/MQTTAsync.c" token="##MQTTCLIENT_VERSION_TAG##" value="${release.version}" />
</target>
<target name="compile" depends="version">
<if>
<os family="unix" />
<then>
<property name="ccflags.so" value="-fPIC -Os -Wall" />
<property name="ldflags.so" value="-fvisibility=hidden -shared" />
<mkdir dir="${output.folder}"/>
<!-- non-SSL, synchronous library -->
<property name="output.filename" value="${output.folder}/lib${libname}.so" />
<exec executable="gcc" failonerror="true">
<arg line="${ccflags.so} ${ldflags.so} -Wl,-soname,lib${libname}.so -o ${output.filename} ${sync.source.files}"/>
</exec>
<exec executable="strip" failonerror="true">
<arg value="${output.filename}" />
</exec>
<if>
<equals arg1="${ssl}" arg2="yes" />
<then>
<!-- SSL, synchronous library -->
<property name="output.ssl.filename" value="${output.folder}/lib${libname.ssl}.so" />
<exec executable="gcc" failonerror="true">
<arg line="-DOPENSSL ${ccflags.so} ${ldflags.so} -Wl,-soname,lib${libname.ssl}.so -o ${output.ssl.filename} ${sync.source.files}"/>
</exec>
<exec executable="strip" failonerror="true">
<arg value="${output.ssl.filename}" />
</exec>
</then>
</if>
<!-- non-SSL, asynchronous library -->
<property name="output.async.filename" value="${output.folder}/lib${libname.async}.so" />
<exec executable="gcc" failonerror="true">
<arg line="${ccflags.so} ${ldflags.so} -Wl,-soname,lib${libname.async}.so -o ${output.async.filename} ${async.source.files}"/>
</exec>
<exec executable="strip" failonerror="true">
<arg value="${output.async.filename}" />
</exec>
<if>
<equals arg1="${ssl}" arg2="yes" />
<then>
<!-- SSL, asynchronous library -->
<property name="output.async.ssl.filename" value="${output.folder}/lib${libname.async.ssl}.so" />
<exec executable="gcc" failonerror="true">
<arg line="-DOPENSSL ${ccflags.so} ${ldflags.so} -Wl,-soname,lib${libname.async.ssl}.so -o ${output.async.ssl.filename} ${async.source.files}"/>
</exec>
<exec executable="strip" failonerror="true">
<arg value="${output.async.ssl.filename}" />
</exec>
</then>
</if>
<!-- MQTTVersion -->
<property name="output.async.ssl.filename" value="${output.folder}/lib${libname.async.ssl}.so" />
<exec executable="gcc" failonerror="true">
<arg line="-lpthread -ldl -o ${output.folder}/MQTTVersion src/MQTTVersion.c"/>
</exec>
<exec executable="strip" failonerror="true">
<arg value="${output.folder}/MQTTVersion" />
</exec>
<!-- Samples
<property name="output.async.ssl.filename" value="${output.folder}/lib${libname.async.ssl}.so" />
<foreach list="$">
<exec executable="gcc" failonerror="true">
<arg line="-lpthread -ldl -o ${output.folder}/MQTTVersion src/MQTTVersion.c"/>
</exec>
<exec executable="strip" failonerror="true">
<arg value="${output.folder}/MQTTVersion" />
</exec> -->
<!-- Build tests -->
<foreach target="onecompile" param="aFile" list="test1"/>
<foreach target="onecompiles" param="aFile" list="test3"/>
<foreach target="asynccompile" param="aFile" list="test4"/>
<foreach target="asynccompiles" param="aFile" list="test5"/>
</then>
<elseif>
<os family="windows" />
<then>
</then>
</elseif>
</if>
</target>
<target name="onecompile" >
<exec executable="gcc" failonerror="true">
<arg line="-I src -lpthread -lmqttv3c -L${output.folder} -o ${output.folder}/${aFile} test/${aFile}.c"/>
</exec>
</target>
<target name="onecompiles" >
<exec executable="gcc" failonerror="true">
<arg line="-I src -lpthread -lmqttv3cs -lssl -L${output.folder} -o ${output.folder}/${aFile} test/${aFile}.c"/>
</exec>
</target>
<target name="asynccompile" >
<exec executable="gcc" failonerror="true">
<arg line="-I src -lpthread -lmqttv3a -L${output.folder} -o ${output.folder}/${aFile} test/${aFile}.c"/>
</exec>
</target>
<target name="asynccompiles" >
<exec executable="gcc" failonerror="true">
<arg line="-I src -lpthread -lmqttv3as -lssl -L${output.folder} -o ${output.folder}/${aFile} test/${aFile}.c"/>
</exec>
</target>
<target name="test" >
<foreach target="runAtest" param="aTest" list="test1,test4"/>
<foreach target="runSSLtest" param="aTest" list="test3"/>
</target>
<target name="runAtest">
<exec executable="./${aTest}" failonerror="true" dir="${output.folder}" >
<arg value="--connection" />
<arg value="tcp://${test.hostname}:1883" />
<env key="LD_LIBRARY_PATH" value="." />
</exec>
</target>
<target name="runSSLtest">
<exec executable="./${aTest}" failonerror="true" dir="${output.folder}" >
<arg value="--hostname" />
<arg value="test.hostname" />
<env key="LD_LIBRARY_PATH" value="." />
</exec>
</target>
<target name="doc" >
<if>
<available file="${doxygen}"/>
<then>
<exec executable="${doxygen}" dir="${mqttclient_src}">
<arg value="${source.folder}/mqttv3c/doc/DoxyfileV3ClientAPI"/>
</exec>
<mkdir dir="${ship.folder}/doc/html"/>
<copy todir="${ship.folder}/doc/html">
<fileset dir="${mqttclient_src}/MQTTClient/html"/>
</copy>
<!-- <zip destfile="${output.folder}/doc/MQTTClient.zip">
<zipfileset dir="${mqttclient_src}/MQTTClient" />
</zip> -->
<exec executable="${doxygen}" dir="${mqttclient_src}">
<arg value="${source.folder}/mqttv3c/doc/DoxyfileV3AsyncAPI"/>
</exec>
<mkdir dir="${ship.folder}/doc/html/MQTTAsync"/>
<copy todir="${ship.folder}/doc/html/MQTTAsync">
<fileset dir="${mqttclient_src}/MQTTAsync"/>
</copy>
<!-- <zip destfile="${output.folder}/doc/MQTTAsync.zip">
<zipfileset dir="${mqttclient_src}/MQTTAsync" prefix="MQTTAsync/"/>
</zip> -->
<delete dir="${mqttclient_src}/MQTTClient" />
<delete dir="${mqttclient_src}/MQTTAsync" />
</then>
<else>
<echo message="doxygen is not available" />
</else>
</if>
</target>
<target name="copy">
<mkdir dir="${ship.folder}/include"/>
<echo message="Copying the headers for the c_client from the output tree" />
<copy overwrite="true" todir="${ship.folder}/include">
<fileset dir="${mqttclient_src}">
<include name="MQTTClient.h"/>
<include name="MQTTClientPersistence.h"/>
<include name="MQTTAsync.h"/>
</fileset>
</copy>
<echo message="Copying the source.zip file from the output tree" />
<copy overwrite="true" todir="${ship.folder}">
<fileset dir="${output.folder}">
<include name="source.zip"/>
</fileset>
</copy>
</target>
<!-- target name="full" depends="init, version, compile, doc, copy" -->
<target name="full" depends="init, version, compile, test" />
</project>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment