$ sudo apt-get install gcc g++ cmake python3 python3-pip zlib1g-dev libssl-devFor other distros you'll need to check their documentation on how to install these tools. Notice that the build script assumes that the Python executable is named `python3` in the system, which is the case on Ubuntu systems. If you are on other distros you might need to create some sym links or update the `build.sh` script.
$ cd <path-to-Alusus> $ ./Tools/build.sh --bloc . --iloc .
$ cmake <path-to-LLVM-source> -DCMAKE_INSTALL_PREFIX=<path-to-install-dest>You might also need to manually specify your architecture by setting a value for LLVM_TARGET_ARCH. For example, to specify the architecture under a 32 bit environment use the following command instead of the one above:
$ cmake <path-to-LLVM-source> -DCMAKE_INSTALL_PREFIX=<path-to-install-dest> -DLLVM_TARGET_ARCH=i386and to specify it for a 64 bit environment use the following:
$ cmake <path-to-LLVM-source> -DCMAKE_INSTALL_PREFIX=<path-to-install-dest> -DLLVM_TARGET_ARCH=x86_64
$ make $ make install
$ cd <path-to-Builds> $ cmake <path-to-Alusus-root>/Sources -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=<path-to-Alusus-root> -DLLVM_PATH=<path-to-LLVM-install> $ make $ make installThe last statement (make install) will install the build results into folders Bin, Lib, and Include under Alusus' root folder, which is mentioned above in CMAKE_INSTALL_PREFIX cmake parameter, and not to the operating system's paths. You can choose a different folder as an installation target like /opt/Alusus by changing the value for CMAKE_INSTALL_PREFIX. The above cmake command prepares for a debug build. To change to a release build replace the value of CMAKE_BUILD_TYPE with release instead of debug.
$ make test
$ export PATH=<path-to-Alusus>/Bin:$PATH $ cd <path-to-Alusus>/Examples $ alusus hello_world.alususThe Core's executalbe's name when building in debug mode will be alusus.dbg. If the build is in release mode the name will be alusus, i.e. without the dbg extension.
If the Core is built in debug mode logging can be enabled using the --log command line argument, which accepts a number representing the details level of the log as in the following example:
$ alusus helloworld.alusus --log 16The details level is determined through binary flags representing each different details level with the least significant bit representing the lowest level. A value of 1 for each level means details for that level will be logged to the screen. The following table explains the different levels: