zmk.OS(5) | File Formats Manual (prm) | zmk.OS(5) |
OS
— module
providing operating system information
include z.mk $(eval $(call ZMK.Import,OS))
The module OS
provides information about
the operating system executing zmk. It can be used to provide tailored
behavior and account for differences between UNIX flavours.
This module does not provide any targets.
This module provides the following variables.
Identifier of the operating system kernel.
Known values are listed in the following table.
Value | Description |
Darwin | The MacOS kernel |
FreeBSD | The FreeBSD kernel |
GNU/kFreeBSD | The FreeBSD kernel with GNU userspace |
GNU | The Hurd kernel |
Linux | All Linux kernel |
NetBSD | The NetBSD kernel |
OpenBSD | The OpenBSD kernel |
SunOS | The Solaris kernel |
Windows_NT | The Windows kernel |
Haiku | The Haiku kernel |
Identifier or the application image format used.
Value | Description |
ELF | Used by most UNIX-like systems, except Darwin |
Mach-O | Used by MacOS |
PE | Used by Windows |
MZ | Used by DOS |
Due to
cross-compiling
it is more useful to look at Toolchain.ImageFormat
instead.
Windows is detected by the presence and specific value of the
OS
environment variable. All other kernels are
identified by invoking
uname
-s.
The OS
module first appeared in zmk
0.1
Zygmunt Krynicki <me@zygoon.pl>
May 3, 2020 | zmk 0.5.1 |