X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FProjects.html;h=cb7a7c1bcfaa72df570532d54f6321760f9f9378;hb=befc9c16fae1719cafe9f54ab2b67219db44dc11;hp=d708c8eda351634d54b8bb5d7da674954aa4ce64;hpb=d10bc6e0bb1f41ed9cf356f59c2d17721ad49719;p=oota-llvm.git diff --git a/docs/Projects.html b/docs/Projects.html index d708c8eda35..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.

    @@ -195,20 +209,16 @@ directories:

    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.
  • - -

    - + 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. @@ -403,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. @@ -441,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$