From 7ca22f7791a18810eab2e5ffe939751871f14b90 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 9 Mar 2022 11:01:00 +0100 Subject: [PATCH] drivers/mrf24j40: move CFLAG to Makefile.include --- drivers/mrf24j40/Makefile.dep | 7 ------- drivers/mrf24j40/Makefile.include | 9 +++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/mrf24j40/Makefile.dep b/drivers/mrf24j40/Makefile.dep index 8e6d33ea4c..58f8cc263c 100644 --- a/drivers/mrf24j40/Makefile.dep +++ b/drivers/mrf24j40/Makefile.dep @@ -7,11 +7,4 @@ FEATURES_REQUIRED += periph_spi ifneq (,$(filter mrf24j40m%,$(USEMODULE))) DEFAULT_MODULE += netdev_ieee802154_oqpsk - - ifndef CONFIG_KCONFIG_MODULE_MRF24J40 - # all modules but mrf24j40ma have an external PA - ifeq (,$(filter mrf24j40ma,$(USEMODULE))) - CFLAGS += -DCONFIG_MRF24J40_USE_EXT_PA_LNA - endif - endif endif diff --git a/drivers/mrf24j40/Makefile.include b/drivers/mrf24j40/Makefile.include index 9ca799185c..8d52a0366b 100644 --- a/drivers/mrf24j40/Makefile.include +++ b/drivers/mrf24j40/Makefile.include @@ -1,5 +1,14 @@ # include variants of mrf24j40 drivers as pseudo modules PSEUDOMODULES += mrf24j40m% +ifneq (,$(filter mrf24j40m%,$(USEMODULE))) + ifndef CONFIG_KCONFIG_MODULE_MRF24J40 + # all modules but mrf24j40ma have an external PA + ifeq (,$(filter mrf24j40ma,$(USEMODULE))) + CFLAGS += -DCONFIG_MRF24J40_USE_EXT_PA_LNA + endif + endif +endif + USEMODULE_INCLUDES_mrf24j40 := $(LAST_MAKEFILEDIR)/include USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_mrf24j40)