xref: /netbsd-src/share/man/man5/mk.conf.5 (revision d25ffa98a4bfca1fe272f3c182496ec9934faac7)
1.\"	$NetBSD: mk.conf.5,v 1.54 2011/06/02 08:58:34 jruoho Exp $
2.\"
3.\"  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
4.\"  All rights reserved.
5.\"
6.\"  This code is derived from software contributed to The NetBSD Foundation
7.\"  by Luke Mewburn.
8.\"
9.\"  Redistribution and use in source and binary forms, with or without
10.\"  modification, are permitted provided that the following conditions
11.\"  are met:
12.\"  1. Redistributions of source code must retain the above copyright
13.\"     notice, this list of conditions and the following disclaimer.
14.\"  2. Redistributions in binary form must reproduce the above copyright
15.\"     notice, this list of conditions and the following disclaimer in the
16.\"     documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd June 2, 2011
31.Dt MK.CONF 5
32.Os
33.\" turn off hyphenation
34.hym 999
35.
36.Sh NAME
37.Nm mk.conf
38.Nd make configuration file
39.
40.Sh DESCRIPTION
41The
42.Nm
43file overrides various parameters used during the build of the system.
44.Pp
45Listed below are the
46.Nm
47variables that may be set, the values to which each may be set,
48a brief description of what each variable does, and a reference to
49relevant manual pages.
50.
51.Ss NetBSD System variables
52.
53.de YorN
54Can be set to
55.Dq yes
56or
57.Dq no .
58..
59.de DFLT
60.Pp
61.Em Default :
62..
63.de DFLTu
64.DFLT
65Unset.
66..
67.de DFLTy
68.DFLT
69.Dq yes
70..
71.de DFLTn
72.DFLT
73.Dq no
74..
75.Bl -tag -width MKDYNAMICROOT
76.
77.It Sy NETBSDSRCDIR
78The path to the top level of the
79.Nx
80sources.
81If
82.Xr make 1
83is run from within the
84.Nx
85source tree, the default is the top
86level of that tree (as determined by the presence of
87.Pa build.sh
88and
89.Pa tools/ ) ,
90otherwise
91.Sy BSDSRCDIR
92will be used.
93.
94.It Sy BSDOBJDIR
95The real path to the
96.Sq obj
97tree for the
98.Nx
99source tree.
100.DFLT
101.Pa /usr/obj
102.
103.It Sy BSDSRCDIR
104The real path to the
105.Nx
106source tree.
107.DFLT
108.Pa /usr/src
109.
110.It Sy BUILD
111If defined,
112.Sq "make install"
113checks that the targets in the source directories are up-to-date and
114re-makes them if they are out of date, instead of blindly trying to install
115out of date or non-existent targets.
116.DFLTu
117.
118.It Sy BUILDID
119Identifier for the build.
120The identifier will be appended to
121object directory names, and can be consulted in the
122.Xr make 1
123configuration file in order to set additional build parameters,
124such as compiler flags.
125.DFLTu
126.
127.It Sy COPTS
128Extra options for the C compiler.
129Should be appended to (e.g.,
130.Sy COPTS+=-g ) ,
131rather than explicitly set.
132Note that
133.Sy CPUFLAGS ,
134not
135.Sy COPTS ,
136should be used for
137compiler flags that select CPU-related options.
138Also note that
139.Sy CFLAGS
140should never be set in
141.Nm .
142.
143.It Sy CPUFLAGS
144Additional flags passed to the compiler/assembler to select
145CPU instruction set options, CPU tuning options, etc.
146Such options should not be specified in
147.Sy COPTS ,
148because some parts of the build process need to override
149CPU-related compiler options.
150.
151.It Sy DESTDIR
152Directory to contain the built
153.Nx
154system.
155If set, special options are passed to the compilation tools to
156prevent their default use of the host system's
157.Sy /usr/include , /usr/lib ,
158and so forth.
159This pathname should
160.Em not
161end with a slash
162.Pq /
163character (for installation into the system's root directory, set
164.Sy DESTDIR
165to an empty string).
166The directory must reside on a file system which supports long file
167names and hard links.
168.DFLT
169Empty string if
170.Sy USETOOLS
171is
172.Dq yes ;
173unset otherwise.
174.Pp
175.Em Note :
176.Sy build.sh
177will provide a default of
178.Pa destdir. Ns Sy MACHINE
179(in the top-level
180.Sy .OBJDIR )
181unless run in
182.Sq expert
183mode
184.
185.It Sy MAKEVERBOSE
186Level of verbosity of status messages.
187Supported values:
188.Bl -tag -width xxx
189.It 0
190No descriptive messages or commands executed by
191.Xr make 1
192are shown.
193.It 1
194Brief messages are shown describing what is being done,
195but the actual commands executed by
196.Xr make 1
197are not displayed.
198.It 2
199Descriptive messages are shown as above (prefixed with a
200.Sq # ) ,
201and ordinary commands performed by
202.Xr make 1
203are displayed.
204.It 3
205In addition to the above, all commands performed by
206.Xr make 1
207are displayed, even if they would ordinarily have been hidden
208through use of the
209.Dq \&@
210prefix in the relevant makefile.
211.It 4
212In addition to the above, commands executed by
213.Xr make 1
214are traced through use of the
215.Xr sh 1
216.Dq Fl x
217flag.
218.El
219.DFLT
2202
221.
222.It Sy MKATF
223.YorN
224Indicates whether the Automated Testing Framework is built and installed.
225.DFLTy
226.
227.It Sy MKBINUTILS
228.YorN
229Indicates whether any of the binutils tools or libraries should be built.
230That is, the libraries
231.Sy libbfd ,
232.Sy libiberty ,
233or any of the things that depend upon them, e.g.
234.Xr as 1 ,
235.Xr ld 1 ,
236.Xr dbsym 8 ,
237or
238.Xr mdsetimage 8 .
239.DFLTy
240.
241.It Sy MKCATPAGES
242.YorN
243Indicates whether preformatted plaintext manual pages will be created
244and installed.
245.DFLTy
246.
247.It Sy MKCOMPLEX
248.YorN
249Indicates whether the
250.Lb libm
251is compiled with support for
252.In complex.h .
253.DFLTy
254.
255.It Sy MKCRYPTO
256.YorN
257Indicates whether cryptographic code will be included in a build;
258provided for the benefit of countries that do not allow strong
259cryptography.
260Will not affect use of the standard low-security password encryption system,
261.Xr crypt 3 .
262.DFLTy
263.Pp
264If
265.Dq no ,
266acts as
267.Sy MKKERBEROS=no .
268.
269.It Sy MKCRYPTO_IDEA
270.YorN
271Indicates whether IDEA support will be built into
272.Sy libcrypto_idea.a .
273.DFLTn
274.
275.It Sy MKCRYPTO_MDC2
276.YorN
277Indicates whether MDC2 support will be built into
278.Sy libcrypto_mdc2.a .
279.DFLTn
280.
281.It Sy MKCRYPTO_RC5
282.YorN
283Indicates whether RC5 support will be built into
284.Sy libcrypto_rc5.a .
285.DFLTn
286.
287.It Sy MKCVS
288.YorN
289Indicates whether
290.Xr cvs 1
291is built.
292.DFLTy
293.
294.It Sy MKDEBUG
295.YorN
296Indicates whether separate debugging symbols should be installed into
297.Sy DESTDIR Ns Pa /usr/libdata/debug .
298.DFLTn
299.
300.It Sy MKDEBUGLIB
301.YorN
302Indicates whether debug libraries
303.Sy ( lib*_g.a )
304will be built and installed.
305Debug libraries are compiled with
306.Dq Li -g -DDEBUG .
307.DFLTn
308.
309.It Sy MKDOC
310.YorN
311Indicates whether system documentation destined for
312.Sy DESTDIR Ns Pa /usr/share/doc
313will be installed.
314.DFLTy
315.
316.It Sy MKDYNAMICROOT
317.YorN
318Indicates whether all programs should be dynamically linked,
319and to install shared libraries required by
320.Pa /bin
321and
322.Pa /sbin
323and the shared linker
324.Xr ld.elf_so 1
325into
326.Pa /lib .
327If
328.Sq no ,
329link programs in
330.Pa /bin
331and
332.Pa /sbin
333statically.
334.DFLTy
335.
336.It Sy MKGCC
337.YorN
338Indicates whether
339.Xr gcc 1
340or any related libraries
341.Pq Sy libg2c , libgcc , libobjc , libstdc++
342are built.
343.DFLTy
344.
345.It Sy MKGCCCMDS
346.YorN
347Indicates whether
348.Xr gcc 1
349is built.
350If
351.Dq no ,
352then
353.Sy MKGCC
354controls if the
355GCC libraries are built.
356.DFLTy
357.
358.It Sy MKGDB
359.YorN
360Indicates whether
361.Xr gdb 1
362is built.
363.DFLTy
364.
365.It Sy MKHESIOD
366.YorN
367Indicates whether the Hesiod infrastructure
368(libraries and support programs) is built and installed.
369.DFLTy
370.
371.It Sy MKHOSTOBJ
372.YorN
373If set to
374.Dq yes ,
375then for programs intended to be run on the compile host,
376the name, release, and architecture of the host operating system
377will be suffixed to the name of the object directory created by
378.Dq make obj .
379(This allows multiple host systems to compile
380.Nx
381for a single target.)
382If set to
383.Dq no ,
384then programs built to be run on the compile host will use the same
385object directory names as programs built to be run on the target.
386.DFLTn
387.
388.It Sy MKHTML
389.YorN
390Indicates whether the HTML manual pages are created and installed.
391.DFLTy
392.
393.It Sy MKIEEEFP
394.YorN
395Indicates whether code for IEEE754/IEC60559 conformance is built.
396Has no effect on most platforms.
397.DFLTy
398.
399.It Sy MKINET6
400Indicates whether INET6 (IPv6) infrastructure
401(libraries and support programs) is built and installed.
402.DFLTy
403.
404.It Sy MKINFO
405.YorN
406Indicates whether GNU Info files, used for the documentation for
407most of the compilation tools, will be built and installed.
408.DFLTy
409.
410.It Sy MKIPFILTER
411.YorN
412Indicates whether the
413.Xr ipf 4
414programs, headers and other components will be built and installed.
415.DFLTy
416.
417.It Sy MKISCSI
418.YorN
419Indicates whether the iSCSI library and applications are
420built and installed.
421.DFLTy
422.
423.It Sy MKKERBEROS
424.YorN
425Indicates whether the Kerberos v5 infrastructure
426(libraries and support programs) is built and installed.
427.DFLTy
428.
429.It Sy MKLDAP
430.YorN
431Indicates whether the Lightweight Directory Access Protocol (LDAP)
432infrastructure
433(libraries and support programs) is built and installed.
434.DFLTy
435.
436.It Sy MKLINKLIB
437.YorN
438Indicates whether all of the shared library infrastructure is built.
439If
440.Sq no ,
441prevents:
442installation of the
443.Sy *.a
444libraries,
445installation of the
446.Sy *_pic.a
447libraries on PIC systems,
448building of
449.Sy *.a
450libraries on PIC systems,
451or
452installation of
453.Sy .so
454symlinks on ELF systems.
455.DFLTy
456.Pp
457If
458.Dq no ,
459acts as
460.Sy MKPICINSTALL=no MKPROFILE=no .
461.
462.It Sy MKLINT
463.YorN
464Indicates whether
465.Xr lint 1
466will be run against portions of the
467.Nx
468source code during the build, and whether lint libraries will be
469installed into
470.Sy DESTDIR Ns Pa /usr/libdata/lint .
471.DFLTy
472.
473.It Sy MKMAN
474.YorN
475Indicates whether manual pages will be installed.
476.DFLTy
477.Pp
478If
479.Dq no ,
480acts as
481.Sy MKCATPAGES=no MKHTML=no .
482.
483.It Sy MKMANZ
484.YorN
485Indicates whether manual pages should be compressed with
486.Xr gzip 1
487at installation time.
488.DFLTn
489.
490.It Sy MKMDNS
491.YorN
492Indicates whether the mDNS (Multicast DNS) infrastructure
493(libraries and support programs) is built and installed.
494.DFLTy
495.
496.It Sy MKNLS
497.YorN
498Indicates whether Native Language System (NLS) locale zone files will be
499built and installed.
500.DFLTy
501.
502.It Sy MKOBJ
503.YorN
504Indicates whether object directories will be created when running
505.Dq make obj .
506If set to
507.Dq no ,
508then all built files will be located inside the regular source tree.
509.DFLTy
510.Pp
511If
512.Dq no ,
513acts as
514.Sy MKOBJDIRS=no .
515.
516.It Sy MKOBJDIRS
517.YorN
518Indicates whether object directories will be created automatically
519(via a
520.Dq make obj
521pass) at the start of a build.
522.DFLTn
523.
524.It Sy MKPAM
525.YorN
526Indicates whether the
527.Xr pam 8
528framework (libraries and support files) is built.
529The pre-PAM code is not supported and may be removed in the future.
530.DFLTy
531.
532.It Sy MKPCC
533.YorN
534Indicates whether
535.Xr pcc 1
536or any related libraries
537.Pq Sy libpcc , libpccsoftfloat
538are built.
539.DFLTn
540.
541.It Sy MKPF
542.YorN
543Indicates whether the
544.Xr pf 4
545programs, headers and LKM will be built and installed.
546.DFLTy
547.
548.It Sy MKPIC
549.YorN
550Indicates whether shared objects and libraries will be created and
551installed.
552If set to
553.Dq no ,
554the entire built system will be statically linked.
555.DFLT
556Platform dependent.
557As of this writing, all platforms except
558.Sy m68000
559and
560.Sy sh3
561default to
562.Dq yes .
563.Pp
564If
565.Dq no ,
566acts as
567.Sy MKPICLIB=no .
568.
569.It Sy MKPICINSTALL
570.YorN
571Indicates whether the
572.Xr ar 1
573format libraries
574.Sy ( lib*_pic.a ) ,
575used to generate shared libraries, are installed.
576.DFLTy
577.
578.It Sy MKPICLIB
579.YorN
580Indicates whether the
581.Xr ar 1
582format libraries
583.Sy ( lib*_pic.a ) ,
584used to generate shared libraries.
585.DFLTy
586.
587.It Sy MKPIE
588Indicates whether Position Independent Executables (PIE)
589are built and installed.
590.DFLTn
591.
592.It Sy MKPOSTFIX
593.YorN
594Indicates whether Postfix is built.
595.DFLTy
596.
597.It Sy MKPROFILE
598.YorN
599Indicates whether profiled libraries
600.Sy ( lib*_p.a )
601will be built and installed.
602.DFLT
603.Dq yes ;
604however, some platforms turn off
605.Sy MKPROFILE
606by default at times due to toolchain problems with profiled code.
607.
608.It Sy MKSHARE
609.YorN
610Indicates whether files destined to reside in
611.Sy DESTDIR Ns Pa /usr/share
612will be built and installed.
613.DFLTy
614.Pp
615If
616.Dq no ,
617acts as
618.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no .
619.
620.It Sy MKSKEY
621.YorN
622Indicates whether the S/key infrastructure
623(libraries and support programs) is built.
624.DFLTy
625.
626.It Sy MKSOFTFLOAT
627.YorN
628Indicates whether the compiler generates output containing
629library calls for floating point and possibly soft-float library
630support.
631.DFLTn
632.
633.It Sy MKSTATICLIB
634.YorN
635Indicates whether the normal static libraries
636.Sy ( lib*_g.a )
637will be built and installed.
638.DFLTy
639.
640.It Sy MKSTRIPIDENT
641.YorN
642Indicates whether program binaries and shared libraries should be built
643to include RCS IDs for use with
644.Xr ident 1 .
645.DFLTn
646.
647.It Sy MKUNPRIVED
648.YorN
649Indicates whether an unprivileged install will occur.
650The user, group, permissions, and file flags, will not be set on
651the installed item; instead the information will be appended to
652a file called
653.Pa METALOG
654in
655.Sy DESTDIR .
656The contents of
657.Pa METALOG
658is used during the generation of the distribution tar files to ensure
659that the appropriate file ownership is stored.
660.DFLTn
661.
662.It Sy MKUPDATE
663.YorN
664Indicates whether all install operations intended to write to
665.Sy DESTDIR
666will compare file timestamps before installing, and skip the install
667phase if the destination files are up-to-date.
668This also has implications on full builds (see next subsection).
669.DFLTn
670.
671.It Sy MKX11
672.YorN
673Indicates whether X11 is built and installed
674(by descending into
675.Pa src/x11
676or
677.Pa src/external/mit/xorg
678depending on the value of
679.Sy X11FLAVOUR ) .
680.DFLTn
681.Pp
682.
683.It Sy MKYP
684.YorN
685Indicates whether the YP (NIS) infrastructure
686(libraries and support programs) is built.
687.DFLTy
688.
689.It Sy OBJMACHINE
690If defined, creates objdirs of the form
691.Pa obj. Ns Sy MACHINE ,
692where
693.Sy MACHINE
694is the current architecture (as per
695.Sq "uname -m" ) .
696.
697.It Sy RELEASEDIR
698If set, specifies the directory to which a
699.Xr release 7
700layout will be written at the end of a
701.Dq make release .
702.DFLTu
703.Pp
704.Em Note :
705.Sy build.sh
706will provide a default of
707.Pa releasedir
708(in the top-level
709.Sy .OBJDIR )
710unless run in
711.Sq expert
712mode
713.
714.It Sy TOOLDIR
715Directory to hold the host tools, once built.
716This directory should be unique to a given host system and
717.Nx
718source tree.
719(However, multiple targets may share the same
720.Sy TOOLDIR ;
721the target-dependent files have unique names.)
722If unset, a default based
723on the
724.Xr uname 1
725information of the host platform will be created in the
726.Sy .OBJDIR
727of
728.Pa src .
729.DFLTu
730.
731.It Sy USE_FORT
732Indicates whether the so-called
733.Dq FORTIFY_SOURCE
734.Xr security 7
735extensions are enabled; see
736.Xr ssp 3
737for details.
738This imposes some performance penalty.
739.DFLTn
740.
741.It Sy USE_HESIOD
742.YorN
743Indicates whether Hesiod support is
744enabled in the various applications that support it.
745If
746.Sy MKHESIOD=no ,
747.Sy USE_HESIOD
748will also be forced to
749.Dq no .
750.DFLTy
751.
752.It Sy USE_INET6
753.YorN
754Indicates whether INET6 (IPv6) support is
755enabled in the various applications that support it.
756If
757.Sy MKINET6=no ,
758.Sy USE_INET6
759will also be forced to
760.Dq no .
761.DFLTy
762.
763.It Sy USE_JEMALLOC
764.YorN
765Indicates whether the
766.Em jemalloc
767allocator
768.Pq which is designed for improved performance with threaded applications
769is used instead of the
770.Em phkmalloc
771allocator
772.Pq that was the default until Nx 5.0 .
773.DFLTy
774.
775.It Sy USE_KERBEROS
776.YorN
777Indicates whether Kerberos v5 support is
778enabled in the various applications that support it.
779If
780.Sy MKKERBEROS=no ,
781.Sy USE_KERBEROS
782will also be forced to
783.Dq no .
784.DFLTy
785.
786.It Sy USE_LDAP
787.YorN
788Indicates whether LDAP support is
789enabled in the various applications that support it.
790If
791.Sy MKLDAP=no ,
792.Sy USE_LDAP
793will also be forced to
794.Dq no .
795.DFLTy
796.
797.It Sy USE_PAM
798.YorN
799Indicates whether
800.Xr pam 8
801support is enabled in the various applications that support it.
802If
803.Sy MKPAM=no ,
804.Sy USE_PAM
805will also be forced to
806.Dq no .
807.DFLTy
808.
809.It Sy USE_SKEY
810.YorN
811Indicates whether S/key support is
812enabled in the various applications that support it.
813If
814.Sy MKSKEY=no ,
815.Sy USE_SKEY
816will also be forced to
817.Dq no .
818.DFLTy
819.Pp
820This is mutually exclusive to
821.Sy USE_PAM!=no .
822.
823.It Sy USE_SSP
824.YorN
825Indicates whether GCC stack-smashing protection (SSP) support,
826which detects stack overflows and aborts the program,
827is enabled.
828This imposes some performance penalty.
829.DFLTy
830on i386 and amd64, otherwise
831.Dq no .
832.It Sy USE_YP
833.YorN
834Indicates whether YP (NIS) support is
835enabled in the various applications that support it.
836If
837.Sy MKYP=no ,
838.Sy USE_YP
839will also be forced to
840.Dq no .
841.DFLTy
842.
843.It Sy USETOOLS
844Indicates whether the tools specified by
845.Sy TOOLDIR
846should be used as part of a build in progress.
847Must be set to
848.Dq yes
849if cross-compiling.
850.Bl -tag -width "never"
851.It Sy yes
852Use the tools from
853.Sy TOOLDIR .
854.It Sy no
855Do not use the tools from
856.Sy TOOLDIR ,
857but refuse to build native compilation tool components that are
858version-specific for that tool.
859.It Sy never
860Do not use the tools from
861.Sy TOOLDIR ,
862even when building native tool components.
863This is similar to the traditional
864.Nx
865build method, but does
866.Em not
867verify that the compilation tools in use are up-to-date enough in order
868to build the tree successfully.
869This may cause build or runtime problems when building the whole
870.Nx
871source tree.
872.El
873.DFLT
874.Dq yes
875if building all or part of a whole
876.Nx
877source tree (detected automatically);
878.Dq no
879otherwise (to preserve traditional semantics of the
880.Aq bsd.*.mk
881.Xr make 1
882include files).
883.
884.It Sy X11FLAVOUR
885Picks which X11 distribution to cross-build with
886.Nx .
887Set to either
888.Dq Xorg
889or
890.Dq XFree86 .
891Only relevant if
892.Sy MKX11!=no .
893.Pp
894.Em Default :
895.Dq Xorg
896on alpha, i386, macppc, shark and sparc64 platforms.
897.Dq XFree86
898on everything else.
899.
900.El
901.
902.Ss pkgsrc system variables
903.
904Please see the pkgsrc guide at
905.Pa http://www.netbsd.org/Documentation/pkgsrc/
906or
907.Pa pkgsrc/doc/pkgsrc.txt
908for more variables used internally by the package system and
909.Pa ${PKGSRCDIR}/mk/defaults/mk.conf
910for package-specific examples.
911.
912.Sh FILES
913.Bl -tag -width /etc/mk.conf
914.
915.It Pa /etc/mk.conf
916This file.
917.
918.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf
919Examples for settings regarding the pkgsrc collection.
920.El
921.
922.Sh SEE ALSO
923.Xr make 1 ,
924.Pa /usr/share/mk/bsd.README ,
925.Pa pkgsrc/doc/pkgsrc.txt ,
926.Pa http://www.netbsd.org/Documentation/pkgsrc/
927.Sh HISTORY
928The
929.Nm
930file appeared in
931.Nx 1.2 .
932