forked from infernode-os/infernode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkconfig
More file actions
21 lines (18 loc) · 858 Bytes
/
mkconfig
File metadata and controls
21 lines (18 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# mkconfig - Build configuration
# ROOT must be set by environment before running mk
#
# Platform auto-detection: supports both macOS and Linux ARM64
# Override SYSHOST in environment if needed
SHELLTYPE=sh
# Auto-detect host system if not set in environment
# On macOS: uname -s returns "Darwin", we map to "MacOSX"
# On Linux: uname -s returns "Linux"
SYSHOST=`{sh -c 'case $(uname -s) in Darwin) echo MacOSX;; *) uname -s;; esac'}
SYSTARG=$SYSHOST
OBJTYPE=`{sh -c 'case $(uname -m) in x86_64) echo amd64;; aarch64|arm64) echo arm64;; *) echo "unsupported architecture: $(uname -m)" >&2; echo amd64;; esac'}
OBJDIR=$SYSTARG/$OBJTYPE
TKSTYLE=std
# These includes are optional - mk will warn but continue if missing
# Set ROOT environment variable before running mk to avoid warnings
<$ROOT/mkfiles/mkhost-$SYSHOST
<$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE