Commit Graph
23 Commits
Author SHA1 Message Date
Olaf Bergmann cfdfd030f9 coap_io.c: Moved to platform/posix/ 2016-04-08 15:14:20 +02:00
Olaf Bergmann 96d572d309 prng.c: move platform-specific PRNG invocation into separate files
This change introduces a new subtree in the library's directory structure.
Platform-specific code now should be placed into the corresponding directory
in src/platform/. To illustrate this, prng.h has been split into three
distinct files, one for each platform (contiki, lwip, posix) and moved into
the respective subdirectory.
2016-04-08 15:14:20 +02:00
Olaf Bergmann a6f7fc76fb Makefile.am, coap.h.in: Remove obsolete header t_list.h
t_list.h has been replaced entirely by utlist.h and thus is not
used anymore. This change removes the last traces.
2016-01-11 18:34:37 +01:00
Carsten Schoenert eb7ae9b461 Makefile.am: adding libcoap.h to the install targets
After the creation of the new header file libcoap.h we need to add this
file to the installation of libcoap.
2016-01-10 17:49:07 +01:00
Carsten Schoenert bbe048ca8b Makefile.am: add more files to distribution
The CONTRIBUTE and TODO file should be included to the tarball as well.
2015-06-02 20:41:37 +02:00
Carsten Schoenert db77014cea fix missing header files for 'make dist'
The run of 'make dist' isn't pickup some also needed header files in
examples/ and tests/ adding the file to EXTRA_DIST.
2015-03-22 14:35:14 +01:00
Olaf Bergmann a5722b0ad1 Makefile.am: adding missing files to tarball.tar.bz2
The fixup for the broken 'make dist' doesn't catch up files in
$top_srcdir.
2015-03-22 14:35:13 +01:00
Olaf Bergmann 41fac9248b Makefile.am: make ctags ignore lwip-specific identifiers
The Makefile uses ctags to build a list of global identifiers
that should be exported in a dynamic library. As ctags has a
very simplistic way of handling preprocessor conditionals, it
cannot detect symbols that are not present on platform POSIX.
In particular, the Solaris ld chokes on the following:

Undefined                       first referenced
 symbol                             in file
coap_pdu_from_pbuf                  ../.libs/libcoap-1.0.so
coap_packet_extract_pbuf            ../.libs/libcoap-1.0.so

The easiest way to fix this is to tell ctags that is should
ignore these identifiers with option -I.
2015-03-13 13:27:31 +01:00
Olaf Bergmann c5028c5013 Makefile.am: make new target check_ctags phony 2015-03-13 13:21:35 +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
Carsten Schoenert 6d2edc7cfa Makefile.am: moving check_ctags to a target
Calling a shellscript within a Makefile is not POSIX compliant, it's
possible that it would not work on all platforms. But using the check
for ctags as a seperate target within the main Makefile is no problem
and easy to change.

This commit is a addition to 101efbfe69
2015-03-12 11:25:26 +01:00
Olaf Bergmann 4c1af1b2e2 Makefile.am: Added missing src/address.c 2015-03-11 16:12:24 +01:00
Olaf Bergmann 4ca91190d6 Revised time-related functions to get rid of clock_offset for POSIX platform.
* Removed tne preprocessor defines for coap_tick() and coap_clock_init() --
  this made the code less readable and seemed to be of little use.

* Introduced the new type coap_time_t to represent wall clock time. On POSIX,
  this is the number of seconds since the epoch, while on embedded systems
  without a real time clock, this could be the number of seconds since the
  last reboot. The new function coap_ticks_to_rt() is used to convert
  coap_tick_t to coap_time.h. Currently, this is a division by COAP_TICKS_PER_SECOND
  on all platforms.

* POSIX: coap_tick_t is now defined as unsigned long to avoid overflows in
  coap_ticks().
2015-03-08 15:14:43 +01:00
Olaf Bergmann 489df85c88 Check if linker supports scripts for versioning
Use ld's option --version-script where available and fall back
to plain symbol file otherwise. This check uses the m4 macro
AX_CHECK_LINK_FLAG <http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html>
2015-03-03 19:21:44 +01:00
Olaf Bergmann 101efbfe69 Create symbol file libcoap-$(LIBCOAP_API_VERSION).sym
As not all versions of ld support linker scripts, we need plain
symbol files as fallback. This commit extends the Makefile target
'update-map-file' to create a .sym file in addition to the .map
file.
2015-03-03 19:21:43 +01:00
Carsten Schoenert 96d875ab7a CFLAGS: reorder the various CFLAGS inside the files
Doing up some housekeeping around the used CFLAGS.
To be more generic put the default declaration for additional warning
CFLAGS into configure.ac and clean up the Makefile.am's.

There are the default CFLAGS variable that is a global variable if not
re adjusted inside the different targets.

The second variable for CFLAGS is the AM_CFLAGS definition that is used
inside a Makefile as a global variable.

There is also the possibility to graduate the CFLAGS for a single
target. But currently there are nothing more than one target within each
Makefile so we can set for now the target specific CFLAGS to the
AM_CFLAGS.

A new variable called WARNING_CFLAGS is inside the configure.ac created,
this variable holds all the warnings flags inside. The Makefile.am's are
taking the values and is setting the variable AM_CFLAGS which is used in
the target specific CFLAGS. Also the options 'DWITH_POSIX' and
'D_GNU_SOURCE' are now appended to the CFLAGS if the configure script is
detecting a *-[uc]linux* system.
2015-03-03 19:21:43 +01:00
Carsten Schoenert c9c1a80271 adding the tests/ folder to the build environment
To let the previous added configure option '--enable-tests' really build
the testdriver binary adding the needed changes to the files in the main
folder.
Finally adding a new Makefile.am within the tests/ folder.
2015-03-03 19:21:43 +01:00
Carsten Schoenert 80d74208ce adding the doc/ folder to the build environment
To install the doxygen output, which is generated within doc/html/,
adding the needed checks for the doxygen binary to configure.ac and also
adding the needed doc/Makefile.am file.

Finally tuning doc/Doxyfile.in to let the autotools write the needed
informations into this file while generating the finally created
doc/Doxyfile.
2015-03-03 19:21:43 +01:00
Carsten Schoenert dc2ada4323 adding check for ctags
We need ctags to run the make target 'update-map-file' so we better give
a warning out if ctags wasn't found.
2015-03-03 19:21:43 +01:00
Carsten Schoenert a42f35303c adding dynamic libtool versioning to libcoap
To not fight every time with the logic of libtool for needed versioning
info of libcoap adding some automatism into the autoconf files. So now
there are only three lines to change if a release is planned.
Please note and respect the instructions inside configure.ac to generate
a correct versioning for libtool. But libtool will tell you later if you
doing something wrong with the versions. :)

Some helpful informations can be found on the following websites as
well.

http://ftp.gnu.org/pub/old-gnu/Manuals/libtool-1.4.2/html_chapter/libtool_6.html
https://blog.flameeyes.eu/2010/10/linkers-and-names
https://blog.flameeyes.eu/2009/04/shared-object-version
https://phab.enlightenment.org/w/autotoolsintegration/
https://autotools.io/libtool/version.html
http://www.freesoftwaremagazine.com/articles/building_shared_libraries_once_using_autotools
https://www.sourceware.org/autobook/autobook/autobook_91.html
2015-03-03 19:21:43 +01:00
Carsten Schoenert 45760a922d pkgconfig: adding related package files
To help the users of the libcoap and especially the linker on the users
machines adding a libcoap.pc file that will be installed while the call
of 'make install'.
2015-03-03 19:21:43 +01:00
Carsten Schoenert c7299d9c86 adding install target for public header
To develop something libcoap related people need the public header files
to include the function definitions into their projects.
The public libcoap headers will be installed into the system by the
current order like

.
└── include
   └── coap
       ├── address.h
       ├── async.h
       ├── bits.h
       ├── block.h
       ├── coap.h
       ├── coap_io.h
       ├── coap_time.h
       ├── debug.h
       ├── encode.h
       ├── hashkey.h
       ├── mem.h
       ├── net.h
       ├── option.h
       ├── pdu.h
       ├── prng.h
       ├── resource.h
       ├── str.h
       ├── subscribe.h
       ├── t_list.h
       ├── uri.h
       ├── uthash.h
       └── utlist.h

That's not final! Currently the public header files include the locally
by the autoconf generated coap_config.h header file. These includes have
to be removed before we can call the header really public headers!
2015-03-03 19:21:43 +01:00
Carsten Schoenert 9f06f77004 adding basic files for build environment creation
Start adding basic files for generating all the needed files to create a
working build environment by the autotools. By this currently only the
shared library of libcoap is build.
There is no API version implemented! This has to be done later.
2015-03-03 19:21:43 +01:00