diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9bf85fa7..3683c82b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -153,12 +153,6 @@ jobs: - name: install macOS software run: | brew install make automake libtool - - name: setup - run: | - ./autogen.sh - - name: configure - run: | - ./configure --disable-doxygen --disable-manpages --disable-dtls --without-epoll --disable-examples --disable-examples-source --disable-tcp --disable-oscore --disable-q-block - name: compile run: | gmake -C examples/contiki @@ -172,10 +166,6 @@ jobs: - name: setup run: | sudo apt-get update && sudo apt-get install -y libc6-dev-i386 - ./autogen.sh - - name: configure - run: | - $GITHUB_WORKSPACE/configure --disable-documentation --disable-examples --disable-tests --disable-dtls - name: compile run: | make -C examples/${{matrix.OS}} EXTRA_CFLAGS=-Werror diff --git a/.gitignore b/.gitignore index e0691294..623f4ee9 100644 --- a/.gitignore +++ b/.gitignore @@ -93,7 +93,6 @@ examples/*.exe examples/riot/pkg_libcoap/patches # the include/ folder -include/coap3/coap.h include/coap3/coap_defines.h # the tests/ folder diff --git a/BUILDING b/BUILDING index c787f6e9..a3422119 100644 --- a/BUILDING +++ b/BUILDING @@ -120,8 +120,6 @@ prior to running 'make'. RIOT ==== - ./autogen.sh - ./configure --disable-tests --disable-documentation --disable-examples --disable-dtls cd examples/riot make @@ -130,8 +128,6 @@ See examples/riot/README for further information. LwIP ==== - ./autogen.sh - ./configure --disable-tests --disable-documentation --disable-examples --disable-dtls cd examples/lwip make @@ -140,8 +136,6 @@ Executable is ./server. See examples/lwip/README for further information. Contiki-NG ========== - ./autogen.sh - ./configure --disable-tests --disable-documentation --disable-examples --disable-dtls cd examples/contiki make diff --git a/CMakeLists.txt b/CMakeLists.txt index d9c900bd..31c624b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -717,9 +717,6 @@ else(ENABLE_TCP) endif(ENABLE_TCP) # creates config header file in build directory -configure_file(${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap.h.in - ${CMAKE_CURRENT_BINARY_DIR}/include/coap${LIBCOAP_API_VERSION}/coap.h) - configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake_coap_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/coap_config.h) @@ -994,8 +991,6 @@ install( COMPONENT dev FILES_MATCHING PATTERN "*.h" - PATTERN "coap.h" EXCLUDE - PATTERN "coap_riot.h" EXCLUDE PATTERN "*_internal.h" EXCLUDE PATTERN "oscore*" EXCLUDE) install( diff --git a/Makefile.am b/Makefile.am index ba23bfba..8a334fdf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,9 +124,6 @@ EXTRA_DIST = \ include/coap$(LIBCOAP_API_VERSION)/coap_uthash_internal.h \ include/coap$(LIBCOAP_API_VERSION)/coap_utlist_internal.h \ include/coap$(LIBCOAP_API_VERSION)/coap_ws_internal.h \ - include/coap$(LIBCOAP_API_VERSION)/coap.h.in \ - include/coap$(LIBCOAP_API_VERSION)/coap.h.riot \ - include/coap$(LIBCOAP_API_VERSION)/coap.h.windows \ include/oscore/oscore_cbor.h \ include/oscore/oscore_context.h \ include/oscore/oscore_cose.h \ @@ -242,7 +239,7 @@ libcoap_includedir = $(includedir)/coap$(LIBCOAP_API_VERSION)/ # $(top_srcdir)/include/coap-$(LIBCOAP_API_VERSION)/* libcoap_include_HEADERS = \ - $(top_builddir)/include/coap$(LIBCOAP_API_VERSION)/coap.h \ + $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/libcoap.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_address.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_async.h \ diff --git a/autogen.sh b/autogen.sh index 0b97905f..036bc845 100755 --- a/autogen.sh +++ b/autogen.sh @@ -27,7 +27,6 @@ depcomp doc/Doxyfile doc/doxyfile.stamp doc/doxygen_sqlite3.db doc/Makefile doc/Makefile.in examples/*.o examples/coap-client examples/coap-server examples/coap-rd examples/Makefile examples/Makefile.in -include/coap3/coap.h install-sh libcoap-*.pc libtool ltmain.sh man/coap*.[357] man/coap*.txt man/Makefile man/Makefile.in diff --git a/configure.ac b/configure.ac index 203e9e3b..70e4bc0a 100644 --- a/configure.ac +++ b/configure.ac @@ -1329,7 +1329,6 @@ AC_CONFIG_FILES([ Makefile doc/Makefile examples/Makefile -include/coap$LIBCOAP_API_VERSION/coap.h man/coap.txt man/coap_address.txt man/coap_async.txt @@ -1552,6 +1551,7 @@ else AC_MSG_RESULT([ build static library : "no"]) fi +mkdir -p include/coap$LIBCOAP_API_VERSION LT_TEMP=`grep -B2 " COAP_" coap_config.h > include/coap$LIBCOAP_API_VERSION/coap_defines.h` if test "x$LT_TEMP" != "x" ; then AC_MSG_ERROR([Unable to build coap_defines.h]) diff --git a/examples/lwip/Makefile b/examples/lwip/Makefile index 3eeaec3b..5bbadc95 100644 --- a/examples/lwip/Makefile +++ b/examples/lwip/Makefile @@ -30,7 +30,6 @@ LDLIBS := $(shell if [ -f $(libcoap_dir)/config.log ] ; then \ all: lwip \ check-version \ check-tinydtls \ - $(coap_include_dir)/coap.h \ lib-server \ server \ lib-client \ @@ -204,13 +203,7 @@ SN_OBJS = ${SN_APP_OBJ} ${SN_LWIP_OBJ} ${SN_COAP_OBJ} CD_OBJS = ${CD_APP_OBJ} ${CD_LWIP_OBJ} ${CD_COAP_OBJ} ${CD_DTLS_OBJ} SD_OBJS = ${SD_APP_OBJ} ${SD_LWIP_OBJ} ${SD_COAP_OBJ} ${SD_DTLS_OBJ} -$(coap_include_dir)/coap.h: - @(if [ ! -f $(coap_include_dir)/coap.h ] ; then \ - (cd $(libcoap_dir) ; ./autogen.sh ; ./configure --disable-dtls --disable-man) ; \ - ${MAKE}; \ - fi) - -${SN_OBJS} ${SD_OBJS}: $(coap_include_dir)/coap.h server-coap.h +${SN_OBJS} ${SD_OBJS}: server-coap.h server: ${SN_OBJS} $(CC) $(CFLAGS) ${SN_OBJS} -o server ${LDLIBS} @@ -218,7 +211,7 @@ server: ${SN_OBJS} server-dtls: ${SD_OBJS} $(CC) $(CFLAGS) ${SD_OBJS} -o server-dtls ${LDLIBS} -${CN_OBJS} ${CD_OBJS}: $(coap_include_dir)/coap.h client-coap.h +${CN_OBJS} ${CD_OBJS}: client-coap.h client: ${CN_OBJS} $(CC) $(CFLAGS) ${CN_OBJS} -o client ${LDLIBS} diff --git a/examples/riot/pkg_libcoap/Makefile b/examples/riot/pkg_libcoap/Makefile index a2a3d86b..4e09ad11 100644 --- a/examples/riot/pkg_libcoap/Makefile +++ b/examples/riot/pkg_libcoap/Makefile @@ -17,7 +17,6 @@ endif libcoap: $(QQ)@cp $(LIBCOAP_SOURCE_DIR)/coap_config.h.riot $(LIBCOAP_SOURCE_DIR)/coap_config.h - $(QQ)@cp $(LIBCOAP_INCLUDE_DIR)/coap.h.riot $(LIBCOAP_INCLUDE_DIR)/coap.h $(QQ)"$(MAKE)" -C $(LIBCOAP_SOURCE_DIR)/src -f $(CURDIR)/Makefile.libcoap libcoap_oscore: diff --git a/include/coap3/coap.h.windows b/include/coap3/coap.h similarity index 94% rename from include/coap3/coap.h.windows rename to include/coap3/coap.h index 0466aea6..0b28bee3 100644 --- a/include/coap3/coap.h.windows +++ b/include/coap3/coap.h @@ -1,5 +1,5 @@ /* - * coap.h -- main header file for CoAP stack of libcoap (Windows) + * coap.h -- main header file for CoAP stack of libcoap * * Copyright (C) 2010-2012,2015-2024 Olaf Bergmann * 2015 Carsten Schoenert @@ -34,7 +34,7 @@ #define LIBCOAP_PACKAGE_VERSION "4.3.5rc3" /* Define the numeric version identifier for libcoap */ -#define LIBCOAP_VERSION (4003004U) +#define LIBCOAP_VERSION (4003004ULL) #ifdef __cplusplus extern "C" { diff --git a/include/coap3/coap.h.in b/include/coap3/coap.h.in deleted file mode 100644 index 8ebed622..00000000 --- a/include/coap3/coap.h.in +++ /dev/null @@ -1,74 +0,0 @@ -/* - * coap.h -- main header file for CoAP stack of libcoap - * - * Copyright (C) 2010-2012,2015-2024 Olaf Bergmann - * 2015 Carsten Schoenert - * - * SPDX-License-Identifier: BSD-2-Clause - * - * This file is part of the CoAP library libcoap. Please see README for terms - * of use. - */ - -/** - * @file coap.h - * @brief Primary include file - */ - -#ifndef COAP_H_ -#define COAP_H_ - -/* Define the address where bug reports for libcoap should be sent. */ -#define LIBCOAP_PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" - -/* Define the full name of libcoap. */ -#define LIBCOAP_PACKAGE_NAME "@PACKAGE_NAME@" - -/* Define the full name and version of libcoap. */ -#define LIBCOAP_PACKAGE_STRING "@PACKAGE_STRING@" - -/* Define the home page for libcoap. */ -#define LIBCOAP_PACKAGE_URL "@PACKAGE_URL@" - -/* Define the version of libcoap this file belongs to. */ -#define LIBCOAP_PACKAGE_VERSION "@PACKAGE_VERSION@" - -/* Define the numeric version identifier for libcoap */ -#define LIBCOAP_VERSION (@LIBCOAP_VERSION@U) - -#ifdef __cplusplus -extern "C" { -#endif - -#include "coap@LIBCOAP_API_VERSION@/libcoap.h" - -#include "coap@LIBCOAP_API_VERSION@/coap_forward_decls.h" -#include "coap@LIBCOAP_API_VERSION@/coap_address.h" -#include "coap@LIBCOAP_API_VERSION@/coap_async.h" -#include "coap@LIBCOAP_API_VERSION@/coap_block.h" -#include "coap@LIBCOAP_API_VERSION@/coap_cache.h" -#include "coap@LIBCOAP_API_VERSION@/coap_debug.h" -#include "coap@LIBCOAP_API_VERSION@/coap_dtls.h" -#include "coap@LIBCOAP_API_VERSION@/coap_encode.h" -#include "coap@LIBCOAP_API_VERSION@/coap_event.h" -#include "coap@LIBCOAP_API_VERSION@/coap_io.h" -#include "coap@LIBCOAP_API_VERSION@/coap_mem.h" -#include "coap@LIBCOAP_API_VERSION@/coap_net.h" -#include "coap@LIBCOAP_API_VERSION@/coap_option.h" -#include "coap@LIBCOAP_API_VERSION@/coap_oscore.h" -#include "coap@LIBCOAP_API_VERSION@/coap_pdu.h" -#include "coap@LIBCOAP_API_VERSION@/coap_prng.h" -#include "coap@LIBCOAP_API_VERSION@/coap_proxy.h" -#include "coap@LIBCOAP_API_VERSION@/coap_resource.h" -#include "coap@LIBCOAP_API_VERSION@/coap_str.h" -#include "coap@LIBCOAP_API_VERSION@/coap_subscribe.h" -#include "coap@LIBCOAP_API_VERSION@/coap_supported.h" -#include "coap@LIBCOAP_API_VERSION@/coap_time.h" -#include "coap@LIBCOAP_API_VERSION@/coap_uri.h" -#include "coap@LIBCOAP_API_VERSION@/coap_ws.h" - -#ifdef __cplusplus -} -#endif - -#endif /* COAP_H_ */ diff --git a/include/coap3/coap.h.riot b/include/coap3/coap.h.riot deleted file mode 100644 index 4e795910..00000000 --- a/include/coap3/coap.h.riot +++ /dev/null @@ -1,74 +0,0 @@ -/* - * coap.h -- main header file for CoAP stack of libcoap (RIOT) - * - * Copyright (C) 2010-2012,2015-2024 Olaf Bergmann - * 2015 Carsten Schoenert - * - * SPDX-License-Identifier: BSD-2-Clause - * - * This file is part of the CoAP library libcoap. Please see README for terms - * of use. - */ - -/** - * @file coap.h - * @brief Primary include file - */ - -#ifndef COAP_H_ -#define COAP_H_ - -/* Define the address where bug reports for libcoap should be sent. */ -#define LIBCOAP_PACKAGE_BUGREPORT "libcoap-developers@lists.sourceforge.net" - -/* Define the full name of libcoap. */ -#define LIBCOAP_PACKAGE_NAME "libcoap" - -/* Define the full name and version of libcoap. */ -#define LIBCOAP_PACKAGE_STRING "libcoap 4.3.5rc3" - -/* Define the home page for libcoap. */ -#define LIBCOAP_PACKAGE_URL "https://libcoap.net/" - -/* Define the version of libcoap this file belongs to. */ -#define LIBCOAP_PACKAGE_VERSION "4.3.5rc3" - -/* Define the numeric version identifier for libcoap */ -#define LIBCOAP_VERSION (4003004U) - -#ifdef __cplusplus -extern "C" { -#endif - -#include "libcoap.h" - -#include "coap_forward_decls.h" -#include "coap_address.h" -#include "coap_async.h" -#include "coap_block.h" -#include "coap_cache.h" -#include "coap_debug.h" -#include "coap_dtls.h" -#include "coap_encode.h" -#include "coap_event.h" -#include "coap_io.h" -#include "coap_mem.h" -#include "coap_net.h" -#include "coap_option.h" -#include "coap_oscore.h" -#include "coap_pdu.h" -#include "coap_prng.h" -#include "coap_proxy.h" -#include "coap_resource.h" -#include "coap_str.h" -#include "coap_subscribe.h" -#include "coap_supported.h" -#include "coap_time.h" -#include "coap_uri.h" -#include "coap_ws.h" - -#ifdef __cplusplus -} -#endif - -#endif /* COAP_H_ */ diff --git a/scripts/fix_version.sh.in b/scripts/fix_version.sh.in index 62a81807..abe3f879 100755 --- a/scripts/fix_version.sh.in +++ b/scripts/fix_version.sh.in @@ -3,18 +3,20 @@ FILES="coap_config.h.contiki \ coap_config.h.riot \ coap_config.h.windows \ - include/coap@LIBCOAP_API_VERSION@/coap.h.riot \ - include/coap@LIBCOAP_API_VERSION@/coap.h.windows \ - examples/lwip/config/coap_config.h" + examples/lwip/config/coap_config.h \ + include/coap@LIBCOAP_API_VERSION@/coap.h" for file in $FILES ; do sed -i $file -e 's/#define PACKAGE_NAME ".*"/#define PACKAGE_NAME "@PACKAGE_NAME@"/g' sed -i $file -e 's/#define PACKAGE_STRING ".*"/#define PACKAGE_STRING "@PACKAGE_STRING@"/g' sed -i $file -e 's/#define PACKAGE_VERSION ".*"/#define PACKAGE_VERSION "@PACKAGE_VERSION@"/g' sed -i $file -e 's/#define PACKAGE_TARNAME ".*"/#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"/g' - sed -i $file -e 's/#define LIBCOAP_VERSION (.*)/#define LIBCOAP_VERSION (@LIBCOAP_VERSION@U)/g' + + sed -i $file -e 's/#define LIBCOAP_PACKAGE_BUGREPORT (.*)/#define LIBCOAP_PACKAGE_BUGREPORT (@PACKAGE_BUGREPORT@)/g' sed -i $file -e 's/#define LIBCOAP_PACKAGE_STRING ".*"/#define LIBCOAP_PACKAGE_STRING "@PACKAGE_STRING@"/g' + sed -i $file -e 's^#define LIBCOAP_PACKAGE_URL ".*"^#define LIBCOAP_PACKAGE_URL "@PACKAGE_URL@"^g' sed -i $file -e 's/#define LIBCOAP_PACKAGE_VERSION ".*"/#define LIBCOAP_PACKAGE_VERSION "@PACKAGE_VERSION@"/g' + sed -i $file -e 's/#define LIBCOAP_VERSION (.*)/#define LIBCOAP_VERSION (@LIBCOAP_VERSION@ULL)/g' done for file in CMakeLists.txt ; do diff --git a/scripts/github_dist.sh b/scripts/github_dist.sh index f362d003..93e07adc 100755 --- a/scripts/github_dist.sh +++ b/scripts/github_dist.sh @@ -15,21 +15,36 @@ err=$? echo $ARCHIVE if test $err = 0 -a "x$ARCHIVE" != "x"; then DIR=`pwd`/`tar taf $ARCHIVE |cut -d/ -f1|head -1` - tar xaf $ARCHIVE && cd $DIR && \ - $DIR/configure $PREFIX --enable-tests --enable-silent-rules --enable-documentation --enable-examples --disable-dtls && \ - make EXTRA_CFLAGS=-Werror && make install EXTRA_CFLAGS=-Werror - err=$? + tar xaf $ARCHIVE && cd $DIR + err=$terr + + # LwIP + make -C $DIR/examples/lwip EXTRA_CFLAGS=-Werror + terr=$? if [ $err = 0 ] ; then - make -C $DIR/examples/lwip EXTRA_CFLAGS=-Werror - err=$? + err=$terr fi + + # Contiki + make -C $DIR/examples/contiki + terr=$? if [ $err = 0 ] ; then - make -C $DIR/examples/contiki - err=$? + err=$terr fi + + # RIOT + make -C $DIR/examples/riot + terr=$? if [ $err = 0 ] ; then - make -C $DIR/examples/riot - err=$? + err=$terr + fi + + # Standard build + $DIR/configure $PREFIX --enable-tests --enable-silent-rules --enable-documentation --enable-examples --disable-dtls && \ + make EXTRA_CFLAGS=-Werror && make install EXTRA_CFLAGS=-Werror + terr=$? + if [ $err = 0 ] ; then + err=$terr fi fi diff --git a/win32/libcoap.vcxproj b/win32/libcoap.vcxproj index ce643c60..6dbec886 100644 --- a/win32/libcoap.vcxproj +++ b/win32/libcoap.vcxproj @@ -388,7 +388,6 @@ TYPE %(FullPath) >> "$(IntDir)$(TargetName).def" copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -432,7 +431,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -473,7 +471,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -499,7 +496,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -523,7 +519,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -569,7 +564,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -612,7 +606,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -641,7 +634,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -666,7 +658,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows