There are several environment variables that a Makefile needs to set to use the LLVM build system:
After updating autoconf/configure.ac, regenerate the configure script with these commands:
cd autoconf
autoconf -o ../configure
You must be using Autoconf version 2.57 or higher.
Libraries can be object files, archives, or dynamic libraries. The lib directory is just a convenient place for libraries as it places them all in a directory from which they can be linked later.
By placing your header files in include, they will be found automatically by the LLVM build system. For example, if you have a file include/jazz/note.h, then your source files can include it simply with #include "jazz/note.h".
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, there is no way to hook your tests directly into the llvm/test/Programs testing harness. You will simply need to find a way to use the source provided within that directory on your own.
Note that this works only for statically linked libraries.
For example, to link libsample.so, you would have the following line in your Makefile:
LIBS+=-lsample
It is highly suggested that you append to CFLAGS and CPPFLAGS as opposed to overwriting them. The master Makefiles may already have useful options in them that you may not want to overwrite.