Make sure you have GLFW and CMake installed on your system. If you don't, run the following command to install both (be aware that it may take some time):
brew install glfw
To clone the repository:
git clone --recursive https://github.com/Turbonalle/cub3D.git
To compile, navigate to the root of the repo and run:
make