1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 05:53:49 +01:00
RIOT/pkg/semtech-loramac/Makefile.include
Marian Buschsieweke f46ab1cb67
pkg: Use -isystem instead of -I for pkg headers
We cannot fix package headers downstream, so we can just as well tell
the compiler to not warn about them.
2025-04-10 13:37:14 +02:00

38 lines
1.8 KiB
Makefile

# Using -isystem instead of -I to prevent warnings for the following headers
INCLUDES += -isystem$(RIOTBASE)/pkg/semtech-loramac/include
DIRS += $(RIOTBASE)/pkg/semtech-loramac/contrib
# Translate 'CONFIG_' options to package specific flags. This checks if the
# option is being set via Kconfig or CFLAGS
ifneq (,$(or $(CONFIG_LORAMAC_REGION_AS_923),$(filter -DCONFIG_LORAMAC_REGION_AS_923,$(CFLAGS))))
LORA_REGION ?= AS923
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_AU_915),$(filter -DCONFIG_LORAMAC_REGION_AU_915,$(CFLAGS))))
LORA_REGION ?= AU915
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_CN_470),$(filter -DCONFIG_LORAMAC_REGION_CN_470,$(CFLAGS))))
LORA_REGION ?= CN470
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_CN_779),$(filter -DCONFIG_LORAMAC_REGION_CN_779,$(CFLAGS))))
LORA_REGION ?= CN779
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_EU_433),$(filter -DCONFIG_LORAMAC_REGION_EU_433,$(CFLAGS))))
LORA_REGION ?= EU433
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_KR_920),$(filter -DCONFIG_LORAMAC_REGION_KR_920,$(CFLAGS))))
LORA_REGION ?= KR920
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_IN_865),$(filter -DCONFIG_LORAMAC_REGION_IN_865,$(CFLAGS))))
LORA_REGION ?= IN865
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_US_915),$(filter -DCONFIG_LORAMAC_REGION_US_915,$(CFLAGS))))
LORA_REGION ?= US915
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_RU_864),$(filter -DCONFIG_LORAMAC_REGION_RU_864,$(CFLAGS))))
LORA_REGION ?= RU864
else ifneq (,$(or $(CONFIG_LORAMAC_REGION_US_915_HYBRID),$(filter -DCONFIG_LORAMAC_REGION_US_915_HYBRID,$(CFLAGS))))
LORA_REGION ?= US915_HYBRID
else
LORA_REGION ?= EU868
endif
CFLAGS += -DREGION_$(LORA_REGION)
CFLAGS += -DLORAMAC_ACTIVE_REGION=LORAMAC_REGION_$(LORA_REGION)
# There's no concrete semtech-loramac module that is built so declare it as a
# pseudo module.
PSEUDOMODULES += semtech-loramac