---
name: "mk.conf"
section: "5"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/mk.conf"
---

# mk.conf(5)

system-specific configuration parameters

## NAME

**mk.conf** – system-specific configuration parameters

## SYNOPSIS

**.include \<bsd.own.mk\>**

## DESCRIPTION

To get system-specific configuration parameters, ⟨bsd.own.mk⟩ will try to include the file specified by the MAKECONF variable. If MAKECONF is not set, or no such file exists, the system make configuration file */etc/mk.conf* is included, if it exists. By default, this file does not exist, and must be created from scratch. For more information on how the make process works, and details of the format of make files, see [make(1)](/make/1.md).

⟨bsd.own.mk⟩ is generally useful when building Makefiles, so that they use the same default owners, etc. as the rest of the tree. These files may define any of the variables described below. Additionally, see [bsd.port.mk(5)](/bsd.port.mk/5.md) for a list of variables that can be set by the [ports(7)](/ports/7.md) subsystem.

## VARIABLES

The following variables are set by ⟨bsd.own.mk⟩, if they are not already defined. Defaults are in brackets.

- BINGRP

  Binary group. \[bin\]

- BINMODE

  Binary mode. \[555\]

- BINOWN

  Binary owner. \[root\]

- BSDOBJDIR

  The real path to the system "obj" tree, so that "make obj" will work correctly. \[*/usr/obj*\]

- BSDSRCDIR

  The real path to the system sources, so that "make obj" will work correctly. \[*/usr/src*\]

- DIRMODE

  Mode for new directories. \[755\]

- DOCDIR

  Base path for system documentation installation. \[*/usr/share/doc*\]

- DOCGRP

  Documentation group. \[bin\]

- DOCMODE

  Documentation mode. \[${NONBINMODE}\]

- DOCOWN

  Documentation owner. \[root\]

- INSTALL\_COPY

  The old usage of this flag is obsolescent, since [install(1)](/install/1.md) now copies by default. However, it can also be used to specify that a file not be copied unless it is different (via the **-p** option). See [install(1)](/install/1.md) for details. This is to be used when building an install script so that the entire system can either be installed with copies, or copy-if-different using a single knob. \[**-c**\]

- INSTALL\_STRIP

  The flag passed to the install program to cause the binary to be stripped. This is to be used when building an install script so that the entire system can be made stripped/not-stripped using a single knob. Note that INSTALL\_STRIP is not set if ${DEBUG} is defined. \[**-s**\]

- LIBDIR

  Base path for library installation. \[*/usr/lib*\]

- LIBGRP

  Library group. \[${BINGRP}\]

- LIBMODE

  Library mode. \[${NONBINMODE}\]

- LIBOWN

  Library owner. \[${BINOWN}\]

- MANDIR

  Base path for manual installation. \[*/usr/share/man/man*\]

- MANGRP

  Manual group. \[bin\]

- MANMODE

  Manual mode. \[${NONBINMODE}\]

- MANOWN

  Manual owner. \[root\]

- NONBINMODE

  Mode for non-executable files. \[444\]

- XOBJDIR

  The real path to the "obj" tree for building the X Window System. \[*/usr/xobj*\]

- XSRCDIR

  The real path to the X Window System sources. \[*/usr/xenocara*\]

## ADDITIONAL VARIABLES

Additionally, the following variables may be set by ⟨bsd.own.mk⟩ or in a make configuration file to modify the behaviour of the system build process (default values are in brackets along with comments, if set by ⟨bsd.own.mk⟩):

- BUILDUSER

  De-escalate privileges to user BUILDUSER when building the base system from source or making release tarballs. \[build\]

- DEBUG

  Added to assembly, C compiler and linking passes. Typically set to **-g** to build with debugging symbols. Also doesn't set INSTALL\_STRIP to **-s** per default if defined.

- GLOBAL\_AUTOCONF\_CACHE

  Set to the name of a file that all cached GNU autoconf test results will be saved in. Reduces redundant tests. Be careful! Redundant tests may not be redundant when installing substantially updated GNU programs.

- KEEPKERNELS

  If set to "yes", the kernel object directories will not be cleaned out during "make build".

- NOPIC

  Do not build shared libraries.

- NOPIE

  Do not build PIE objects or executables.

- NOPROFILE

  Do not build profiled versions of system libraries.

- PIPE

  If set to "-pipe", [gcc(1)](/gcc/1.md) will be given the **-pipe** option which can speed up compiles on machines with memory to spare. Instead of using temp files, [gcc(1)](/gcc/1.md) uses pipes for the temporary data.

- SKEY

  Compile in support for S/key authentication. \[yes; set unconditionally\]

- SKIPDIR

  A space separated list of directories, relative to BSDSRCDIR, to be skipped during "make build".

- SUDO

  Command run by [make(1)](/make/1.md) when doing certain operations requiring root privileges.

- SYS\_INCLUDE

  Copy or symlink kernel include files into */usr/include*. Possible values are "symlinks" or "copies" (which is the same as the variable being unset).

- WARNINGS

  Adds appropriate warning flags (defined in CDIAGFLAGS, e.g. **-Wall**...) to compiles. \[no\]

- WOBJGROUP

  Group having write access to BSDOBJDIR and XOBJDIR. \[wobj\]

- WOBJUMASK

  [umask(2)](/umask/2.md) with which the "obj" tree will be created by "make obj". \[007\]

- XENOCARA\_BUILD\_DRI

  Build X with Direct Rendering Infrastructure (DRI) support, providing some hardware acceleration. This is on by default for amd64/i386 architectures.

- XENOCARA\_RERUN\_AUTOCONF

  Forces X builds to re-run automake and autoconf in each module before configuring them. This option requires that the automake, autoconf and libtool packages are installed. \[no\]

## FILES

- */etc/mk.conf*

  System make configuration file.

- */usr/share/mk/\**

  System include make files.

## SEE ALSO

[make(1)](/make/1.md), [bsd.port.mk(5)](/bsd.port.mk/5.md), [ports(7)](/ports/7.md)

## HISTORY

The **mk.conf** manual page first appeared in OpenBSD 3.4.
