Files
libcoap/examples/zephyr/Makefile
T
Jon Shallow 4803f161f0 zephyr: Examples support
New examples/zephyr directory that contains a sample coap-client.
Building the coap-client assumes that the zephyrproject has already been
installed and set up (default directory ~/zephyrproject).
2024-10-10 16:48:50 +01:00

17 lines
522 B
Makefile

ZEPHYR_PROJECT?=~/zephyrproject
all: coap-client
coap-client: client-src/src/main.c client-src/*
LIBCOAP_DIR=`pwd`/../.. ;\
(. $(ZEPHYR_PROJECT)/.venv/bin/activate ;\
cd $(ZEPHYR_PROJECT)/zephyr ;\
west build -p always -b native_sim \
$${LIBCOAP_DIR}/examples/zephyr/client-src -- \
-DCONF_FILE=prj.conf \
-DEXTRA_ZEPHYR_MODULES=$${LIBCOAP_DIR} \
-DEXTRA_CONF_FILE=$${LIBCOAP_DIR}/zephyr/libcoap-mbedtls.conf \
--fresh ;\
deactivate) ;\
cp -f $(ZEPHYR_PROJECT)/zephyr/build/zephyr/zephyr.exe coap-client