diff --git a/bootloaders/riotboot/Makefile b/bootloaders/riotboot/Makefile index 0419c8501752..1adb5771f03e 100644 --- a/bootloaders/riotboot/Makefile +++ b/bootloaders/riotboot/Makefile @@ -7,6 +7,8 @@ BOARD ?= samr21-xpro # Select the boards with riotboot feature FEATURES_REQUIRED += riotboot +# Set RIOTBOOT_BUILD to indicate a riotboot application build +RIOTBOOT_BUILD = 1 # Provide a define to detect if building the bootloader CFLAGS += -DRIOTBOOT diff --git a/makefiles/boot/riotboot.mk b/makefiles/boot/riotboot.mk index d4a6ab6c72b7..1cdbba05e75d 100644 --- a/makefiles/boot/riotboot.mk +++ b/makefiles/boot/riotboot.mk @@ -1,4 +1,5 @@ ifneq (,$(filter riotboot,$(FEATURES_USED))) +ifneq (1,$(RIOTBOOT_BUILD)) .PHONY: riotboot/flash riotboot/flash-bootloader riotboot/flash-slot0 riotboot/flash-slot1 riotboot/bootloader/% @@ -154,4 +155,5 @@ riotboot: $(Q)echo "error: riotboot feature not selected! (try FEATURES_REQUIRED += riotboot)" $(Q)false +endif # (1,$(RIOTBOOT_BUILD)) endif # (,$(filter riotboot,$(FEATURES_USED)))