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.
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.
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.
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
* 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().
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.
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.
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.
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.
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'.
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!
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.