Skip to content

Commit 53f7aa0

Browse files
committed
Add macOS support to premake
This does not mean you can build MTA on macOS
1 parent 800f1fa commit 53f7aa0

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

linux-build.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/bin/bash
22

3-
PREMAKE5=utils/premake5
3+
# Find premake binary location
4+
if [ "$(uname)" == "Darwin" ]; then
5+
PREMAKE5=utils/premake5-macos
6+
else
7+
PREMAKE5=utils/premake5
8+
fi
9+
10+
# 32bit vs 64bit
411
if [[ $1 = "32" ]]; then
512
CONFIG=release_x86
613
else
@@ -14,7 +21,13 @@ rm -Rf Bin/
1421
# Generate makefiles
1522
$PREMAKE5 gmake
1623

24+
# Number of cores
25+
if [ "$(uname)" == "Darwin" ]; then
26+
NUM_CORES=$(sysctl -n hw.ncpu)
27+
else
28+
NUM_CORES=$(grep -c ^processor /proc/cpuinfo)
29+
fi
30+
1731
# Build!
18-
NUM_CORES=$(grep -c ^processor /proc/cpuinfo)
1932
cd Build/
2033
make -j$NUM_CORES config=$CONFIG all

utils/premake5-macos

1.08 MB
Binary file not shown.

0 commit comments

Comments
 (0)