A cross-platform build system for creating iOS, macOS, Linux, and Windows programs.



With Theos being Makefile-based, additional functionality can be provided as-desired through “modules.”

Modules are directories containing Makefiles with additional rules, variables, and/or checks that you would like your Theos install to contain. A module structure may look something like

├── instance
│   ├──
│   ├──
│   └──
├── package
│   └──

where each .mk file contains custom code such as

_THEOS_INTERNAL_LDFLAGS += -rpath my/path/here/ -rpath $(THEOS_PACKAGE_INSTALL_PREFIX)/Library/Frameworks -rpath $(THEOS_PACKAGE_INSTALL_PREFIX)/usr/lib


Modules’ structure and the respective .mk filenames tell Theos where to add your provided functionality. For example, my-module/package/ tells Theos to add the functionality contained in the module’s file to $(THEOS_MAKE_PATH)/package/ Providing additional functionality through modules is only supported for specific parts of Theos, however. These parts include:

  • platform/*.mk
  • targets/**/*.mk
  • package/*.mk
  • install/*.mk
  • instance/*.mk
    • Except
  • master/*.mk

Modules should be placed in $(THEOS_MODULE_PATH) and are imported by Theos only when you explicitly ask them to be through MODULES = my-module. The exception to this are package schemes, which can be provided in module form (see $THEOS/vendor/mod/rootless for an example). For package schemes, the scheme specified by THEOS_PACKAGE_SCHEME will be imported without needing to specify the module explicitly via MODULES. These are “enabled” through Makefile’s -include feature and are typically included after all of the stock Theos functionality has been defined. Thus, modules support all Theos variables that have been defined by the time your specific Module is imported.