Commit Graph
20 Commits
Author SHA1 Message Date
Jon Shallow a31dcba587 coap-client: Rename client.c to coap-client.c
Keep the examples source names and executables in the same form
for consistency.
2021-02-26 14:21:12 +00:00
Jon Shallow 78c59ff300 Add in support for building coap-etsi_iot_01 and coap-tiny examples
examples/Makefile.am

Support building the additional examples using 'make check'.

.gitignore

Ignore the new examples executables.
2018-12-07 20:22:56 +00:00
Olaf Bergmann 839bdc5418 Revert "examples/Makefile.am: remove $(DTLS_LIBS) variable"
This reverts commit 91bfd5b103 because
it introduced a wrong variable substitution:

The problem here is that top_srcdir is . in the top-level Makefile, so
the link command ends up having this:

  [...]   ../.libs/libcoap-2-tinydtls.a -L./ext/tinydtls -ltinydtls

Whereas, in examples/Makefile.am, top_srcdir is .., so using DTLS_LIBS
would be correctly replaced by

          ../.libs/libcoap-2-tinydtls.a -L../ext/tinydtls -ltinydtls

The same holds for the Makefile in the subdirectory tests.
2018-11-08 11:24:04 +01:00
Carsten Schoenert 91bfd5b103 examples/Makefile.am: remove $(DTLS_LIBS) variable
Using the variable $(DTLS_LIBS) in the *_LDADD isn't correct, for
controlling the linker flags the *.la file is normally holding all the
required information.

This was introduced by 5687681d71 and is
partially removed by this commit.
2018-11-06 17:37:55 +01:00
Carsten Schoenert 6dde2bc9a8 examples: use the coap2 folder for including coap.h
Due the changed installation folder we need to adjust the source path to
coap.h for the files within the files of the examples.
2018-10-04 12:23:14 +02:00
Jon Shallow 843f036b16 examples/Makefile.am: Remove coap_list.c from files needed for coap-client 2018-05-17 18:45:07 +01:00
Jon Shallow ef6c72bf44 examples/Makefile.am: Update for new libcoap library naming 2018-04-13 08:43:37 +01:00
Jon Shallow 20cd610c03 examples/Makefile.am: Remove building man pages
Delete building man pages as they are now a part of the man directory
2018-04-07 11:34:44 +01:00
Diego Santa Cruz 9b12571804 Makefile.am: fix building outside of source tree
When building outside the source tree compilation fails on
examples, because the libcoap headers expect to be all in the
same directory but coap.h is generated under the build
directory, so it is necessary to add an extra include path
for it.

Also, build directories should always appear before source
directories in the include path, so that any leftover
generated files in the source tree are ignored.
2017-09-20 10:48:54 +02:00
Olaf Bergmann 5687681d71 {tests/examples}/Makefile.am: add DTLS variables for static linkage
Statically linked executables require DTLS_CFLAGS and DTLS_LIBS.
2017-07-10 15:33:39 +02:00
Olaf Bergmann 6d7ba61ae0 libcoap-1.pc: fix pkg-config include path
This change excludes the coap subdirectory from the include path
reported by pkg-config --cflags to avoid name conflicts with other
installed packages. Applications now must add the prefix 'coap/'
to include directives for libcoap header files, e.g.

  #include <coap/coap.h>

Jean-Claude Michelou has reported this problem in Bug #82 [1].

[1] https://github.com/obgm/libcoap/issues/82

A minimal Makefile now could look be written as:

  PKG_LIBCOAP=libcoap-1
  CPPFLAGS=$(shell pkg-config --cflags-only-I $(PKG_LIBCOAP)) -DWITH_POSIX
  LDFLAGS=$(shell pkg-config --libs-only-L $(PKG_LIBCOAP))
  LDLIBS=$(shell pkg-config --libs-only-l $(PKG_LIBCOAP))
2017-06-01 12:33:04 +02:00
Carsten Schoenert 18f2309759 make: enable out of tree build
The build environment was lacking the possibility to get libcoap
buildable out of tree, simply checkable by the running 'make distcheck'.
Without this fix the users are impossible to build libcoap in a own
folder that's independed from the source containing folder. Typical use
case would be:

  $ mkdir libcoap-build && cd libcoap-build
  $ /path/to/libcoap-source/configure \
      --srcdir=/path/to/libcoap-source \
      --prefix=/somethere/to-install

This commit enables the out of tree build by adding and changing some
needed variables.
2016-10-26 10:46:50 +02:00
Olaf Bergmann 2da31de732 configure.ac: fix disable options
The options --disable-documentation and --disable-examples did
not have the desired effect in some configurations. Now, if any
of documentation or examples is disabled, the manual pages in
the examples folder are not created.
2015-09-30 19:46:34 +02:00
Carsten Schoenert 141eefdbb6 a2x: adding a check for needed helper
The previous commit added some asciidoc based man pages that need a2x
from the asciidoc package. To ensure the build will not break due a not
available a2x binary we better check before.
2015-06-22 21:25:43 +02:00
Carsten Schoenert 3e9afb1460 examples/*: adding example binaries man page support
This commmit adds the build of man pages for the binaries from the
example/ folder, in detail these are coap-client.5, coap-rd.5 and
coap-server.5.
The source of the man pages is written in asciidoc so the build
environment must have access to a installed asciidoc package.
2015-06-22 21:25:43 +02:00
Carsten Schoenert 1043892391 rename the example binaries to more strict naming schema
To normalize (and in preparation for manpages) the currently used files
for the example implementation of a CoAP based client, server and a
resource directory various files and variables are rename to coap-*.
2015-06-19 20:53:47 +02:00
Carsten Schoenert 21431bcb2f examples/Makefile.am: small fix for the path declaration 2015-06-02 20:41:37 +02:00
Carsten Schoenert 47e0c25c38 examples/Makefile.am: changing header includes
The build of the examples is complaining about a function that are not
inline'd. The compiler is mentioned this because we use the '-I'
directive for pointing to the header files. Just say the compiler also
that the header files are system headers so the false positive is going
away.
2015-03-22 14:38:36 +01:00
Carsten Schoenert da3570cb41 examples/Makefile.am: fix not needed target
The target 'install-exec-am' is obviosly wrong and not really needed.
2015-03-22 13:37:28 +01:00
Carsten Schoenert 60030d0fb4 examples: adding the examples folder to the build
After including the doc/ and the tests/ folder under the hood of the
autotools now adding the examples/ foolder too.
The user is now able to add the build of the example binarys if
configure is called with '--enable-examples' as option. The example
binarys will not be build by default!

Currently only 'coap-client', 'coap-server' and 'rd' is build.
2015-03-12 11:25:26 +01:00