An example Makefile is included with the NDK examples shipped in the NDK sub-directory of the Documentation installed with NUKE.
For OS X, plugins will need to be built with clang in order to be compatible. The use of GCC or stock LLVM is unlikely to produce compatible plugins. The tested and supported MacOS SDKs are 10.10, 10.11, 10.12.
The use of Intel compilers are untested and unsupported for Nuke 11.0.
On Mac OS X, NUKE is built on macOS Sierra 10.12, using the default clang compiler from the Xcode 8.2.1. Later Xcode versions may work too. Make sure that C++11 (use the ‘-std=c++11’ flag) and libc++ (this should be the default on any Xcode version since Xcode 6.x series, but could be forced by ‘-stdlib=libc++’) are used in the build process.
The resulting shared object file (.dylib) should then be moved to your ~/.nuke directory (or otherwise into the NUKE plugin_path).
See Building & Installing Plug-ins for information on creating your first plug-in.