examples/openthread: adapt Makefile to new configuration style

This commit is contained in:
Jose Alamos 2019-05-08 14:52:40 +02:00
parent 86942279a2
commit f4e9cc5dc0

View File

@ -13,18 +13,20 @@ RIOTBASE ?= $(CURDIR)/../..
QUIET ?= 1 QUIET ?= 1
USEPKG += openthread USEPKG += openthread
OPENTHREAD_TYPE ?= ftd
ifeq ($(OPENTHREAD_TYPE),mtd) # FTD: A Full Thread Device has router functionality compiled in
#
# MTD: A Minimal Thread Device does not have router functionality # MTD: A Minimal Thread Device does not have router functionality
# compiled in. As a result, it is not necessary to configure the # compiled in. As a result, it is not necessary to configure the
# routerrole on an MTD. At the same time, an MTD may or may not be sleepy. # routerrole on an MTD. At the same time, an MTD may or may not be sleepy.
USEMODULE += openthread-mtd #
USEMODULE += openthread-cli-mtd # Use FTD by default
else OPENTHREAD_TYPE ?= ftd
# ftd: A Full Thread Device has router functionality compiled in
USEMODULE += openthread-ftd USEMODULE += openthread-$(OPENTHREAD_TYPE)
USEMODULE += openthread-cli-ftd
endif # Comment the following line in order to disable the OpenThread CLI
USEMODULE += openthread-cli
#Define PANID, CHANNEL and UART_BAUDRATE used by default #Define PANID, CHANNEL and UART_BAUDRATE used by default
OPENTHREAD_PANID ?= 0xbeef OPENTHREAD_PANID ?= 0xbeef