mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 06:23:53 +01:00
examples/gcoap: Set configs via CFLAGS if Kconfig is not used
This adds a check in the Makefile so configurations are set via CFLAGS only if Kconfig is not being used as the configurator for the module. Otherwise there may be a conflict.
This commit is contained in:
parent
926d32ff30
commit
cf7a73800e
@ -9,18 +9,6 @@ BOARD ?= native
|
||||
# This has to be the absolute path to the RIOT base directory:
|
||||
RIOTBASE ?= $(CURDIR)/../..
|
||||
|
||||
## Uncomment to redefine port, for example use 61616 for RFC 6282 UDP compression.
|
||||
#GCOAP_PORT = 5683
|
||||
#CFLAGS += -DCONFIG_GCOAP_PORT=$(GCOAP_PORT)
|
||||
|
||||
## Uncomment to redefine request token length, max 8.
|
||||
#GCOAP_TOKENLEN = 2
|
||||
#CFLAGS += -DCONFIG_GCOAP_TOKENLEN=$(GCOAP_TOKENLEN)
|
||||
|
||||
# Increase from default for confirmable block2 follow-on requests
|
||||
CONFIG_GCOAP_RESEND_BUFS_MAX ?= 2
|
||||
CFLAGS += -DCONFIG_GCOAP_RESEND_BUFS_MAX=$(CONFIG_GCOAP_RESEND_BUFS_MAX)
|
||||
|
||||
# Include packages that pull up and auto-init the link layer.
|
||||
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
|
||||
USEMODULE += gnrc_netdev_default
|
||||
@ -48,3 +36,20 @@ DEVELHELP ?= 1
|
||||
QUIET ?= 1
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
# For now this goes after the inclusion of Makefile.include so Kconfig symbols
|
||||
# are available. Only set configuration via CFLAGS if Kconfig is not being used
|
||||
# for this module.
|
||||
ifndef CONFIG_KCONFIG_MODULE_GCOAP
|
||||
## Uncomment to redefine port, for example use 61616 for RFC 6282 UDP compression.
|
||||
#GCOAP_PORT = 5683
|
||||
#CFLAGS += -DCONFIG_GCOAP_PORT=$(GCOAP_PORT)
|
||||
|
||||
## Uncomment to redefine request token length, max 8.
|
||||
#GCOAP_TOKENLEN = 2
|
||||
#CFLAGS += -DCONFIG_GCOAP_TOKENLEN=$(GCOAP_TOKENLEN)
|
||||
|
||||
# Increase from default for confirmable block2 follow-on requests
|
||||
GCOAP_RESEND_BUFS_MAX ?= 2
|
||||
CFLAGS += -DCONFIG_GCOAP_RESEND_BUFS_MAX=$(GCOAP_RESEND_BUFS_MAX)
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user