The Makefile in each module subdirectory is small and simple to use. If you do not have any extra libraries or make definitions required to build your module, you can take the template below and just drop it into the top level directory of your new module.
All OpenSER modules are kept in the sip-server/modules directory of the source code. To add your module to the build, just add a subdirectory with the same name as the module to the sip-server/modules directory and run make modules. The top level makefile will find the new code and include it into the build process.
The following template is the minimum requirements to build your module. There are a few additional things you can include into the Makefile to customize it.
include ../../Makefile.defs auto_gen= NAME=MyMod.so LIBS= include ../../Makefile.modules
The one and only required item is the NAME variable in the Makefile. You must set it to the final target name of the modules shared object.
There are few other makefile variables that you can override or append to in the Makefile to pass additional information to your build.
DEFS+=-DMY_NEW_DEFINE -I../../../external/includes
TBD