Skip to content

Commit 3945353

Browse files
authored
Update README_macOS_compile.md
Update compilation instructions for X86_64 and ARM64
1 parent aedf8c0 commit 3945353

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

README_macOS_compile.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,23 @@ Get Xcode Command Line tools:
1414
xcode-select --install
1515
```
1616

17-
We have confirmed a successful Mednafen build on macOS Monterey running on both Intel(x86_64) and Apple silicon M1(ARM64) architectures and will provide instructions accordingly.
17+
We have confirmed a successful Mednafen build on macOS Monterey and higher running on both Intel(x86_64) and Apple silicon M1(ARM64) architectures.
1818

19-
For a native Intel(x86_64) build we will use "Homebrew" to pull in the needed Mednafen dependencies:
19+
For a native Intel(x86_64) or Apple Silicon(ARM64) build we will use "Homebrew" to pull in the needed Mednafen dependencies:
2020
```
2121
brew install pkg-config gettext sdl2 libsndfile jack lzo zstd
2222
```
2323

24-
**Optional Note:** There is currently an SDL issue with newer SDL2 Brew (2.0.22+) installs that can cause Mednafen to "hang" when exiting due to the SDL Audio close function having changed. To work around this make sure to use the 2.0.22 SDL2 Brew install.
25-
26-
**Update 04/2023:** SDL 2.26.4(SDL-release-2.26.4-0-g07d0f51fa) no longer seems to exhibit this behaviour so we will mark the below as optional in case you are seeing the "hanging" behaviour upon exiting Mednafen.
27-
```
28-
wget https://github.com/Homebrew/homebrew-core/raw/5c1cf00f7540d9cf0344c0bac4aabe4e5a7fa8a5/Formula/sdl2.rb
29-
brew install --build-from-source sdl2.rb
30-
```
31-
32-
For a native Apple silicon M1(ARM64) build we will have to use "MacPorts" in order to get the correct Mednafen dependencies to build:
33-
```
34-
sudo port -N install pkgconfig clang-14 libiconv libsdl2 libcdio gettext libsndfile libmpcdec zlib
35-
```
36-
3724
### Compilation Commands
3825

39-
Mednafen's build process makes use of 'configure' in order to set up environment-specific options in preparation
40-
for the compile; the below instructions to build Mednafen will attempt to use all of your machine's threads when compiling as the compilation process can take up quite some time, the procedure is as follows :
26+
Mednafen's build process makes use of 'configure' in order to set up environment-specific options in preparation for the compile.
27+
28+
The below instructions to build Mednafen will attempt to use all of your machine's threads when compiling as the compilation process can take up quite some time, we disable optimization for the build as Mednafen has proven quite unstable when attempting to have the clang compiler on macOS optimize the application. The compilation procedure is as follows:
4129

4230
```
4331
./configure --enable-ss
4432
45-
make -j `sysctl -n hw.logicalcpu`
33+
make CFLAGS='-g -w' CXXFLAGS='-g -w' -j `sysctl -n hw.logicalcpu`
4634
```
4735

4836
At this point, the Mednafen binary can be found in the mednafen/src/ folder; you may manually copy/move it

0 commit comments

Comments
 (0)