Small example setup that builds an example with GLAD and GLFW on MacOS through the command line. I set this up to be able to run the code from https://learnopengl.com. I later learned that all the code, along with MacOS build instructions is at https://github.com/JoeyDeVries/LearnOpenGL. I tried it out and it all compiles for me, although there are a bunch of warnings.
brew install glfw3
Just run make
. You may need Mac's command line tools to be able to do this
Run the start
program via ./start