This is an example DMOD library module. It provides a simple library that contains a function that prints a message to the console.
Depending on the build system you use, copy the CMakeLists.txt or Makefile and main.c file into your module directory and adapt it to your needs.