# Machine and operating system dependencies

`m3build` contains some built-in support for machine and operating system dependencies. The package structure makes provision for separate build directories for different machine and operating system combinations. The default behaviour of `m3build` is to generate the compiled object files, libaries and programs in the build directory corresponding to the machine and operating system on which `m3build` is executing.

The following set of variables exist to allow `m3makefile`s to be parameterised by machine and operating system.

TARGET
  This variable defines the machine type on which the library or program being built will execute. It is chosen from the standard set of machine types on which Modula-3 runs. Check the runtime or m3build packages for the complete set.
OS_TYPE
  This variable defines the operating system under which the library or program being built will execute. Currently, Modula-3 supports two operating system variants, POSIX and WIN32. The former breaks down further into specific variants, but this variation is not made available to clients. [There is a way if you absolutely need it, see the unix package.]
BUILD_DIR
  This names the package sub-directory in which object files, libraries and programs will be built. It is usually, but not always, the same as `TARGET`.

The net effect of the above allows a single package to build a family of architectural variants, in different build sub-directories, where each variant uses the same set of `m3makefile`s, parameterized by the above variables. If this degree of flexibility is insufficient, then the extra variation must be specified in a separate package, which can use `include_pkg` to access the shared sources.