<literal>installcheck</literal> target, useful e.g., if tests require special configuration, or don't use <application>pg_regress</application>
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-extra-clean">
<term><varname>EXTRA_CLEAN</varname></term>
<listitem>
<para>
extra files to remove in <literal>make clean</literal>
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-pg-cppflags">
<term><varname>PG_CPPFLAGS</varname></term>
<listitem>
<para>
will be prepended to <varname>CPPFLAGS</varname>
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-pg-cflags">
<term><varname>PG_CFLAGS</varname></term>
<listitem>
<para>
will be appended to <varname>CFLAGS</varname>
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-pg-cxxflags">
<term><varname>PG_CXXFLAGS</varname></term>
<listitem>
<para>
will be appended to <varname>CXXFLAGS</varname>
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-pg-ldflags">
<term><varname>PG_LDFLAGS</varname></term>
<listitem>
<para>
will be prepended to <varname>LDFLAGS</varname>
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-pg-libs">
<term><varname>PG_LIBS</varname></term>
<listitem>
<para>
will be added to <varname>PROGRAM</varname> link line
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-shlib-link">
<term><varname>SHLIB_LINK</varname></term>
<listitem>
<para>
will be added to <varname>MODULE_big</varname> link line
</para>
</listitem>
</varlistentry>
<varlistentry id="extend-pgxs-pg-config">
<term><varname>PG_CONFIG</varname></term>
<listitem>
<para>
path to <application>pg_config</application> program for the
<productname>PostgreSQL</productname> installation to build against
(typically just <literal>pg_config</literal> to use the first one in your
<varname>PATH</varname>)
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Put this makefile as <literal>Makefile</literal> in the directory
which holds your extension. Then you can do
<literal>make</literal> to compile, and then <literal>make
install</literal> to install your module. By default, the extension is
compiled and installed for the
<productname>PostgreSQL</productname> installation that
corresponds to the first <command>pg_config</command> program
found in your <varname>PATH</varname>. You can use a different installation by
setting <varname>PG_CONFIG</varname> to point to its
<command>pg_config</command> program, either within the makefile
or on the <literal>make</literal> command line.
</para>
<para>
You can select a separate directory prefix in which to install your
extension's files, by setting the <command>make</command> variable
<varname>prefix</varname> when executing <literal>make install</literal>
like so:
<programlisting>
make install prefix=/usr/local/postgresql
</programlisting>
This will install the extension control and SQL files into
<filename>/usr/local/postgresql/share</filename> and the shared modules into
<filename>/usr/local/postgresql/lib</filename>. If the prefix does not
include the strings <literal>postgres</literal> or
<literal>pgsql</literal>, such as
<programlisting>
make install prefix=/usr/local/extras
</programlisting>
then <literal>postgresql</literal> will be appended to the directory
names, installing the control and SQL files into
<filename>/usr/local/extras/share/postgresql/extension</filename> and the
shared modules into <filename>/usr/local/extras/lib/postgresql</filename>.