MacOS is a bit tricky when it comes to compile a static library, in fact it cannot be linked in a normal way (with the "-l:library.a") but it needs to be passed like any other file.
Also all the MacOS API, not the posix ones, are implemented with objective-c, so to let raylib build correctly you need to specify the type of language for some files (rglfw.c is the one with the objective-c code) and most of the OpenGL stuff are deprecated so you need to add them at the compilation of the library.
MacOS is a bit tricky when it comes to compile a static library, in fact it cannot be linked in a normal way (with the "-l:library.a") but it needs to be passed like any other file. Also all the MacOS API, not the posix ones, are implemented with objective-c, so to let raylib build correctly you need to specify the type of language for some files (rglfw.c is the one with the objective-c code) and most of the OpenGL stuff are deprecated so you need to add them at the compilation of the library.