X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FProjects.html;h=cb7a7c1bcfaa72df570532d54f6321760f9f9378;hb=caf4fbd5df1f4e0c1bd305391271e203949a2477;hp=ecdb35b54c6c4d6a5570ea69a493caf5dd10bdad;hpb=7911ce2578fd143f37ef4de7aa3e5795c18df4a6;p=oota-llvm.git diff --git a/docs/Projects.html b/docs/Projects.html index ecdb35b54c6..cb7a7c1bcfa 100644 --- a/docs/Projects.html +++ b/docs/Projects.html @@ -40,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:

    -
  1. Set environment variables.There are several environment variables that a -Makefile needs to set to use the LLVM build system: - -
  2. -
  3. Include Makefile.config from $(LLVM_OBJ_ROOT).
  4. -
  5. Include Makefile.rules from $(LLVM_SRC_ROOT).
  6. +
  7. Set make variables. There are several variables that a Makefile + needs to set to use the LLVM build system: +
  8. +
  9. Include Makefile.config from $(LLVM_OBJ_ROOT).
  10. +
  11. Include Makefile.rules from $(LLVM_SRC_ROOT).

There are two ways that you can set all of these variables:

-
    -
  1. You can write your own Makefiles which hard-code these values.
  2. - -
  3. 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.
  4. +
  5. You can write your own Makefiles which hard-code these values.
  6. +
  7. 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.

@@ -92,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: + +
  • 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.

    @@ -186,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:

    @@ -404,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. @@ -442,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$