---
This just uses Homebrew's new directory organization for M1 Macs,
but I don't have access to an x86_64 Mac to test this on,
so before this patch is accepted someone may want to test that
build.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/build.sh b/build.sh
index 5f40efd..c4e8c28 100755
--- a/build.sh
@@ -34,7 +34,11 @@ MSYS_NT*) # MSYS2 on Windows
;;
Darwin) # macOS
CFLAGS="${CFLAGS} -Wno-typedef-redefinition"
- UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"+ if [[ `uname -m` == 'arm64' ]]; then+ UXNEMU_LDFLAGS="/opt/homebrew/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"+ else+ UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"+ fi ;;
Linux|*)
UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)"
--
2.30.1 (Apple Git-130)
Dear Elijah,
Thanks very much for the patch!
On Fri, Dec 10, 2021 at 08:35:51PM +0000, Elijah Cohen wrote:
>+ if [[ `uname -m` == 'arm64' ]]; then>+ UXNEMU_LDFLAGS="/opt/homebrew/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')">+ else>+ UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
I've been able to make this more generalised! Running `brew --prefix`
gives me “/usr/local” on my x86_64 Mac, so I've used the output of that
in the build script now. Does it work for you on your M1?
https://git.sr.ht/~rabbits/uxn/commit/68abbc2ed874aed8924032377df92084fe207900
Thanks very much,
Andy
Hi Andy,
On Sunday, December 12th, 2021 at 4:47 PM, Andrew Alderwick wrote:
> I've been able to make this more generalised! Running `brew --prefix`> gives me “/usr/local” on my x86_64 Mac, so I've used the output of that> Does it work for you on your M1?
That's a great find! It does indeed work on my M1, and the build script looks much cleaner for it.
Yours,
Elijah