3 # The include file <bsd.own.mk> set common variables for owner,
4 # group, mode, and directories. Defaults are in brackets.
9 # DESTDIR Change the tree where the file gets installed. [not set]
11 # DISTDIR Change the tree where the file for a distribution
12 # gets installed (see /usr/src/release/Makefile). [not set]
14 # COMPRESS_CMD Program to compress documents.
15 # Output is to stdout. [gzip -cn]
17 # COMPRESS_EXT File name extension of ${COMPRESS_CMD} command. [.gz]
19 # BINOWN Binary owner. [root]
21 # BINGRP Binary group. [wheel]
23 # BINMODE Binary mode. [555]
25 # NOBINMODE Mode for non-executable files. [444]
27 # LIBDIR Base path for libraries. [/usr/lib]
29 # LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat]
31 # LIBDATADIR Base path for misc. utility data files. [/usr/libdata]
33 # LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec]
35 # LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint]
37 # SHLIBDIR Base path for shared libraries. [${LIBDIR}]
39 # LIBOWN Library owner. [${BINOWN}]
41 # LIBGRP Library group. [${BINGRP}]
43 # LIBMODE Library mode. [${NOBINMODE}]
46 # KMODDIR Base path for loadable kernel modules
47 # (see kld(4)). [/boot/kernel]
49 # KMODOWN Kernel and KLD owner. [${BINOWN}]
51 # KMODGRP Kernel and KLD group. [${BINGRP}]
53 # KMODMODE KLD mode. [${BINMODE}]
56 # SHAREDIR Base path for architecture-independent ascii
57 # text files. [/usr/share]
59 # SHAREOWN ASCII text file owner. [root]
61 # SHAREGRP ASCII text file group. [wheel]
63 # SHAREMODE ASCII text file mode. [${NOBINMODE}]
66 # DOCDIR Base path for system documentation (e.g. PSD, USD,
67 # handbook, FAQ etc.). [${SHAREDIR}/doc]
69 # DOCOWN Documentation owner. [${SHAREOWN}]
71 # DOCGRP Documentation group. [${SHAREGRP}]
73 # DOCMODE Documentation mode. [${NOBINMODE}]
76 # INFODIR Base path for GNU's hypertext system
77 # called Info (see info(1)). [${SHAREDIR}/info]
79 # INFOOWN Info owner. [${SHAREOWN}]
81 # INFOGRP Info group. [${SHAREGRP}]
83 # INFOMODE Info mode. [${NOBINMODE}]
86 # MANDIR Base path for manual installation. [${SHAREDIR}/man/man]
88 # MANOWN Manual owner. [${SHAREOWN}]
90 # MANGRP Manual group. [${SHAREGRP}]
92 # MANMODE Manual mode. [${NOBINMODE}]
95 # NLSDIR Base path for National Language Support files
96 # installation. [${SHAREDIR}/nls]
98 # NLSOWN National Language Support files owner. [${SHAREOWN}]
100 # NLSGRP National Language Support files group. [${SHAREGRP}]
102 # NLSMODE National Language Support files mode. [${NOBINMODE}]
104 # INCLUDEDIR Base path for standard C include files [/usr/include]
106 .if !target(__<bsd.own.mk>__)
109 .if !defined(_WITHOUT_SRCCONF)
110 SRCCONF?= /etc/src.conf
111 .if exists(${SRCCONF})
112 .include "${SRCCONF}"
122 .if defined(MODULES_WITH_WORLD)
123 KMODDIR?= /boot/modules
125 KMODDIR?= /boot/kernel
129 KMODMODE?= ${BINMODE}
132 LIBCOMPATDIR?= /usr/lib/compat
133 LIBDATADIR?= /usr/libdata
134 LIBEXECDIR?= /usr/libexec
135 LINTLIBDIR?= /usr/libdata/lint
139 LIBMODE?= ${NOBINMODE}
143 SHAREDIR?= /usr/share
146 SHAREMODE?= ${NOBINMODE}
148 MANDIR?= ${SHAREDIR}/man/man
151 MANMODE?= ${NOBINMODE}
153 DOCDIR?= ${SHAREDIR}/doc
156 DOCMODE?= ${NOBINMODE}
158 INFODIR?= ${SHAREDIR}/info
159 INFOOWN?= ${SHAREOWN}
160 INFOGRP?= ${SHAREGRP}
161 INFOMODE?= ${NOBINMODE}
163 NLSDIR?= ${SHAREDIR}/nls
166 NLSMODE?= ${NOBINMODE}
168 INCLUDEDIR?= /usr/include
171 .if !defined(DEBUG_FLAGS)
175 COMPRESS_CMD?= gzip -cn
178 .if !defined(_WITHOUT_SRCCONF)
180 # Define MK_* variables (which are either "yes" or "no") for users
181 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
182 # make(1) environment.
183 # These should be tested with `== "no"' or `!= "no"' in makefiles.
184 # The NO_* variables should only be set by makefiles.
188 # Supported NO_* options (if defined, MK_* will be forced to "no",
189 # regardless of user's setting).
195 .if defined(NO_${var})
201 # Compat NO_* options (same as above, except their use is deprecated).
203 .if !defined(BURN_BRIDGES)
266 .if defined(NO_${var})
267 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
271 .endif # !defined(BURN_BRIDGES)
274 # Older-style variables that enabled behaviour when set.
276 .if defined(YES_HESIOD)
279 .if defined(MAKE_IDEA)
283 __DEFAULT_YES_OPTIONS = \
387 WPA_SUPPLICANT_EAPOL \
391 __DEFAULT_NO_OPTIONS = \
404 # Default behaviour of some options depends on the architecture. Unfortunately
405 # this means that we have to test TARGET_ARCH (the buildworld case) as well
406 # as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not
407 # used at all in bsd.*.mk, but we have to make an exception here if we want
408 # to allow defaults for some things like clang and fdt to vary by target
411 .if defined(TARGET_ARCH)
416 # Clang is only for x86 and 32-bit powerpc right now, by default.
417 .if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc"
418 __DEFAULT_YES_OPTIONS+=CLANG
420 __DEFAULT_NO_OPTIONS+=CLANG
422 # FDT is needed only for arm and powerpc (and not powerpc64)
423 .if ${__T} == "arm" || ${__T} == "armeb" || ${__T} == "powerpc"
424 __DEFAULT_YES_OPTIONS+=FDT
426 __DEFAULT_NO_OPTIONS+=FDT
431 # MK_* options which default to "yes".
433 .for var in ${__DEFAULT_YES_OPTIONS}
434 .if defined(WITH_${var}) && defined(WITHOUT_${var})
435 .error WITH_${var} and WITHOUT_${var} can't both be set.
437 .if defined(MK_${var})
438 .error MK_${var} can't be set by a user.
440 .if defined(WITHOUT_${var})
446 .undef __DEFAULT_YES_OPTIONS
449 # MK_* options which default to "no".
451 .for var in ${__DEFAULT_NO_OPTIONS}
452 .if defined(WITH_${var}) && defined(WITHOUT_${var})
453 .error WITH_${var} and WITHOUT_${var} can't both be set.
455 .if defined(MK_${var})
456 .error MK_${var} can't be set by a user.
458 .if defined(WITH_${var})
464 .undef __DEFAULT_NO_OPTIONS
467 # Force some options off if their dependencies are off.
468 # Order is somewhat important.
470 .if ${MK_LIBPTHREAD} == "no"
474 .if ${MK_LIBTHR} == "no"
478 .if ${MK_BIND} == "no"
482 MK_BIND_LIBS_LWRES:= no
488 .if ${MK_BIND_MTREE} == "no"
492 .if ${MK_CDDL} == "no"
496 .if ${MK_CRYPT} == "no"
502 .if ${MK_CXX} == "no"
507 .if ${MK_IPX} == "no"
511 .if ${MK_MAIL} == "no"
516 .if ${MK_NETGRAPH} == "no"
521 .if ${MK_OPENSSL} == "no"
530 .if ${MK_TEXTPROC} == "no"
534 .if ${MK_TOOLCHAIN} == "no"
542 # Set defaults for the MK_*_SUPPORT variables.
546 # MK_*_SUPPORT options which default to "yes" unless their corresponding
547 # MK_* variable is set to "no".
560 .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
561 .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
563 .if defined(MK_${var}_SUPPORT)
564 .error MK_${var}_SUPPORT can't be set by a user.
566 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
567 MK_${var}_SUPPORT:= no
569 MK_${var}_SUPPORT:= yes
574 # MK_* options whose default value depends on another option.
579 .if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H})
580 .error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set.
582 .if defined(MK_${vv:H})
583 .error MK_${vv:H} can't be set by a user.
585 .if defined(WITH_${vv:H})
587 .elif defined(WITHOUT_${vv:H})
590 MK_${vv:H}:= ${MK_${vv:T}}
594 .endif # !_WITHOUT_SRCCONF
596 .endif # !target(__<bsd.own.mk>__)