1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/arduino/Makefile.include
Gunar Schorcht 4b92ce289b sys/arduino: compilation of Arduino libraries
To make it possible to use an Arduino library, a new pseudomodule arduino_lib is introduced. This pseudomodule enables implicitly module arduino but avoids that a sketch is required or generated and compiled. Thus, it is possible to compile and use a package or directory with some source files from an Arduino library in RIOT applications.
2019-11-21 19:13:14 +01:00

24 lines
801 B
Makefile

# Add Arduino sketches to the application as a module
SKETCHES = $(wildcard $(APPDIR)/*.sketch)
ifneq (,$(SKETCHES))
# Define application sketches module, it will be generated into $(BINDIR)
SKETCH_MODULE ?= arduino_sketches
SKETCH_MODULE_DIR ?= $(BINDIR)/$(SKETCH_MODULE)
include $(RIOTBASE)/sys/arduino/sketches.inc.mk
# Depends on module
USEMODULE += $(SKETCH_MODULE)
DIRS += $(SKETCH_MODULE_DIR)
BUILDDEPS += $(SKETCH_GENERATED_FILES)
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