How to compile AspectC++
==============================================

Prerequisites for compiling the AspectC++ project from the source
repository:

  - The GNU C++ compiler (g++), normally the default compiler of
    the mainstream Linux distributions will work.

  - libxml2 including header files (libxml2-dev on some Linux
    distributions). Check if the xml2-config command is in your
    command search path.

  - Make sure you have one of the supported Clang versions installed, see
    LLVM_SUPPORTED_VERSIONS in AspectC++/Makefile for currently supported
    versions. We need the development package include the static libraries
    libclang*.a and the respective include files.

Steps for compiling the AspectC++ project (for details, consult the
README files within each of the subdirectories):

    $ make -C AspectC++ SHARED=1 LLVMCONF=<path to llvm-config, if not in PATH>
    $ make -C Ag++

Hint: Compilation can be significantly sped up on multi-processor/multi-core
machines by parallelizing the build process.  Add "-j<P>" to the make
invocations mentioned above; "<P>" is the number of parallel activities you
want to allow, e.g. "make -C Puma -j2".

Eventually you will find the compiled binaries of ag++ and ac++ in the
directory "AspectC++/bin/linux-release". These binaries are statically
linked against Clang, but all other libraries (including libxml2) are
used dynamically.

  - If you need statically linked binaries, follow the instructions in
    AspectC++/README.

  - If you want a "debug-build" instead of a release build, use "TARGET=linux-debug"
    as an additional option when you run "make" (in all three directories).

  - If you want to compile on macOS, use "TARGET=macos_x86_64" for Intel-based
    or "TARGET=macos_arm64" for Apple Silicon-based Macs as additional option
    when you run "make" (in all three directories).

You can run the test suite with the following steps:

  - Run "make test".
    $ make -C AspectC++ test LLVMCONF=<see above> TARGET=<optional>

If you experience any problems, use our aspectc-user mailing list or
our bugzilla system. Visit www.aspectc.org and look for "support" for
information.

The AspectC++ Developers
