25c4563f26
Add working example code to provide a starting point for users with files that they can just copy, and include the modules in the coverage test to verify the complete user C module build functionality. The cexample module uses the code originally found in cmodules.rst, which has been updated to reflect this and partially rewritten with more complete information.
13 lines
428 B
Makefile
13 lines
428 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)
|
|
|
|
# We use C++ features so have to link against the standard library.
|
|
LDFLAGS_USERMOD += -lstdc++
|