mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
be30f072e2
Generate a module for arduino sketches in a subfolder of BINDIR. This prevents issues when doing concurrent builds or out of tree build with readonly sources. Declare all generated files as `BUILDDEPS` to be re-created after `clean` on parrallel `clean all`.
16 lines
516 B
Makefile
16 lines
516 B
Makefile
# Add Arduino sketches to the application as a module
|
|
|
|
# Define application sketches module, it will be generated into $(BINDIR)
|
|
SKETCH_MODULE ?= arduino_sketches
|
|
SKETCH_MODULE_DIR ?= $(BINDIR)/$(SKETCH_MODULE)
|
|
SKETCHES = $(wildcard $(APPDIR)/*.sketch)
|
|
include $(RIOTBASE)/sys/arduino/sketches.inc.mk
|
|
|
|
# Depends on module
|
|
USEMODULE += $(SKETCH_MODULE)
|
|
DIRS += $(SKETCH_MODULE_DIR)
|
|
BUILDDEPS += $(SKETCH_GENERATED_FILES)
|
|
|
|
# include the Arduino headers
|
|
INCLUDES += -I$(RIOTBASE)/sys/arduino/include
|