RIOT/sys/arduino/Makefile.include
Gunar Schorcht 725472cbc4 sys/arduino: add Serial over stdio support
If module `arduino_serial_stdio` is used and `ARDUINO_UART_DEV` is `UART_UNDEF`, the STDIO is used for `Serial`. It requires that the used `stdio` backend implements `stdio_available`.
2022-01-06 17:27:53 +01:00

30 lines
1016 B
Makefile

# Add Arduino sketches to the application as a module
SKETCHES = $(wildcard $(APPDIR)/*.sketch)
SKETCH_MODULE = arduino_sketches
ifneq (,$(SKETCHES))
# Define application sketches module, it will be generated into $(BINDIR)
SKETCH_MODULE_DIR ?= $(BINDIR)/$(SKETCH_MODULE)
include $(RIOTBASE)/sys/arduino/sketches.inc.mk
# Depends on module
DIRS += $(SKETCH_MODULE_DIR)
BUILDDEPS += $(SKETCH_GENERATED_FILES)
else
# arduino_sketches is now always included if arduino is, but if there
# are no sketches then no %.a will be present, so declare PSEUDOMODULE
PSEUDOMODULES += $(SKETCH_MODULE)
endif
# include the Arduino headers
INCLUDES += -I$(RIOTBASE)/sys/arduino/include
# Arduino provices C++11, which is not enabled by default in Ubuntu's avr-gcc
# package, which is __horrible__ out of date. However, we cannot simply ignore
# all Ubuntu users and instead simply manually enable C++11 support
CXXEXFLAGS += -std=c++11
PSEUDOMODULES += arduino_pwm
PSEUDOMODULES += arduino_serial_stdio