diff options
author | Loïc Hoguin <[email protected]> | 2015-12-14 18:45:36 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-12-14 18:45:36 +0100 |
commit | 33728ad57de0799c32cad1dc3ce642e6b2476d79 (patch) | |
tree | 14710195e0218316d1dbcd886e58a8bacef69254 /guide/ch08.html | |
parent | 17d76b4bc1f367d8ff5743f05dc0c9db121430ba (diff) | |
download | erlang.mk-33728ad57de0799c32cad1dc3ce642e6b2476d79.tar.gz erlang.mk-33728ad57de0799c32cad1dc3ce642e6b2476d79.tar.bz2 erlang.mk-33728ad57de0799c32cad1dc3ce642e6b2476d79.zip |
Update user guide
Diffstat (limited to 'guide/ch08.html')
-rw-r--r-- | guide/ch08.html | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/guide/ch08.html b/guide/ch08.html index 23f8429..756d96a 100644 --- a/guide/ch08.html +++ b/guide/ch08.html @@ -60,9 +60,15 @@ environment detection:</p><pre class="programlisting">include env.mk</pre></div> Erlang.mk comes with rules to build both shared libraries and executables, using the source files it finds in <span class="emphasis"><em>$(C_SRC_DIR)</em></span>.</p><p>By default, Erlang.mk will create a shared library. To change this and create an executable instead, put this in your Makefile -before including Erlang.mk:</p><pre class="programlisting">C_SRC_TYPE = executable</pre><p>The generated file will be saved to <span class="emphasis"><em>$(C_SRC_OUTPUT)</em></span>. It -defaults to <span class="emphasis"><em>$(CURDIR)/priv/$(PROJECT).so</em></span>, the filename -adequately fitting a Unix shared library.</p><p>Erlang.mk sets appropriate compile and linker flags by default. +before including Erlang.mk:</p><pre class="programlisting">C_SRC_TYPE = executable</pre><p>The generated file name varies depending on the type of project +you have (shared library or executable) and on the platform you +build the project on.</p><p>For shared libraries, the generated file name will be +<span class="emphasis"><em>$(C_SRC_OUTPUT)$(C_SRC_SHARED_EXTENSION)</em></span>, with the default +being <span class="emphasis"><em>$(CURDIR)/priv/$(PROJECT)</em></span> followed by the extension: +<code class="literal">.dll</code> on Windows, <code class="literal">.so</code> everywhere else.</p><p>For executables, the generated file name is +<span class="emphasis"><em>$(C_SRC_OUTPUT)$(C_SRC_EXECUTABLE_EXTENSION)</em></span>, with the same +default except for the extension: <code class="literal">.exe</code> on Windows, and otherwise +nothing.</p><p>Erlang.mk sets appropriate compile and linker flags by default. These flags vary depending on the platform, and can of course be overriden.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"> <code class="literal">CC</code> |