mirror of
https://github.com/micropython/micropython.git
synced 2026-06-11 09:05:14 +02:00
01df5a1f05
This enables C++ modules to correctly postion -l linker flags at the end of the flags instead of at the start. Updated the example C++ micropython.mk accordingly. Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
16 lines
517 B
Makefile
16 lines
517 B
Makefile
CPPEXAMPLE_MOD_DIR := $(USERMOD_DIR)
|
|
|
|
# Add our source files to the respective variables.
|
|
SRC_USERMOD += $(CPPEXAMPLE_MOD_DIR)/examplemodule.c
|
|
SRC_USERMOD_CXX += $(CPPEXAMPLE_MOD_DIR)/example.cpp
|
|
|
|
# Add our module directory to the include path.
|
|
CFLAGS_USERMOD += -I$(CPPEXAMPLE_MOD_DIR)
|
|
CXXFLAGS_USERMOD += -I$(CPPEXAMPLE_MOD_DIR) -std=c++11
|
|
|
|
# Add any necessary paths to library files.
|
|
# LDFLAGS_USERMOD += -Lpath/to/libs
|
|
|
|
# We use C++ features so have to link against the standard library.
|
|
LIBS_USERMOD += -lstdc++
|