xref: /netbsd/share/man/man5/mk.conf.5 (revision 6550d01e)
1.\"	$NetBSD: mk.conf.5,v 1.51 2010/03/02 07:26:47 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 September 8, 2009
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.DFTLy
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 MKPCCCMDS
542.YorN
543Indicates whether
544.Xr pcc 1
545is built.
546If
547.Dq no ,
548then
549.Sy MKPCC
550controls if the
551PCC libraries are built.
552.DFLTn
553.
554.It Sy MKPF
555.YorN
556Indicates whether the
557.Xr pf 4
558programs, headers and LKM will be built and installed.
559.DFLTy
560.
561.It Sy MKPIC
562.YorN
563Indicates whether shared objects and libraries will be created and
564installed.
565If set to
566.Dq no ,
567the entire built system will be statically linked.
568.DFLT
569Platform dependent.
570As of this writing, all platforms except
571.Sy m68000
572and
573.Sy sh3
574default to
575.Dq yes .
576.Pp
577If
578.Dq no ,
579acts as
580.Sy MKPICLIB=no .
581.
582.It Sy MKPICINSTALL
583.YorN
584Indicates whether the
585.Xr ar 1
586format libraries
587.Sy ( lib*_pic.a ) ,
588used to generate shared libraries, are installed.
589.DFLTy
590.
591.It Sy MKPICLIB
592.YorN
593Indicates whether the
594.Xr ar 1
595format libraries
596.Sy ( lib*_pic.a ) ,
597used to generate shared libraries.
598.DFLTy
599.
600.It Sy MKPIE
601Indicates whether Position Independent Executables (PIE)
602are built and installed.
603.DFLTn
604.
605.It Sy MKPOSTFIX
606.YorN
607Indicates whether Postfix is built.
608.DFLTy
609.
610.It Sy MKPROFILE
611.YorN
612Indicates whether profiled libraries
613.Sy ( lib*_p.a )
614will be built and installed.
615.DFLT
616.Dq yes ;
617however, some platforms turn off
618.Sy MKPROFILE
619by default at times due to toolchain problems with profiled code.
620.
621.It Sy MKSHARE
622.YorN
623Indicates whether files destined to reside in
624.Sy DESTDIR Ns Pa /usr/share
625will be built and installed.
626.DFLTy
627.Pp
628If
629.Dq no ,
630acts as
631.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no .
632.
633.It Sy MKSKEY
634.YorN
635Indicates whether the S/key infrastructure
636(libraries and support programs) is built.
637.DFLTy
638.
639.It Sy MKSOFTFLOAT
640.YorN
641Indicates whether the compiler generates output containing
642library calls for floating point and possibly soft-float library
643support.
644.DFLTn
645.
646.It Sy MKSTATICLIB
647.YorN
648Indicates whether the normal static libraries
649.Sy ( lib*_g.a )
650will be built and installed.
651.DFLTy
652.
653.It Sy MKSTRIPIDENT
654.YorN
655Indicates whether program binaries and shared libraries should be built
656to include RCS IDs for use with
657.Xr ident 1 .
658.DFLTn
659.
660.It Sy MKUNPRIVED
661.YorN
662Indicates whether an unprivileged install will occur.
663The user, group, permissions, and file flags, will not be set on
664the installed item; instead the information will be appended to
665a file called
666.Pa METALOG
667in
668.Sy DESTDIR .
669The contents of
670.Pa METALOG
671is used during the generation of the distribution tar files to ensure
672that the appropriate file ownership is stored.
673.DFLTn
674.
675.It Sy MKUPDATE
676.YorN
677Indicates whether all install operations intended to write to
678.Sy DESTDIR
679will compare file timestamps before installing, and skip the install
680phase if the destination files are up-to-date.
681This also has implications on full builds (see next subsection).
682.DFLTn
683.
684.It Sy MKX11
685.YorN
686Indicates whether X11 is built and installed
687(by descending into
688.Pa src/x11
689or
690.Pa src/external/mit/xorg
691depending on the value of
692.Sy X11FLAVOUR ) .
693.DFLTn
694.Pp
695.
696.It Sy MKYP
697.YorN
698Indicates whether the YP (NIS) infrastructure
699(libraries and support programs) is built.
700.DFLTy
701.
702.It Sy OBJMACHINE
703If defined, creates objdirs of the form
704.Pa obj. Ns Sy MACHINE ,
705where
706.Sy MACHINE
707is the current architecture (as per
708.Sq "uname -m" ) .
709.
710.It Sy RELEASEDIR
711If set, specifies the directory to which a
712.Xr release 7
713layout will be written at the end of a
714.Dq make release .
715.DFLTu
716.Pp
717.Em Note :
718.Sy build.sh
719will provide a default of
720.Pa releasedir
721(in the top-level
722.Sy .OBJDIR )
723unless run in
724.Sq expert
725mode
726.
727.It Sy TOOLDIR
728Directory to hold the host tools, once built.
729This directory should be unique to a given host system and
730.Nx
731source tree.
732(However, multiple targets may share the same
733.Sy TOOLDIR ;
734the target-dependent files have unique names.)
735If unset, a default based
736on the
737.Xr uname 1
738information of the host platform will be created in the
739.Sy .OBJDIR
740of
741.Pa src .
742.DFLTu
743.
744.It Sy USE_HESIOD
745.YorN
746Indicates whether Hesiod support is
747enabled in the various applications that support it.
748If
749.Sy MKHESIOD=no ,
750.Sy USE_HESIOD
751will also be forced to
752.Dq no .
753.DFLTy
754.
755.It Sy USE_INET6
756.YorN
757Indicates whether INET6 (IPv6) support is
758enabled in the various applications that support it.
759If
760.Sy MKINET6=no ,
761.Sy USE_INET6
762will also be forced to
763.Dq no .
764.DFLTy
765.
766.It Sy USE_JEMALLOC
767.YorN
768Indicates whether the
769.Em jemalloc
770allocator
771.Pq which is designed for improved performance with threaded applications
772is used instead of the
773.Em phkmalloc
774allocator
775.Pq that was the default until Nx 5.0 .
776.DFLTy
777.
778.It Sy USE_KERBEROS
779.YorN
780Indicates whether Kerberos v5 support is
781enabled in the various applications that support it.
782If
783.Sy MKKERBEROS=no ,
784.Sy USE_KERBEROS
785will also be forced to
786.Dq no .
787.DFLTy
788.
789.It Sy USE_LDAP
790.YorN
791Indicates whether LDAP support is
792enabled in the various applications that support it.
793If
794.Sy MKLDAP=no ,
795.Sy USE_LDAP
796will also be forced to
797.Dq no .
798.DFLTy
799.
800.It Sy USE_PAM
801.YorN
802Indicates whether
803.Xr pam 8
804support is enabled in the various applications that support it.
805If
806.Sy MKPAM=no ,
807.Sy USE_PAM
808will also be forced to
809.Dq no .
810.DFLTy
811.
812.It Sy USE_SKEY
813.YorN
814Indicates whether S/key support is
815enabled in the various applications that support it.
816If
817.Sy MKSKEY=no ,
818.Sy USE_SKEY
819will also be forced to
820.Dq no .
821.DFLTy
822.Pp
823This is mutually exclusive to
824.Sy USE_PAM!=no .
825.
826.It Sy USE_SSP
827.YorN
828Indicates whether GCC stack-smashing protection (SSP) support,
829which detects stack overflows and aborts the program,
830is enabled.
831This imposes some performance penalty.
832.DFLTy
833on i386 and amd64, otherwise
834.Dq no .
835.It Sy USE_YP
836.YorN
837Indicates whether YP (NIS) support is
838enabled in the various applications that support it.
839If
840.Sy MKYP=no ,
841.Sy USE_YP
842will also be forced to
843.Dq no .
844.DFLTy
845.
846.It Sy USETOOLS
847Indicates whether the tools specified by
848.Sy TOOLDIR
849should be used as part of a build in progress.
850Must be set to
851.Dq yes
852if cross-compiling.
853.Bl -tag -width "never"
854.It Sy yes
855Use the tools from
856.Sy TOOLDIR .
857.It Sy no
858Do not use the tools from
859.Sy TOOLDIR ,
860but refuse to build native compilation tool components that are
861version-specific for that tool.
862.It Sy never
863Do not use the tools from
864.Sy TOOLDIR ,
865even when building native tool components.
866This is similar to the traditional
867.Nx
868build method, but does
869.Em not
870verify that the compilation tools in use are up-to-date enough in order
871to build the tree successfully.
872This may cause build or runtime problems when building the whole
873.Nx
874source tree.
875.El
876.DFLT
877.Dq yes
878if building all or part of a whole
879.Nx
880source tree (detected automatically);
881.Dq no
882otherwise (to preserve traditional semantics of the
883.Aq bsd.*.mk
884.Xr make 1
885include files).
886.
887.It Sy X11FLAVOUR
888Picks which X11 distribution to cross-build with
889.Nx .
890Set to either
891.Dq Xorg
892or
893.Dq XFree86 .
894Only relevant if
895.Sy MKX11!=no .
896.Pp
897.Em Default :
898.Dq Xorg
899on alpha, i386, macppc, shark and sparc64 platforms.
900.Dq XFree86
901on everything else.
902.
903.El
904.
905.Ss pkgsrc system variables
906.
907Please see the pkgsrc guide at
908.Pa http://www.netbsd.org/Documentation/pkgsrc/
909or
910.Pa pkgsrc/doc/pkgsrc.txt
911for more variables used internally by the package system and
912.Pa ${PKGSRCDIR}/mk/defaults/mk.conf
913for package-specific examples.
914.
915.Sh FILES
916.Bl -tag -width /etc/mk.conf
917.
918.It Pa /etc/mk.conf
919This file.
920.
921.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf
922Examples for settings regarding the pkgsrc collection.
923.El
924.
925.Sh SEE ALSO
926.Xr make 1 ,
927.Pa /usr/share/mk/bsd.README ,
928.Pa pkgsrc/doc/pkgsrc.txt ,
929.Pa http://www.netbsd.org/Documentation/pkgsrc/
930.Sh HISTORY
931The
932.Nm
933file appeared in
934.Nx 1.2 .
935