Browse code

Detect homebrew directory on macOS build.

With thanks to Elijah Cohen <eli@eli173.com> for identifying build
problems on M1 Macs.

Andrew Alderwick authored on 12/12/2021 20:30:33
Showing 1 changed files
... ...
@@ -34,7 +34,7 @@ MSYS_NT*) # MSYS2 on Windows
34 34
 	;;
35 35
 Darwin) # macOS
36 36
 	CFLAGS="${CFLAGS} -Wno-typedef-redefinition"
37
-	UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
37
+	UXNEMU_LDFLAGS="$(brew --prefix)/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
38 38
 	;;
39 39
 Linux|*)
40 40
 	UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)"