X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=docs%2FProjects.html;h=cb7a7c1bcfaa72df570532d54f6321760f9f9378;hb=ebb5a971d903aa4479bb2a21472597319a9b0086;hp=6be0a892f5b72dd94a1de449fe51245cb90b3d16;hpb=f6a0407ee5b89e8aabf93d818f98484764433115;p=oota-llvm.git
diff --git a/docs/Projects.html b/docs/Projects.html
index 6be0a892f5b..cb7a7c1bcfa 100644
--- a/docs/Projects.html
+++ b/docs/Projects.html
@@ -25,6 +25,10 @@
Further help
+
+
Written by John Criswell
+
+
@@ -36,37 +40,32 @@ projects that use LLVM header files, libraries, and tools. In order to use
these facilities, a Makefile from a project must do the following things:
-- Set environment variables.There are several environment variables that a
-Makefile needs to set to use the LLVM build system:
-
-
- - LLVM_SRC_ROOT - The root of the LLVM source tree.
- - LLVM_OBJ_ROOT - The root of the LLVM object tree.
- - BUILD_SRC_ROOT - The root of the project's source tree.
- - BUILD_OBJ_ROOT - The root of the project's object tree.
- - BUILD_SRC_DIR - The directory containing the current source to be
- compiled.
- - BUILD_OBJ_DIR - The directory where the current source will place
- the new object files. This should always be the current directory.
- - LEVEL - The relative path from the current directory to the root
- of the object tree.
-
-- Include Makefile.config from $(LLVM_OBJ_ROOT).
-- Include Makefile.rules from $(LLVM_SRC_ROOT).
+ - Set make variables. There are several variables that a Makefile
+ needs to set to use the LLVM build system:
+
+ - PROJECT_NAME - The name by which your project is known.
+ - LLVM_SRC_ROOT - The root of the LLVM source tree.
+ - LLVM_OBJ_ROOT - The root of the LLVM object tree.
+ - PROJ_SRC_ROOT - The root of the project's source tree.
+ - PROJ_OBJ_ROOT - The root of the project's object tree.
+ - PROJ_INSTALL_ROOT - The root installation directory.
+ - LEVEL - The relative path from the current directory to the
+ project's root ($PROJ_OBJ_ROOT).
+
+ - Include Makefile.config from $(LLVM_OBJ_ROOT).
+ - Include Makefile.rules from $(LLVM_SRC_ROOT).
There are two ways that you can set all of these variables:
-
-- You can write your own Makefiles which hard-code these values.
-
-- You can use the pre-made LLVM sample project. This sample project includes
-Makefiles, a configure script that can be used to configure the location of
-LLVM, and the ability to support multiple object directories from a single
-source directory.
+ - You can write your own Makefiles which hard-code these values.
+ - You can use the pre-made LLVM sample project. This sample project
+ includes Makefiles, a configure script that can be used to configure the
+ location of LLVM, and the ability to support multiple object directories
+ from a single source directory.
-This document assumes that you will base your project off of the LLVM sample
+
This document assumes that you will base your project on the LLVM sample
project found in llvm/projects/sample. If you want to devise your own
build system, studying the sample project and LLVM Makefiles will probably
provide enough information on how to write your own Makefiles.
@@ -88,41 +87,60 @@ provide enough information on how to write your own Makefiles.
choosing. You can place it anywhere you like. Rename the directory to match
the name of your project.
+
+If you downloaded LLVM using Subversion, remove all the directories named .svn
+(and all the files therein) from your project's new source tree. This will
+keep Subversion from thinking that your project is inside
+llvm/trunk/projects/sample.
+
Add your source code and Makefiles to your source tree.
-If you want your Makefiles to be configured by the configure
-script, or if you want to support multiple object directories, add your
-Makefiles to the configure script by adding them into the
-autoconf/configure.ac file. The macro AC_CONFIG_MAKEFILE will
-copy a file, unmodified, from the source directory to the object directory.
+If you want your project to be configured with the configure script
+then you need to edit autoconf/configure.ac as follows:
+
+ - AC_INIT. Place the name of your project, its version number and
+ a contact email address for your project as the arguments to this macro
+ - AC_CONFIG_AUX_DIR. If your project isn't in the
+ llvm/projects directory then you might need to adjust this so that
+ it specifies a relative path to the llvm/autoconf directory.
+ - LLVM_CONFIG_PROJECT. Just leave this alone.
+ - AC_CONFIG_SRCDIR. Specify a path to a file name that identifies
+ your project; or just leave it at Makefile.common.in
+ - AC_CONFIG_FILES. Do not change.
+ - AC_CONFIG_MAKEFILE. Use one of these macros for each Makefile
+ that your project uses. This macro arranges for your makefiles to be copied
+ from the source directory, unmodified, to the build directory.
+
+
After updating autoconf/configure.ac, regenerate the
configure script with these commands:
% cd autoconf
- % autoconf -o ../configure
+ % AutoRegen.sh
-You must be using Autoconf version 2.57 or higher.
+You must be using Autoconf version 2.59 or later and your aclocal version
+should 1.9 or later.
Run configure in the directory in which you want to place
object code. Use the following options to tell your project where it
can find LLVM:
- - --with-llvmsrc=<directory>
-
-
- Tell your project where the LLVM source tree is located.
-
-
- --with-llvmobj=<directory>
-
-
- Tell your project where the LLVM object tree is located.
+
- --with-llvmsrc=<directory>
+ - Tell your project where the LLVM source tree is located.
+
--with-llvmobj=<directory>
+ - Tell your project where the LLVM object tree is located.
+
--prefix=<directory>
+ - Tell your project where it should get installed.
-That's it! Now all you have to do is type gmake in the root of
-your object directory, and your project should build.
+That's it! Now all you have to do is type gmake (or make
+if your on a GNU/Linux system) in the root of your object directory, and your
+project should build.
@@ -182,30 +200,25 @@ directories:
This subdirectory should contain tests that verify that your code
works correctly. Automated tests are especially useful.
- Currently, the LLVM build system provides little support for tests,
- although some exists. Expanded support for tests will hopefully
- occur in the future. In the meantime, the LLVM system does provide the
- following:
+ Currently, the LLVM build system provides basic support for tests.
+ The LLVM system provides the following:
-
- LLVM provides several QMTest test classes that can be used to
- create tests. They can be found in
- llvm/test/QMTest/llvm.py. These test classes perform a
- variety of functions, including code optimization tests, assembly
- tests, and code analysis tests. The Makefile in
- llvm/test provides the QMTest context needed by LLVM test
- classes.
-
-
+ LLVM provides a tcl procedure that is used by Dejagnu to run
+ tests. It can be found in llvm/lib/llvm-dg.exp. This
+ test procedure uses RUN lines in the actual test case to determine
+ how to run the test. See the TestingGuide for more details. You
+ can easily write Makefile support similar to the Makefiles in
+ llvm/test to use Dejagnu to run your project's tests.
-
- The LLVM source tree provides benchmarks and programs which are
- known to compile with the LLVM GCC front ends. You can use these
+ LLVM contains an optional package called llvm-test
+ which provides benchmarks and programs that are known to compile with the
+ LLVM GCC front ends. You can use these
programs to test your code, gather statistics information, and
- compare it to the current LLVM performance statistics. These
- programs are found in the llvm/test/Programs directory.
-
- Currently, there is no way to hook your tests directly into the
- llvm/test/Programs testing harness. You will simply
+ compare it to the current LLVM performance statistics.
+
Currently, there is no way to hook your tests directly into the
+ llvm/test testing harness. You will simply
need to find a way to use the source provided within that directory
on your own.
@@ -400,13 +413,13 @@ whether you do a Debug, Release, or Profile build.
Libraries
All libraries (static and dynamic) will be stored in
- BUILD_OBJ_ROOT/lib/<type>, where type is Debug,
+ PROJ_OBJ_ROOT/<type>/lib, where type is Debug,
Release, or Profile for a debug, optimized, or
profiled build, respectively.
Executables
All executables will be stored in
- BUILD_OBJ_ROOT/tools/<type>, where type is Debug,
+ PROJ_OBJ_ROOT/<type>/bin, where type is Debug,
Release, or Profile for a debug, optimized, or profiled
build, respectively.
@@ -438,7 +451,7 @@ Mailing List.
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" />
John Criswell
- The LLVM Compiler Infrastructure
+ The LLVM Compiler Infrastructure
Last modified: $Date$