<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Building X Clients</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="FreeBSD.html"><EM> README for XFree86 on FreeBSD</EM></A>
 <b>:</b> <EM>Building X Clients</EM><BR>
<b>Previous:</b> <A HREF="FreeBSD6.html"><EM>Rebuilding Kernels for X</EM></A><BR>
<b>Next:</b> <A HREF="FreeBSD8.html"><EM>Thanks</EM></A>


<HR NOSHADE>
  <H2><A NAME="7"></A>7. Building X Clients</H2>

<p>The easiest way to build a new client (X application) is to use
<code>xmkmf</code> if an <code>Imakefile</code> is included with it.  Type ``<code>xmkmf -a</code>''
to create the Makefiles, then type ``<code>make</code>''.  Whenever you install
additional man pages you should update <code>whatis.db</code> by running
``<code>makewhatis /usr/X11R6/man</code>''.</p>
<p><b>Note:</b> Starting with XFree86 2.1 and FreeBSD 1.1, the symbol
<b>__386BSD__</b> no longer gets defined either by the compiler or via the
X config files for FreeBSD systems.  When porting clients to BSD
systems, make use of the symbol <b>BSD</b> for code which is truly
BSD-specific.  The value of the symbol can be used to distinguish
different BSD releases.  For example, code specific to the Net-2 and
later releases can use:</p>
<p>
<blockquote><code>
#if (BSD &gt;= 199103)
</code></blockquote>
</p>
<p>To ensure that this symbol is correctly defined, include
<code>&lt;sys/param.h&gt;</code> in the source that requires it.  Note that
the symbol <b>CSRG_BASED</b> is defined for *BSD systems in XFree86 3.1.1
and later.  This should be used to protect the inclusion of
<code>&lt;sys/param.h&gt;</code>.</p>
<p>For code that really is specific to a particular i386 BSD port, use
<b>__FreeBSD__</b> for FreeBSD, <b>__NetBSD__</b> for NetBSD,
<b>__OpenBSD__</b> for OpenBSD,
<b>__386BSD__</b> for 386BSD, and <b>__bsdi__</b> for BSD/386.</p>


 <HR NOSHADE>
<A HREF="FreeBSD.html"><EM> README for XFree86 on FreeBSD</EM></A>
 <b>:</b> <EM>Building X Clients</EM><BR>
<b>Previous:</b> <A HREF="FreeBSD6.html"><EM>Rebuilding Kernels for X</EM></A><BR>
<b>Next:</b> <A HREF="FreeBSD8.html"><EM>Thanks</EM></A>



</BODY>
</HTML>
