mozilla

Revision 148410 of EXTRA_DSO_LIBS

  • Revision slug: EXTRA_DSO_LIBS
  • Revision title: EXTRA_DSO_LIBS
  • Revision id: 148410
  • Created:
  • Creator: BenjaminSmedberg
  • Is current revision? No
  • Comment fix markup

Revision Content

EXTRA_DSO_LIBS is a convenience variable. You set it to a list of libraries to link against, and rules.mk automatically adds appropriate linker flags. For example <tt>-lfoo</tt> on Linux, or <tt>foo.lib</tt> on Windows. <tt>rules.mk</tt> does not use this variable directly, the makefile must set it and then include it in EXTRA_DSO_LDOPTS.

Set By

Tree makefiles set EXTRA_DSO_LIBS before including <tt>rules.mk</tt>.

Example

{{wiki.template(':en/Standard_Makefile_Header')}}

LIBRARY_NAME = example
FORCE_SHARED_LIB = 1

EXTRA_DSO_LIBS = \
  foo \
  bar \
  $(NULL)

include $(topsrcdir)/config/rules.mk

# rules.mk converts EXTRA_DSO_LIBS to -lfoo -lbar

EXTRA_DSO_LDOPTS = \
  $(EXTRA_DSO_LIBS) \
  $(XPCOM_GLUE_LDOPTS) \
  $(NSPR_LIBS) \
  $(NULL)

Revision Source

<p><code>EXTRA_DSO_LIBS</code> is a convenience variable. You set it to a list of libraries to link against, and rules.mk automatically adds appropriate linker flags. For example <tt>-lfoo</tt> on Linux, or <tt>foo.lib</tt> on Windows. <tt>rules.mk</tt> does not use this variable directly, the makefile must set it and then include it in <code><a href="en/EXTRA_DSO_LDOPTS">EXTRA_DSO_LDOPTS</a></code>.
</p>
<h3 name="Set_By"> Set By </h3>
<p>Tree makefiles set <code>EXTRA_DSO_LIBS</code> before including <tt>rules.mk</tt>.
</p>
<h3 name="Example"> Example </h3>
<p>{{wiki.template(':en/Standard_Makefile_Header')}}
</p>
<pre class="eval"><a href="en/LIBRARY_NAME">LIBRARY_NAME</a> = example
<a href="en/FORCE_SHARED_LIB">FORCE_SHARED_LIB</a> = 1

<strong>EXTRA_DSO_LIBS</strong> = \
  foo \
  bar \
  $(NULL)

include $(topsrcdir)/config/rules.mk

<strong># rules.mk converts EXTRA_DSO_LIBS to -lfoo -lbar</strong>

<a href="en/EXTRA_DSO_LDOPTS">EXTRA_DSO_LDOPTS</a> = \
  $(<strong>EXTRA_DSO_LIBS</strong>) \
  $(<a href="en/XPCOM_GLUE_LDOPTS">XPCOM_GLUE_LDOPTS</a>) \
  $(<a href="en/NSPR_LIBS">NSPR_LIBS</a>) \
  $(NULL)
</pre>
Revert to this revision