added some guidance for building on mac to build.md

This commit is contained in:
James Ravenscroft 2023-04-12 07:36:03 +01:00
parent 17a06d45ba
commit fb3e15e8ee

View File

@ -6,6 +6,8 @@ TurboPilot is a C++ program that uses the [GGML](https://github.com/ggerganov/gg
To build turbopilot you will need CMake, Libboost, a C++ toolchain and GNU Make. To build turbopilot you will need CMake, Libboost, a C++ toolchain and GNU Make.
#### Ubuntu
On Ubuntu you can install these things with: On Ubuntu you can install these things with:
```bash ```bash
@ -13,6 +15,14 @@ sudo apt-get update
sudo apt-get install libboost-dev cmake build-essential sudo apt-get install libboost-dev cmake build-essential
``` ```
#### MacOS
If you use [brew](https://brew.sh/) you can simply add these dependencies by running:
```bash
brew install cmake boost
```
### Checkout Submodules ### Checkout Submodules
Make sure the ggml subproject is checked out with `git submodule init` and `git submodule update` Make sure the ggml subproject is checked out with `git submodule init` and `git submodule update`
@ -24,9 +34,11 @@ Configure cmake to build the project with the following:
```bash ```bash
mkdir ggml/build mkdir ggml/build
cd ggml/build cd ggml/build
cmake -D CMAKE_EXE_LINKER_FLAGS="-static" .. cmake ..
``` ```
If you are running on linux you can optionally compile a static build with `cmake -D CMAKE_EXE_LINKER_FLAGS="-static" ..` which should make your binary portable across different flavours of the OS.
From here you can now build the components that make up turbopilot: From here you can now build the components that make up turbopilot:
```bash ```bash