mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
RIOT: Move examples to new directory structures
This commit is contained in:
1 parent
f12b620cde
commit
17204f488d
11 files changed
+28
-24
No files matched your search
+10
-6
@@ -44,20 +44,24 @@ pkg:
|
||||
if [ "$${HAVE_KCONFIG}" = 0 ] ; then \
|
||||
sed -i '/rsource "flashdb\/Kconfig"/irsource "libcoap\/Kconfig"' RIOT/pkg/Kconfig ; \
|
||||
fi
|
||||
@HAVE_EXAMPLES=`grep libcoap_client RIOT/examples/README.md | wc -l` ; \
|
||||
if [ "$${HAVE_EXAMPLES}" = 0 ] ; then \
|
||||
sed -i '/nanocoap_server/a| [libcoap_client](./networking/libcoap/libcoap_client/README.md) | This example demonstrates the usage of the `libcoap` module for providing a CoAP client. |\n| [libcoap_server](./networking/libcoap/libcoap_server/README.md) | This example demonstrates the usage of the `libcoap` module for providing a CoAP server. |\n' RIOT/examples/README.md ; \
|
||||
fi
|
||||
|
||||
examples:
|
||||
rm -rf RIOT/examples/libcoap-client && mkdir RIOT/examples/libcoap-client
|
||||
cd examples_libcoap_client && cp -r * ../RIOT/examples/libcoap-client
|
||||
rm -rf RIOT/examples/libcoap-server && mkdir RIOT/examples/libcoap-server
|
||||
cd examples_libcoap_server && cp -r * ../RIOT/examples/libcoap-server
|
||||
rm -rf RIOT/examples/networking/libcoap/libcoap_client && mkdir -p RIOT/examples/networking/libcoap/libcoap_client
|
||||
cd examples_libcoap_client && cp -r * ../RIOT/examples/networking/libcoap/libcoap_client
|
||||
rm -rf RIOT/examples/networking/libcoap/libcoap_server && mkdir -p RIOT/examples/networking/libcoap/libcoap_server
|
||||
cd examples_libcoap_server && cp -r * ../RIOT/examples/networking/libcoap/libcoap_server
|
||||
rm -rf RIOT/tests/pkg/libcoap && mkdir -p RIOT/tests/pkg/libcoap
|
||||
cd tests_pkg_libcoap && cp -r * ../RIOT/tests/pkg/libcoap
|
||||
|
||||
client: RIOT pkg examples
|
||||
$(MAKE) -C RIOT/examples/libcoap-client/ RIOT_CI_BUILD=1
|
||||
$(MAKE) -C RIOT/examples/networking/libcoap/libcoap_client/ RIOT_CI_BUILD=1
|
||||
|
||||
server: RIOT pkg examples
|
||||
$(MAKE) -C RIOT/examples/libcoap-server/ RIOT_CI_BUILD=1
|
||||
$(MAKE) -C RIOT/examples/networking/libcoap/libcoap_server/ RIOT_CI_BUILD=1
|
||||
|
||||
tests: RIOT pkg examples
|
||||
$(MAKE) -C RIOT/tests/pkg/libcoap/ RIOT_CI_BUILD=1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
#
|
||||
menu "libcoap-client"
|
||||
menu "libcoap_client"
|
||||
depends on USEPKG_LIBCOAP
|
||||
|
||||
config LIBCOAP_CLIENT_URI
|
||||
@@ -17,4 +17,4 @@ config LIBCOAP_USE_PSK_ID
|
||||
default "user_abc"
|
||||
depends on USEMODULE_TINYDTLS
|
||||
|
||||
endmenu # libcoap-client
|
||||
endmenu # libcoap_client
|
||||
@@ -1,11 +1,11 @@
|
||||
# name of your application
|
||||
APPLICATION = libcoap-client
|
||||
APPLICATION = libcoap_client
|
||||
|
||||
# If no BOARD is found in the environment, use this default:
|
||||
BOARD ?= native
|
||||
|
||||
# This has to be the absolute path to the RIOT base directory:
|
||||
RIOTBASE ?= $(CURDIR)/../..
|
||||
RIOTBASE ?= $(CURDIR)/../../../..
|
||||
|
||||
# Include packages that pull up and auto-init the link layer.
|
||||
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* client-coap.c -- RIOT client example
|
||||
* client_coap.c -- RIOT client example
|
||||
*
|
||||
* Copyright (C) 2023-2025 Jon Shallow <supjps-libcoap@jpshallow.com>
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <thread.h>
|
||||
#include <debug.h>
|
||||
#include <coap3/coap.h>
|
||||
#include "client-coap.h"
|
||||
#include "client_coap.h"
|
||||
#include <stdio.h>
|
||||
#include "macros/utils.h"
|
||||
|
||||
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
#
|
||||
menu "libcoap-server"
|
||||
menu "libcoap_server"
|
||||
depends on USEPKG_LIBCOAP
|
||||
|
||||
config LIBCOAP_USE_PSK
|
||||
@@ -19,4 +19,4 @@ config LIBCOAP_USE_PSK_ID
|
||||
depends on USEMODULE_TINYDTLS
|
||||
endif # LIBCOAP_CLIENT_SUPPORT
|
||||
|
||||
endmenu # libcoap-server
|
||||
endmenu # libcoap_server
|
||||
@@ -1,11 +1,11 @@
|
||||
# name of your application
|
||||
APPLICATION = libcoap-server
|
||||
APPLICATION = libcoap_server
|
||||
|
||||
# If no BOARD is found in the environment, use this default:
|
||||
BOARD ?= native
|
||||
|
||||
# This has to be the absolute path to the RIOT base directory:
|
||||
RIOTBASE ?= $(CURDIR)/../..
|
||||
RIOTBASE ?= $(CURDIR)/../../../..
|
||||
|
||||
# Include packages that pull up and auto-init the link layer.
|
||||
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* server-coap.c -- RIOT example
|
||||
* server_coap.c -- RIOT example
|
||||
*
|
||||
* Copyright (C) 2023-2025 Jon Shallow <supjps-libcoap@jpshallow.com>
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "coap_config.h"
|
||||
#include <coap3/coap.h>
|
||||
#include "server-coap.h"
|
||||
#include "server_coap.h"
|
||||
#include <stdio.h>
|
||||
#include "macros/utils.h"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* server-coap.h -- RIOT client example
|
||||
* server_coap.h -- RIOT client example
|
||||
*
|
||||
* Copyright (C) 2023-2025 Jon Shallow <supjps-libcoap@jpshallow.com>
|
||||
*
|
||||
@@ -1,6 +1,6 @@
|
||||
PKG_NAME=libcoap
|
||||
PKG_URL=https://github.com/obgm/libcoap
|
||||
PKG_VERSION=cd06a72916bd234fd5dfdaea4def50f178440614
|
||||
PKG_VERSION=f12b620cdecb00e7d4dcfb104f28f577c80f06cc
|
||||
PKG_LICENSE=BSD-2-Clause
|
||||
|
||||
LIBCOAP_BUILD_DIR=$(BINDIR)/pkg/$(PKG_NAME)
|
||||
|
||||
Reference in new issue
Block a user