summaryrefslogtreecommitdiffstatshomepage
path: root/examples/usercmodule/cppexample/micropython.mk
diff options
context:
space:
mode:
Diffstat (limited to 'examples/usercmodule/cppexample/micropython.mk')
-rw-r--r--examples/usercmodule/cppexample/micropython.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/usercmodule/cppexample/micropython.mk b/examples/usercmodule/cppexample/micropython.mk
new file mode 100644
index 0000000000..e10d965a00
--- /dev/null
+++ b/examples/usercmodule/cppexample/micropython.mk
@@ -0,0 +1,12 @@
+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)
+
+# We use C++ features so have to link against the standard library.
+LDFLAGS_USERMOD += -lstdc++