</pre><p>The name of the native source-code file.</p>
<pre class="fragment">LOCAL_SRC_FILES := main.c
</pre><p>A list of external libraries that will be used in building the binary,
each preceded by the <code>-l</code> (link-against) option.</p>
</pre>
<h2 id="anm">Android.mk</h2>
<p>This file begins by providing the name of the shared library to generate.</p>
<pre class="no-pretty-print">
LOCAL_MODULE := native-activity
</pre>
<p>Next, it declares the name of the native source-code file.</p>
<pre class="no-pretty-print">
LOCAL_SRC_FILES := main.c
</pre>
<p>Next, it lists the external libraries for the build system to use in building the binary. The
{@code -l} (link-against) option precedes each library name.</p>
<ul>
<li>log is a logging library.</li>
<li>android encompasses the standard Android support APIs for NDK. The <a href="./md_3__key__topics__libraries__s_t_a_b_l_e-_a_p_i_s.html">Stable APIs</a>
section discusses these in more detail.</li>
<li>EGL, standardized by Khronos, corresponds to the platform-specific portion
of the graphics API.</li>
<li>OpenGL ES, the version of OpenGL for Android, depends on EGL.</li>
<li>{@code log} is a logging library.</li>
<li>{@code android} encompasses the standard Android support APIs for NDK. For more information about
the APIs that Android and the NDK support, see <a href="stable_apis.html">Android NDK Native
APIs</a>.</li>
<li>{@code EGL} corresponds to the platform-specific portion of the graphics API.</li>
<li>{@code GLESv1_CM} corresponds to OpenGL ES, the version of OpenGL for Android. This library
depends on EGL.</li>
</ul>
<p>Note that, for each library:</p>
<p>For each library:</p>
<ul>
<li>The actual file name starts with <code>lib</code>, and ends with the
<code>.so</code> extension. For example, the actual file name for the
<code>log</code> library is <code>liblog.so</code>.</li>
<li>The library lives in the following directory, relative to the NDK root: