Provided by: zmk-doc_0.5.1-2_all bug

NAME

     OS — module providing operating system information

SYNOPSIS

     include z.mk

     $(eval $(call ZMK.Import,OS))

DESCRIPTION

     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.

TARGETS

     This module does not provide any targets.

VARIABLES

     This module provides the following variables.

   OS.Kernel
     Identifier of the operating system kernel.

     Known values are listed in the following table.
     ┌─────────────┬───────────────────────────────────────┐
     │   ValueDescription              │
     ├─────────────┼───────────────────────────────────────┤
     │      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                      │
     └─────────────┴───────────────────────────────────────┘
   OS.ImageFormat
     Identifier or the application image format used.
     ┌───────┬───────────────────────────────────────────────┐
     │ValueDescription                  │
     ├───────┼───────────────────────────────────────────────┤
     │   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.

IMPLEMENTATION NOTES

     Windows is detected by the presence and specific value of the OS environment variable. All
     other kernels are identified by invoking uname -s.

HISTORY

     The OS module first appeared in zmk 0.1

AUTHORS

     Zygmunt Krynicki <me@zygoon.pl>