title: NodeJS module compilation
body: <p>I have a node add on module using <a href="https://www.npmjs.com/package/node-addon-api" rel="nofollow noreferrer">node-addon-api</a> interface.</p>
  <pre class="lang-js prettyprint-override"><code>{
    &quot;targets&quot;: [
      {
        &quot;target_name&quot;: &quot;mod&quot;,
        &quot;sources&quot;: [
          &quot;./src/index.cpp&quot;,
          ...
        ],
        &quot;include_dirs&quot;: [
          ...,
          &quot;&lt;!@(node -p \&quot;require('node-addon-api').include\&quot;)&quot;
        ],
        &quot;libraries&quot;: [
          ...,
          &quot;/usr/lib/libgfortran.so.5&quot;
        ],
        'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
      }
    ]
  }
  </code></pre>
  <p>This will produce a module that I can load from NodeJS with <code>require('./mod.node')</code></p>
  <p>What are the step to do this compilation from a makefile?</p>