$ sudo apt-get install gcc g++ cmake gawk php-cliAnd for Fedora use the following:
$ sudo dnf install gcc gcc-c++ cmake gawk php valgrind valgrind-develNotice the need to install valgrind in Fedora in order to be able to build LLVM. We didn't need to install valgrind in Ubuntu. You might also need to install other packages if you are using distros other than the above. Visit LLVM's website for more details on how to build it.
$ cd <path-to-Alusus>/Tools $ ./build.sh
$ 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:
Copyright (C) 2018 Sarmad Khalid Abdullah.
This file is released under Alusus Public License, Version 1.0. For details on usage and copying conditions
read the full license in the accompanying license file or at http://alusus.net/alusus_license_1_0.