<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>LLVM Makefile Guide</title>
<link rel="stylesheet" href="llvm.css" type="text/css">
</head>
<body>
<div class="doc_title">LLVM Makefile Guide</div>
<ol>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#general">General Concepts</a>
<ol>
<li><a href="#projects">Projects</a></li>
<li><a href="#varvals">Variable Values</a></li>
<li><a href="#including">Including Makefiles</a>
<ol>
<li><a href="#Makefile">Makefile</a></li>
<li><a href="#Makefile.common">Makefile.common</a></li>
<li><a href="#Makefile.config">Makefile.config</a></li>
<li><a href="#Makefile.rules">Makefile.rules</a></li>
</ol>
</li>
<li><a href="#Comments">Comments</a></li>
</ol>
</li>
<li><a href="#tutorial">Tutorial</a>
<ol>
<li><a href="#libraries">Libraries</a>
<ol>
<li><a href="#Modules">Bytecode Modules</a></li>
</ol>
</li>
<li><a href="#tools">Tools</a>
<ol>
<li><a href="#JIT">JIT Tools</a></li>
</ol>
</li>
<li><a href="#projects">Projects</a></li>
</ol>
</li>
<li><a href="#targets">Targets Supported</a>
<ol>
<li><a href="#all">all</a></li>
<li><a href="#all-local">all-local</a></li>
<li><a href="#check">check</a></li>
<li><a href="#check-local">check-local</a></li>
<li><a href="#clean">clean</a></li>
<li><a href="#clean-local">clean-local</a></li>
<li><a href="#dist">dist</a></li>
<li><a href="#dist-check">dist-check</a></li>
<li><a href="#dist-clean">dist-clean</a></li>
<li><a href="#install">install</a></li>
<li><a href="#preconditions">preconditions</a></li>
<li><a href="#printvars">printvars</a></li>
<li><a href="#reconfigure">reconfigure</a></li>
<li><a href="#spotless">spotless</a></li>
<li><a href="#tags">tags</a></li>
<li><a href="#uninstall">uninstall</a></li>
</ol>
</li>
<li><a href="#variables">Using Variables</a>
<ol>
<li><a href="#setvars">Control Variables</a></li>
<li><a href="#overvars">Override Variables</a></li>
<li><a href="#getvars">Readable Variables</a></li>
<li><a href="#intvars">Internal Variables</a></li>
</ol>
</li>
</ol>
<div class="doc_author">
<p>Written by <a href="mailto:reid@x10sys.com">Reid Spencer</a></p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"><a name="introduction">Introduction </a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>This document provides <em>usage</em> information about the LLVM makefile
system. While loosely patterned after the BSD makefile system, LLVM has taken
a departure from BSD in order to implement additional features needed by LLVM.
Although makefile systems such as automake were attempted at one point, it
has become clear that the features needed by LLVM and the Makefile norm are
too great to use a more limited tool. Consequently, LLVM requires simply GNU
Make 3.79, a widely portable makefile processor. LLVM unabashedly makes heavy
use of the features of GNU Make so the dependency on GNU Make is firm. If
you're not familiar with <tt>make</tt>, it is recommended that you read the
<a href="http://www.gnu.org/software/make/manual/make.html">GNU Makefile
Manual</a>.</p>
<p>While this document is rightly part of the
<a href="ProgrammersManual.html">LLVM Programmer's Manual</a>, it is treated
separately here because of the volume of content and because it is often an
early source of bewilderment for new developers.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"><a name="general">General Concepts</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>The LLVM Makefile System is the component of LLVM that is responsible for
building the software, testing it, generating distributions, checking those
distributions, installing and uninstalling, etc