diff --git a/README.md b/README.md index ee1def5..7d40a80 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ let @main in { More documentation is available at [Documentation](docs/Documentation.md). ## Building -First, install the required packages. (ninja is required only for the quick build, you can use other build systems (like GNU Make) for the manual build) +First, install the required packages. (ninja is optional, you can use any build system you want) Debian/Ubuntu: `# apt install zlib1g-dev build-essential cmake ninja-build llvm-dev` @@ -86,26 +86,28 @@ CentOS/Fedora/RHEL: `# dnf install gcc gcc-c++ zlib-devel libffi-devel cmake nin Arch: `# pacman -S gcc cmake ninja llvm-libs llvm` +For Ninja users: On platforms that install ninja to `/usr/bin/ninja` instead of `/usr/bin/ninja-build`, CMake may fail. In that case, symlink ninja-build to ninja (`ln -s /usr/bin/ninja /usr/bin/ninja-build`). -Then, you can either use the quick-build script or do a manual build. - -Quick build: `./build.sh` - -Manual build first-time setup: +First-time setup: ``` -mkdir build -cd build -cmake .. +./sapphire.sh generate ``` -Then, every time you want to build: +To change build type/build system, just run `./sapphire.sh clean` followed by the generate command above. + +Building: ``` -cd build -cmake --build . +./sapphire.sh build ``` +Installing (probably will have to be run as administrator/root): +``` +./sapphire.sh install +``` +This will install the compiler at `/bin/sapphirec`. + ## Running The compiler is built at `build/sapphirec`.