[BACK]Return to bsd.README CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Annotation of src/share/mk/bsd.README, Revision 1.365

1.365   ! jmcneill    1: #      $NetBSD: bsd.README,v 1.364 2017/11/01 15:24:42 khorben Exp $
1.24      mikel       2: #      @(#)bsd.README  8.2 (Berkeley) 4/2/94
1.1       cgd         3:
1.213     lukem       4: This is the README file for the make "include" files for the NetBSD
                      5: source tree.  The files are installed in /usr/share/mk, and are,
                      6: by convention, named with the suffix ".mk".
1.1       cgd         7:
                      8: Note, this file is not intended to replace reading through the .mk
                      9: files for anything tricky.
                     10:
                     11: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                     12:
                     13: RANDOM THINGS WORTH KNOWING:
                     14:
                     15: The files are simply C-style #include files, and pretty much behave like
                     16: you'd expect.  The syntax is slightly different in that a single '.' is
                     17: used instead of the hash mark, i.e. ".include <bsd.prog.mk>".
                     18:
                     19: One difference that will save you lots of debugging time is that inclusion
                     20: of the file is normally done at the *end* of the Makefile.  The reason for
                     21: this is because .mk files often modify variables and behavior based on the
                     22: values of variables set in the Makefile.  To make this work, remember that
                     23: the FIRST target found is the target that is used, i.e. if the Makefile has:
                     24:
                     25:        a:
                     26:                echo a
                     27:        a:
                     28:                echo a number two
                     29:
                     30: the command "make a" will echo "a".  To make things confusing, the SECOND
                     31: variable assignment is the overriding one, i.e. if the Makefile has:
                     32:
                     33:        a=      foo
                     34:        a=      bar
                     35:
                     36:        b:
                     37:                echo ${a}
                     38:
                     39: the command "make b" will echo "bar".  This is for compatibility with the
                     40: way the V7 make behaved.
                     41:
                     42: It's fairly difficult to make the BSD .mk files work when you're building
1.75      agc        43: multiple programs in a single directory.  It's a lot easier to split up the
1.1       cgd        44: programs than to deal with the problem.  Most of the agony comes from making
1.36      ross       45: the "obj" directory stuff work right, not because we switched to a new version
1.1       cgd        46: of make.  So, don't get mad at us, figure out a better way to handle multiple
                     47: architectures so we can quit using the symbolic link stuff.  (Imake doesn't
                     48: count.)
                     49:
                     50: The file .depend in the source directory is expected to contain dependencies
                     51: for the source files.  This file is read automatically by make after reading
                     52: the Makefile.
                     53:
                     54: The variable DESTDIR works as before.  It's not set anywhere but will change
                     55: the tree where the file gets installed.
                     56:
                     57: The profiled libraries are no longer built in a different directory than
                     58: the regular libraries.  A new suffix, ".po", is used to denote a profiled
1.265     njoly      59: object, and ".pico" denotes a shared (position-independent) object.
1.97      itojun     60:
1.142     lukem      61: There are various make variables used during the build.
                     62:
                     63: Many variables support a (case sensitive) value of "no" or "yes",
                     64: and are tested with  ${VAR} == "no"  and  ${VAR} != "no" .
                     65:
                     66:
1.172     hubertf    67: The basic rule for the variable naming scheme is as follows:
                     68:
1.231     apb        69: HOST_xxx       A command that runs on the host machine regardless of
                     70:                whether or not the system is being cross compiled, or
                     71:                flags for such a command.
                     72:
1.172     hubertf    73: MKxxx          Can be set to "no" to disable functionality, or
                     74:                "yes" to enable it.
                     75:                Usually defaults to "yes", although some variables
                     76:                default to "no".
                     77:                Due to make(1) implementation issues, if a temporary
1.224     lukem      78:                command-line override of a mk.conf(5) or <bsd.own.mk>
1.214     wiz        79:                setting is required whilst still honoring a particular
1.172     hubertf    80:                Makefile's setting of MKxxx, use
                     81:                        env MKxxx=value make
                     82:                instead of
                     83:                        make MKxxx=value
                     84:
                     85: NOxxx          If defined, disables a feature.
                     86:                Not intended for users.
                     87:                This is to allow Makefiles to disable functionality
                     88:                that they don't support (such as missing man pages).
                     89:                NOxxx variables must be defined before <bsd.own.mk>
                     90:                is included.
                     91:
1.231     apb        92: TOOL_xxx       A tool that is provided as part of the USETOOLS
                     93:                framework.  When not using the USETOOLS framework,
                     94:                TOOL_xxx variables should refer to tools that are
                     95:                already installed on the host system.
                     96:
1.172     hubertf    97: The following variables that control how things are made/installed that
                     98: are not set by default. These should not be set by Makefiles; they're for
1.224     lukem      99: the user to define in MAKECONF (see <bsd.own.mk>, below, or mk.conf(5))
                    100: or on the make(1) command line:
1.172     hubertf   101:
                    102: BUILD          If defined, 'make install' checks that the targets in the
                    103:                source directories are up-to-date and remakes them if they
                    104:                 are out of date, instead of blindly trying to install
                    105:                 out of date or non-existent targets.
                    106:
                    107: MAKEVERBOSE    Control how "verbose" the standard make(1) rules are.
                    108:                Default: 2
                    109:                Supported values:
                    110:                    0   Minimal output ("quiet")
                    111:                    1   Describe what is occurring
                    112:                    2   Describe what is occurring and echo the actual command
1.241     apb       113:                    3   Ignore the effect of the "@" prefix in make commands
                    114:                    4   Trace shell commands using the shell's -x flag
1.172     hubertf   115:
1.312     jmmv      116: MKATF          If "no", don't build the Automated Testing Framework (ATF),
                    117:                which includes the libatf-c, libatf-c++ and libatf-sh libraries
                    118:                and the various command line tools.  Also, because the build of
                    119:                the libraries is disabled, don't build the NetBSD test suite
                    120:                either.
1.210     gmcgarry  121:                Default: yes
                    122:
1.252     skrll     123: MKBFD          Obsolete, use MKBINUTILS
                    124:
1.266     joerg     125: MKBINUTILS     If "no", don't build binutils (gas, ld, etc and libbfd,
                    126:                libopcodes)
1.172     hubertf   127:                Default: yes
                    128:
1.266     joerg     129: MKBSDTAR       If "yes", use the libarchive based cpio and tar instead of
                    130:                the pax frontends.
                    131:                Default: no
                    132:
1.172     hubertf   133: MKCATPAGES     If "no", don't build or install the catman pages.
1.292     joerg     134:                Default: no
1.172     hubertf   135:
1.234     mrg       136: MKCOMPAT       If "no", don't build or install the src/compat.
1.303     jkoshy    137:                Default: yes on amd64/mips64/sparc64, no elsewhere.
1.234     mrg       138:
1.344     matt      139: MKCOMPATTESTS          If "yes", build and install the NetBSD test suite when
                    140:                building and installing src/compat.
                    141:                Default: no
                    142:
1.345     matt      143: MKCOMPATX11    If "yes", build and install the X11 libraries when
                    144:                building and installing src/compat.
                    145:                Default: no
                    146:
1.210     gmcgarry  147: MKCOMPLEX      If "no", don't build libm support for <complex.h>
                    148:                Default: yes
                    149:
1.329     ozaki-r   150: MKCTF          If "no", do not build and install CTF tools, and also
                    151:                don't generate and manipulate CTF data of ELF binaries
                    152:                during build.
                    153:                Default: no
                    154:
1.349     christos  155: NOCTF          Don't generate and manipulate CTF data of ELF binaries
                    156:                during build. It is set internally for standalone programs.
                    157:
1.172     hubertf   158: MKCVS          If "no", don't build or install cvs(1).
                    159:                Default: yes
                    160:
1.184     lukem     161: MKDEBUG                If "no", don't build and install separate debugging symbols
                    162:                into /usr/libdata/debug.
                    163:                Default: no
                    164:
1.352     christos  165: NODEBUG                Don't compile with debugging symbols during build.
                    166:                It is set internally for standalone programs.
                    167:
1.219     lukem     168: MKDEBUGLIB     Build *_g.a debugging libraries, which are compiled
                    169:                with -DDEBUG.
1.176     christos  170:                Default: no
                    171:
1.314     christos  172: MKDEPINCLUDES  If "yes" issue .include statements in the .depend file
                    173:                instead of inlining the contents of the .d files. Useful
                    174:                when stale dependencies are present, to list the exact
                    175:                files that need refreshing. It is off by default because
                    176:                it is possibly slower.
                    177:                Default "no"
                    178:
1.172     hubertf   179: MKDOC          If "no", don't build or install the documentation.
                    180:                Default: yes
                    181:
1.302     jkoshy    182: MKDTRACE       If "no", do not build and install the kernel modules,
                    183:                utilities and libraries used to implement the dtrace(1)
                    184:                facility.
                    185:                Default: no
                    186:
1.172     hubertf   187: MKDYNAMICROOT  If "no", build programs in /bin and /sbin statically,
                    188:                don't install certain libraries in /lib, and don't
                    189:                install the shared linker into /libexec.
                    190:                Default: yes
                    191:
1.260     uebayasi  192: MKEXTSRC        If not "no", 'make build' also descends into either src/extsrc
                    193:                to cross-build programs and libraries externally added by
                    194:                users, and automatically enables creation of those sets.
                    195:                Default: no
                    196:
1.201     lukem     197: MKGCC          If "no", don't build gcc(1) or any of the GCC-related
1.186     mrg       198:                libraries (libgcc, libobjc, libstdc++).
1.172     hubertf   199:                Default: yes
                    200:
1.201     lukem     201: MKGCCCMDS      If "no", don't build gcc(1), but do build the GCC-related
                    202:                libraries (libgcc, libobjc, libstdc++).
1.172     hubertf   203:                Default: yes
                    204:
                    205: MKGDB          If "no", don't build gdb(1).
                    206:                Default: yes
                    207:
1.334     dholland  208: MKGROFFHTMLDOC If "no", avoid trying to use groff to generate html for
                    209:                miscellaneous articles, as this seems to sometimes want
                    210:                to run software not in base. Does not affect html man
                    211:                pages.
                    212:                Default: no
                    213:
1.172     hubertf   214: MKHESIOD       If "no", disables building of Hesiod infrastructure
                    215:                (libraries and support programs).
                    216:                Default: yes
                    217:
                    218: MKHOSTOBJ      If not "no", for programs intended to be run on the compile
                    219:                host, the name, release, and architecture of the host
                    220:                operating system will be suffixed to the name of the object
                    221:                directory created by "make obj".
                    222:                Default: no
                    223:
1.222     lukem     224: MKHTML         If "no", don't build or install the HTML man pages.
                    225:                Default: yes
1.172     hubertf   226:
                    227: MKIEEEFP       If "no", don't add code for IEEE754/IEC60559 conformance.
                    228:                Has no effect on most platforms.
                    229:                Default: yes
                    230:
1.225     joerg     231: MKSTRIPIDENT   Strip the RCS IDs from program binaries and shared libraries.
                    232:                Default: no
                    233:
1.172     hubertf   234: MKINET6                If "no", disables building of INET6 (IPv6) infrastructure
1.273     mrg       235:                (libraries and support programs).  This option must not be
                    236:                set to "no" if MKX11 is not "no".
1.172     hubertf   237:                Default: yes
                    238:
                    239: MKINFO         If "no", don't build or install Info documentation from
                    240:                Texinfo source files.
                    241:                Default: yes
                    242:
                    243: MKIPFILTER     If "no", don't build or install the IP Filter programs and LKM.
                    244:                Default: yes
                    245:
1.208     lukem     246: MKISCSI                If "no", don't build or install iSCSI library or applications
1.181     mrg       247:                (depends on libpthread.)
                    248:                Default: yes
                    249:
1.331     martin    250: MKKDEBUG       If "yes", force building of kernel symbol info and creation
                    251:                of netbsd.gdb in all kernel builds, independently of the
                    252:                settings for "makeoptions DEBUG" in the kernel config file.
                    253:
1.172     hubertf   254: MKKERBEROS     If "no", disables building of Kerberos v5
                    255:                infrastructure (libraries and support programs).
                    256:                Default: yes
                    257:
1.304     jkoshy    258: MKKMOD         If "no", disables building of kernel modules.
                    259:                Default: yes
                    260:
1.312     jmmv      261: MKKYUA         If "no", don't build Kyua nor its dependent library Lutok.
                    262:                Note that setting this to "no" does not disable the build of
                    263:                the NetBSD test suite itself; the build of the tests is
                    264:                controlled by the MKATF knob.
                    265:                Default: no (until the import is done and validated)
                    266:
1.208     lukem     267: MKLDAP         If "no", disables building of LDAP infrastructure
                    268:                (libraries and support programs).
                    269:                Default: yes
                    270:
1.316     joerg     271: MKLIBCXX       If not "no", build and install libc++.
                    272:                Default: no
                    273:
                    274: MKLIBSTDCXX    If not "no", build and install libstdc++.
                    275:                Default: yes
                    276:
1.206     lukem     277: MKLINKLIB      If "no", act as "MKLINT=no MKPICINSTALL=no MKPROFILE=no".
1.172     hubertf   278:                Also:
                    279:                        - don't install the .a libraries
                    280:                        - don't install _pic.a libraries on PIC systems
                    281:                        - don't build .a libraries on PIC systems
                    282:                        - don't install the .so symlink on ELF systems
                    283:                I.e, only install the shared library (and the .so.major
                    284:                symlink on ELF).
                    285:                Default: yes
                    286:
                    287: MKLINT         If "no", don't build or install the lint libraries.
                    288:                Default: yes
                    289:
1.261     tron      290: MKLVM          If "no", don't build or install the logical volume manager
1.245     agc       291:                and device mapper tools and libraries
1.262     tron      292:                Default: yes
1.245     agc       293:
1.172     hubertf   294: MKMAN          If "no", don't build or install the man or catman pages,
                    295:                and also acts as "MKCATPAGES=no MKHTML=no".
                    296:                Default: yes
                    297:
1.256     joerg     298: MKMANDOC       If "yes", mandoc is built as tool and used to compile
                    299:                catman or html pages.  A directory can be exempted by
                    300:                defining NOMANDOC.  Individual man pages are exempted
1.278     joerg     301:                if NOMANDOC.${target} is set to "yes".
1.292     joerg     302:                Default: yes
1.256     joerg     303:
1.172     hubertf   304: MKMANZ         If not "no", compress manual pages at installation time.
                    305:                Default: no
                    306:
1.253     tsarna    307: MKMDNS         If "no", disables building of mDNS infrastructure
                    308:                (libraries and support programs).
                    309:                Default: yes
                    310:
1.172     hubertf   311: MKNLS          If "no", don't build or install the NLS files and locale
                    312:                definition files.
                    313:                Default: yes
                    314:
1.275     rmind     315: MKNPF          If "no", don't build or install the NPF and its modules.
                    316:                Default: yes
                    317:
1.357     christos  318: MKNSD          If "no", don't build or install the "nsd" DNS authoritative
                    319:                server.
                    320:                Default: no
                    321:
1.172     hubertf   322: MKOBJ          If "no", don't enable the rule which creates objdirs,
                    323:                and also acts as "MKOBJDIRS=no".
                    324:                Default: yes
                    325:
                    326: MKOBJDIRS      If "no", don't create objdirs during a "make build".
                    327:                Default: no
                    328:
                    329: MKPAM          If "no", disables building of PAM authentication
                    330:                infrastructure (libraries and support programs).
1.182     peter     331:                Default: yes
1.172     hubertf   332:
1.210     gmcgarry  333: MKPCC          If "no", don't build pcc(1) or any of the PCC-related
                    334:                libraries (libpcc, libpccsoftfloat).
                    335:                Default: no
                    336:
1.172     hubertf   337: MKPF           If "no", don't build or install the pf programs and LKM.
                    338:                Default: yes
                    339:
                    340: MKPIC          If "no", don't build or install shared libraries, and
                    341:                also acts as "MKPICLIB=no"
1.301     abs       342:                Default: yes (for MACHINE_ARCHs that support it)
1.172     hubertf   343:
                    344: MKPICINSTALL   If "no", don't install the *_pic.a libraries.
                    345:                Default: yes
                    346:
                    347: MKPICLIB       If "no", don't build *_pic.a libraries, and build the
                    348:                shared object libraries from the .a libraries.
                    349:                A symlink is installed in ${DESTDIR}/usr/lib for the
                    350:                _pic.a library pointing to the .a library.
                    351:                Default: yes
                    352:
1.198     christos  353: MKPIE          If "no", create regular executables. Otherwise create
                    354:                PIE (Position Independent Executables).
                    355:                Default: no
                    356:
1.350     christos  357: NOPIE          Don't create PIE (Position Independent Executables)
1.349     christos  358:                It is set internally for standalone programs.
                    359:
1.272     mrg       360: MKPIGZGZIP     If "no", only install pigz as pigz, not gzip.
1.271     mrg       361:                Default: no
                    362:
1.172     hubertf   363: MKPOSTFIX      If "no", don't build or install postfix(1).
                    364:                Default: yes
                    365:
                    366: MKPROFILE      If "no", don't build or install the profiling (*_p.a) libraries.
                    367:                Default: yes
                    368:
1.355     christos  369: MKRADEONFIRMWARE If "no", install the /libdata/firmware/radeon directory,
                    370:                which is necessary for the radeon DRM driver.
                    371:                Default: yes on i386 and amd64, no elsewhere.
                    372:
1.354     christos  373: MKRELRO                If "partial", set the non-PLT GOT to read-only. If "full"
                    374:                also force immediate symbol binding.
                    375:                Default: no
                    376:
1.364     khorben   377: MKREPRO         If "yes", create reproducible builds. This enables
1.295     wiz       378:                different switches to make two builds from the same source tree
                    379:                result in the same build results.
                    380:                Default: no
                    381:
1.172     hubertf   382: MKSHARE                If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no
                    383:                MKMAN=no MKNLS=no".
                    384:                I.e, don't build catman pages, documentation, Info
                    385:                documentation, man pages, NLS files, ...
                    386:                Default: yes
                    387:
                    388: MKSKEY         If "no", disables building of S/key authentication
                    389:                infrastructure (libraries and support programs).
                    390:                Default: yes
                    391:
1.319     adam      392: MKSLJIT                If "no", disables building of sljit (stack-less platform
1.309     alnsn     393:                independent JIT compiler) private library and tests.
                    394:                Default: yes on amd64, i386 and sparc, no elsewhere.
                    395:
1.172     hubertf   396: MKSOFTFLOAT    If not "no", build with options to enable the compiler to
                    397:                generate output containing library calls for floating
                    398:                point and possibly soft-float library support.
                    399:                Default: no
                    400:
                    401: MKSTATICLIB    If "no", don't build or install the normal static (*.a)
                    402:                libraries.
                    403:                Default: yes
                    404:
1.363     christos  405: MKSTATICPIE    Compile in support for static pie binaries. These binaries
                    406:                use a special rcrt0.o/mcrt0.o that do the necessary relocations
                    407:                Default: yes on platforms that support it.
                    408:
1.359     ozaki-r   409: MKSTRIPSYM     If "yes", strip all local symbols from shared libraries;
                    410:                the affect is equivalent to -x option of ld(1). If "no",
                    411:                strip only temporary local symbols; the affect is equivalent
                    412:                to -X option of ld(1). Keeping non-temporary local symbols
                    413:                such as static function names is useful on using DTrace for
                    414:                userland libraries and getting a backtrace from a rump kernel
                    415:                loading shared libraries.
                    416:                Default: yes
                    417:
1.351     christos  418: MKTOOLSDEBUG   If "yes" build the tools with debugging symbols.
                    419:                Default: no
                    420:
1.306     christos  421: MKTPM          If "no" then don't build the Trusted Platform Module
                    422:                infrastructure.
                    423:                Default: no
                    424:
1.355     christos  425: MKUNBOUND      If not "no", build and install the "unbound" DNS resolver.
1.356     christos  426:                Default: yes
1.355     christos  427:
1.172     hubertf   428: MKUNPRIVED     If not "no", don't set the owner/group/mode when installing
                    429:                files or directories, and keep a metadata log of what
                    430:                the owner/group/mode should be.  This allows a
                    431:                non-root "make install".
                    432:                Default: no
                    433:
                    434: MKUPDATE       If not "no", 'make install' only installs targets that are
                    435:                more recently modified in the source directories that their
                    436:                installed counterparts.
                    437:                Default: no
                    438:
1.346     mrg       439: MKX11          If not "no", 'make build' also descends into
                    440:                src/external/mit/xorg to cross-build X11 and automatically
                    441:                enables creation of X sets.
1.216     mrg       442:                Default: no
                    443:
1.346     mrg       444: MKX11FONTS     If not "no", do not build or install the X fonts.  The xfont
                    445:                set is still created but will be empty.
1.251     mrg       446:                Default: yes
                    447:
1.346     mrg       448: MKX11MOTIF:    If "yes", build the native X11 libGLw with Motif stubs.  If
                    449:                Motif is not installed in the default location /usr/pkg, the
                    450:                location can be specified using the X11MOTIFPATH variable.
1.318     mbalmer   451:                Default: no
                    452:
1.172     hubertf   453: MKYP           If "no", disables building of YP (NIS)
                    454:                infrastructure (libraries and support programs).
                    455:                Default: yes
                    456:
1.301     abs       457: MKZFS          If "no", do not build and install utilities and libraries
                    458:                used to manage ZFS file system. Do not build zfs and solaris
1.340     pooka     459:                compatibility kernel modules.  Note: ZFS requires 64bit
                    460:                atomic operations.
                    461:                Default: yes on amd64, no elsewhere.
1.254     haad      462:
1.298     christos  463: MKRUMP         If "no", do not build and install rump related headers,
                    464:                libraries, and programs.
                    465:                Default: yes
                    466:
1.172     hubertf   467: USE_HESIOD     If "no", disables building Hesiod support into
                    468:                various system utilities/libraries that support it.
                    469:                If ${MKHESIOD} is "no", USE_HESIOD will also be
                    470:                forced to "no".
                    471:
                    472: USE_INET6      If "no", disables building INET6 (IPv6) support into
                    473:                various system utilities/libraries that support it.
                    474:                If ${MKINET6} is "no", USE_INET6 will also be
                    475:                forced to "no".
                    476:
1.197     ad        477: USE_JEMALLOC   If "no", disables building the "jemalloc" allocator
                    478:                designed for improved performance with threaded
                    479:                applications.  The "phkmalloc" allocator as used up
                    480:                before NetBSD-5.0 will be substituted.
                    481:
1.175     christos  482: USE_KERBEROS   If "no", disables building Kerberos v5
1.172     hubertf   483:                support into various system utilities/libraries that
                    484:                support it.  If ${MKKERBEROS} is "no", USE_KERBEROS
                    485:                will also be forced to "no".
                    486:
1.208     lukem     487: USE_LDAP       If "no", disables building LDAP support into various
                    488:                system utilities/libraries that support it.
                    489:                If ${MKLDAP} is "no", USE_LDAP will also be forced to "no".
                    490:
1.172     hubertf   491: USE_PAM                If "no", disables building PAM authentication support
                    492:                into various system utilities/libraries that support it.
                    493:                If ${MKPAM} is "no", USE_PAM will also be forced to "no".
                    494:
                    495: USE_SKEY       If "no", disables building S/key authentication
                    496:                support into various system utilities/libraries that
                    497:                support it.  If ${MKSKEY} is "no", USE_SKEY will
                    498:                also be forced to "no".
1.204     lukem     499:                Default: no
1.172     hubertf   500:
1.201     lukem     501: USE_SSP                If "no", disables GCC stack protection code, which
1.257     tron      502:                detects stack overflows and aborts the program. The
1.268     njoly     503:                stack protection code imposes a performance penalty
1.259     pgoyette  504:                of about 5%.
1.258     tron      505:                Default: "no", unless "USE_FORT" is set to "yes"
1.187     christos  506:
1.353     christos  507: NOSSP          Don't compile with stack protector during build.
                    508:                It is set internally for standalone programs.
                    509:
1.246     christos  510: USE_FORT       If "yes" turns on substitute wrappers for commonly used
                    511:                functions that do not do bounds checking regularly, but
                    512:                they could in some cases by using the gcc
1.301     abs       513:                __builtin_object_size() function to determine the buffer
1.246     christos  514:                size where it is known and detect buffer overflows.
                    515:                These substitute functions are in /usr/include/ssp.
1.257     tron      516:                Default: depends on the part of the source tree
1.246     christos  517:
1.353     christos  518: NOFORT         Don't compile with substitute wrappers during build.
                    519:                It is set internally for standalone programs.
                    520:
1.172     hubertf   521: USE_YP         If "no", disables building YP (NIS) support into
                    522:                various system utilities/libraries that support it.
                    523:                If ${MKYP} is "no", USE_YP will also be forced to "no".
                    524:
1.284     matt      525: USE_PIGZGZIP   If "no", use the host "gzip" program to compress things.
1.327     apb       526:                Otherwise, build tools/pigz, set TOOL_GZIP=${TOOL_PIGZ},
                    527:                and use nbpigz to compress things.
1.274     mrg       528:                Default: "no".
                    529:
1.172     hubertf   530: COPTS.lib<lib>
1.177     mrg       531: OBJCOPTS.lib<lib>
1.172     hubertf   532: LDADD.lib<lib>
                    533: CPPFLAGS.lib<lib>
                    534: CXXFLAGS.lib<lib>
                    535: COPTS.<prog>
1.177     mrg       536: OBJCCOPTS.<prog>
1.172     hubertf   537: LDADD.<prog>
                    538: CPPFLAGS.<prog>
                    539: CXXFLAGS.<prog>        These provide a way to specify additions to the associated
                    540:                variables in a way that applies only to a particular library
                    541:                or program.  <lib> corresponds to the LIB variable set in
                    542:                the library's makefile.  <prog> corresponds to either PROG
                    543:                or PROG_CXX (if set).  For example, if COPTS.libcrypto is
                    544:                set to "-g", "-g" will be added to COPTS only when compiling
                    545:                the crypto library.
1.118     lukem     546:
1.281     joerg     547: The active compiler is selected using the following variables:
                    548: AVAILABLE_COMPILER
                    549:                List of available compiler suites.  Processed in order
                    550:                for selecting the active compiler for each frontend.
                    551: HAVE_PCC       If defined, PCC is present and enabled.
                    552: HAVE_LLVM      If defined, LLVM/Clang is present and enabled.
                    553: UNSUPPORTED_COMPILER.xxx
                    554:                If defined, the support for compiler "xxx" is disabled.
                    555:
                    556: For the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist:
                    557: ACTIVE_CC      Active compile suite for the CC frontend.
                    558: SUPPORTED_CC   Compile suite with support for the CC frontend.
                    559: TOOL_CC.xxx    Path to the CC frontend for compiler "xxx"
                    560:
1.118     lukem     561: =-=-=-=-=   sys.mk   =-=-=-=-=
1.1       cgd       562:
                    563: The include file <sys.mk> has the default rules for all makes, in the BSD
                    564: environment or otherwise.  You probably don't want to touch this file.
                    565:
1.118     lukem     566: =-=-=-=-=   bsd.own.mk   =-=-=-=-=
1.1       cgd       567:
1.17      thorpej   568: The include file <bsd.own.mk> contains source tree configuration parameters,
                    569: such as the owners, groups, etc. for both manual pages and binaries, and
                    570: a few global "feature configuration" parameters.
1.1       cgd       571:
                    572: It has no targets.
                    573:
1.134     lukem     574: To get system-specific configuration parameters, <bsd.own.mk> will try to
1.29      cjs       575: include the file specified by the "MAKECONF" variable.  If MAKECONF is not
                    576: set, or no such file exists, the system make configuration file, /etc/mk.conf
                    577: is included.  These files may define any of the variables described below.
1.17      thorpej   578:
1.134     lukem     579: <bsd.own.mk> sets the following variables, if they are not already defined
1.17      thorpej   580: (defaults are in brackets):
1.15      cgd       581:
1.98      lukem     582: NETBSDSRCDIR   Top of the NetBSD source tree.
                    583:                If _SRC_TOP_ != "", that will be used as the default,
                    584:                otherwise BSDSRCDIR will be used as the default.
                    585:                Various makefiles within the NetBSD source tree will
                    586:                use this to reference the top level of the source tree.
                    587:
1.95      lukem     588: _SRC_TOP_      Top of the system source tree, as determined by <bsd.own.mk>
1.98      lukem     589:                based on the presence of tools/ and build.sh.  This variable
                    590:                is "internal" to <bsd.own.mk>, although its value is only
                    591:                determined once and then propagated to all sub-makes.
1.95      lukem     592:
1.305     apb       593: _NETBSD_VERSION_DEPENDS
                    594:                A list of files which contain information about
                    595:                the version of the NetBSD being built.  This is
                    596:                defined only if the current directory appears
                    597:                to be inside a NetBSD source tree.  The list of
                    598:                files includes ${NETBSDSRCDIR}/sys/sys/param.h
                    599:                (which contains the kernel version number),
                    600:                ${NETBSDSRCDIR}/sys/conf/newvers.sh and
                    601:                ${NETBSDSRCDIR}/sys/conf/osrelease.sh (which
                    602:                interpret the information in sys/sys/param.h), and
                    603:                ${_SRC_TOP_OBJ_}/params (which is an optional file,
                    604:                created by "make build" in ${_SRC_TOP_}/Makefile,
                    605:                containing all the variables that may influence the
                    606:                build).
                    607:
                    608:                Targets that depend on the NetBSD version, or on
                    609:                variables defined at build time, can declare a
                    610:                dependency on ${_NETBSD_VERSION_DEPENDS}, like this:
                    611:
                    612:                        version.c: ${_NETBSD_VERSION_DEPENDS}
                    613:                                commands to create version.c
                    614:
1.15      cgd       615: BSDSRCDIR      The real path to the system sources, so that 'make obj'
1.116     lukem     616:                will work correctly.  [/usr/src]
1.15      cgd       617:
                    618: BSDOBJDIR      The real path to the system 'obj' tree, so that 'make obj'
1.116     lukem     619:                will work correctly.  [/usr/obj]
1.15      cgd       620:
1.116     lukem     621: BINGRP         Binary group.  [wheel]
1.15      cgd       622:
1.116     lukem     623: BINOWN         Binary owner.  [root]
1.15      cgd       624:
1.116     lukem     625: BINMODE                Binary mode.  [555]
1.15      cgd       626:
1.116     lukem     627: NONBINMODE     Mode for non-executable files.  [444]
1.15      cgd       628:
1.116     lukem     629: MANDIR         Base path for manual installation.  [/usr/share/man/cat]
1.15      cgd       630:
1.116     lukem     631: MANGRP         Manual group.  [wheel]
1.15      cgd       632:
1.116     lukem     633: MANOWN         Manual owner.  [root]
1.15      cgd       634:
1.116     lukem     635: MANMODE                Manual mode.  [${NONBINMODE}]
1.15      cgd       636:
1.222     lukem     637: MANINSTALL     Manual installation type.  Space separated list:
                    638:                        catinstall, htmlinstall, maninstall
1.293     joerg     639:                Default value derived from MKCATPAGES and MKHTML.
1.76      fair      640:
                    641: LDSTATIC       Control program linking; if set blank, link everything
1.129     lukem     642:                dynamically.  If set to "-static", link everything statically.
1.76      fair      643:                If not set, programs link according to their makefile.
1.21      christos  644:
1.116     lukem     645: LIBDIR         Base path for library installation.  [/usr/lib]
1.15      cgd       646:
1.116     lukem     647: LINTLIBDIR     Base path for lint(1) library installation.  [/usr/libdata/lint]
1.15      cgd       648:
1.116     lukem     649: LIBGRP         Library group.  [${BINGRP}]
1.15      cgd       650:
1.116     lukem     651: LIBOWN         Library owner.  [${BINOWN}]
1.15      cgd       652:
1.116     lukem     653: LIBMODE                Library mode.  [${NONBINMODE}]
1.15      cgd       654:
                    655: DOCDIR         Base path for system documentation (e.g. PSD, USD, etc.)
1.116     lukem     656:                installation.  [/usr/share/doc]
1.62      simonb    657:
1.116     lukem     658: DOCGRP         Documentation group.  [wheel]
1.15      cgd       659:
1.116     lukem     660: DOCOWN         Documentation owner.  [root]
1.15      cgd       661:
1.116     lukem     662: DOCMODE                Documentation mode.  [${NONBINMODE}]
1.15      cgd       663:
1.335     apb       664: GZIP_N_FLAG    Flags to pass to TOOL_GZIP to prevent it from inserting
                    665:                file names or timestamps in the compressed output.
                    666:                [-n, or -nT when TOOL_GZIP is really TOOL_PIGZ]
                    667:
1.84      kleink    668: NLSDIR         Base path for Native Language Support files installation.
1.15      cgd       669:                [/usr/share/nls]
1.1       cgd       670:
1.116     lukem     671: NLSGRP         Native Language Support files group.  [wheel]
1.1       cgd       672:
1.116     lukem     673: NLSOWN         Native Language Support files owner.  [root]
1.1       cgd       674:
1.116     lukem     675: NLSMODE                Native Language Support files mode.  [${NONBINMODE}]
1.1       cgd       676:
1.255     apb       677: X11SRCDIR      The path to the xsrc tree.  [${NETBSDSRCDIR}/../xsrc,
                    678:                if that exists; otherwise /usr/xsrc]
1.144     lukem     679:
1.221     mrg       680: X11SRCDIR.local        The path to the local X11 src tree.  [${X11SRCDIR}/local]
1.144     lukem     681:
1.221     mrg       682: X11SRCDIR.lib<package>
                    683: X11SRCDIR.<package>
                    684:                The path to the xorg src tree for the specificed package>.
                    685:                [${X11SRCDIR}/external/mit/xorg/<package>/dist]
                    686:
                    687: X11ROOTDIR     Root directory of the X11 installation.  [/usr/X11R6 or
                    688:                [/usr/X11R7]
1.144     lukem     689:
                    690: X11BINDIR      X11 bin directory.  [${X11ROOTDIR}/bin]
                    691:
                    692: X11FONTDIR     X11 font directory.  [${X11ROOTDIR}/lib/X11/fonts]
                    693:
                    694: X11INCDIR      X11 include directory.  [${X11ROOTDIR}/include]
                    695:
                    696: X11LIBDIR      X11 lib/x11 (config) directory.  [${X11ROOTDIR}/lib/X11]
                    697:
                    698: X11MANDIR      X11 manual directory.  [${X11ROOTDIR}/man]
                    699:
                    700: X11USRLIBDIR   X11 library directory.  [${X11ROOTDIR}/lib]
                    701:
1.32      mikel     702: STRIPFLAG      The flag passed to the install program to cause the binary
1.1       cgd       703:                to be stripped.  This is to be used when building your
                    704:                own install script so that the entire system can be made
1.146     lukem     705:                stripped/not-stripped using a single knob.  []
1.1       cgd       706:
1.2       cgd       707: COPY           The flag passed to the install program to cause the binary
                    708:                to be copied rather than moved.  This is to be used when
                    709:                building our own install script so that the entire system
                    710:                can either be installed with copies, or with moves using
1.116     lukem     711:                a single knob.  [-c]
1.15      cgd       712:
1.310     apb       713: MAKEDIRTARGETENV
                    714:                Environment variables passed to the child make process
                    715:                invoked by MAKEDIRTARGET.
                    716:
1.150     lukem     717: MAKEDIRTARGET dir target [params]
                    718:                Runs "cd $${dir} && ${MAKE} [params] $${target}",
                    719:                displaying a "pretty" message whilst doing so.
                    720:
1.152     cl        721: RELEASEMACHINEDIR
                    722:                Subdirectory used below RELEASEDIR when building
                    723:                a release.  [${MACHINE}]
                    724:
                    725: RELEASEMACHINE Subdirectory or path component used for the following
                    726:                paths:
                    727:                        distrib/${RELEASEMACHINE}
                    728:                        distrib/notes/${RELEASEMACHINE}
                    729:                        etc/etc.${RELEASEMACHINE}
                    730:                Used when building a release.  [${MACHINE}]
1.150     lukem     731:
1.134     lukem     732: Additionally, the following variables may be set by <bsd.own.mk> or in a
1.214     wiz       733: make configuration file to modify the behavior of the system build
1.17      thorpej   734: process (default values are in brackets along with comments, if set by
1.134     lukem     735: <bsd.own.mk>):
1.33      jonathan  736:
1.172     hubertf   737: USETOOLS       Indicates whether the tools specified by ${TOOLDIR} should
                    738:                be used as part of a build in progress.
                    739:                Supported values:
                    740:
                    741:                yes     Use the tools from TOOLDIR.
                    742:                        Must be set to this if cross-compiling.
                    743:
                    744:                no      Do not use the tools from TOOLDIR, but refuse to
                    745:                        build native compilation tool components that are
                    746:                        version-specific for that tool.
                    747:
                    748:                never   Do not use the tools from TOOLDIR, even when
                    749:                        building native tool components.  This is similar to
                    750:                        the traditional NetBSD build method, but does not
                    751:                        verify that the compilation tools in use are
                    752:                        up-to-date enough in order to build the tree
                    753:                        successfully.  This may cause build or runtime
                    754:                        problems when building the whole NetBSD source tree.
                    755:
                    756:                Default: "yes" if building all or part of a whole NetBSD
                    757:                source tree (detected automatically); "no" otherwise
                    758:                (to preserve traditional semantics of the <bsd.*.mk>
                    759:                make(1) include files).
1.142     lukem     760:
1.116     lukem     761: OBJECT_FMT     Object file format.  [set to "ELF" on architectures that
1.199     simonb    762:                use ELF -- currently all architectures].
1.33      jonathan  763:
1.103     thorpej   764: TOOLCHAIN_MISSING
1.142     lukem     765:                If not "no", this indicates that the platform being built
1.103     thorpej   766:                does not have a working in-tree toolchain.  If the
1.142     lukem     767:                ${MACHINE_ARCH} in question falls into this category,
1.301     abs       768:                TOOLCHAIN_MISSING is conditionally assigned the value "yes".
1.103     thorpej   769:                Otherwise, the variable is unconditionally assigned the
                    770:                value "no".
1.252     skrll     771:                If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are
1.142     lukem     772:                unconditionally assigned the value "no".
1.103     thorpej   773:
                    774: EXTERNAL_TOOLCHAIN
                    775:                This variable is not directly set by <bsd.own.mk>, but
                    776:                including <bsd.own.mk> is the canonical way to gain
                    777:                access to this variable.  The variable should be defined
                    778:                either in the user's environment or in the user's mk.conf
                    779:                file.  If defined, this variable indicates the root of
                    780:                an external toolchain which will be used to build the
1.142     lukem     781:                tree.  For example, if a platform is a ${TOOLCHAIN_MISSING}
1.103     thorpej   782:                platform, EXTERNAL_TOOLCHAIN can be used to re-enable the
                    783:                cross-compile framework.
                    784:
1.142     lukem     785:                If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally
                    786:                assigned the value "no", since the external version of the
                    787:                compiler may not be able to build the library components of
                    788:                the in-tree compiler.
1.103     thorpej   789:
                    790:                NOTE: This variable is not yet used in as many places as
                    791:                it should be.  Expect the exact semantics of this variable
                    792:                to change in the short term as parts of the cross-compile
                    793:                framework continue to be cleaned up.
1.1       cgd       794:
1.236     apb       795: The following variables are defined to commands to perform the
                    796: appropriate operation, with the default in [brackets].  Note that
                    797: the defaults change if USETOOLS == "yes":
                    798:
                    799: TOOL_AMIGAAOUT2BB      aout to Amiga bootblock converter.  [amiga-aout2bb]
                    800:
                    801: TOOL_AMIGAELF2BB       ELF to Amiga bootblock converter.  [amiga-elf2bb]
                    802:
                    803: TOOL_AMIGATXLT         Amige assembly language format translator.  [amiga-txlt]
                    804:
                    805: TOOL_ASN1_COMPILE      ASN1 compiler.  [asn1_compile]
                    806:
                    807: TOOL_AWK               Pattern-directed scanning/processing language.  [awk]
                    808:
                    809: TOOL_CAP_MKDB          Create capability database.  [cap_mkdb]
                    810:
                    811: TOOL_CAT               Concatenate and print files.  [cat]
                    812:
                    813: TOOL_CKSUM             Display file checksums.  [cksum]
                    814:
                    815: TOOL_COMPILE_ET                Error table compiler.  [compile_et]
                    816:
                    817: TOOL_CONFIG            Build kernel compilation directories.  [config]
                    818:
                    819: TOOL_CRUNCHGEN         Generate crunched binary build environment.  [crunchgen]
                    820:
                    821: TOOL_CTAGS             Create a tags file.  [ctags]
                    822:
                    823: TOOL_DB                        Manipulate db(3) databases.  [db]
                    824:
                    825: TOOL_DISKLABEL         Read and write disk pack label.  [disklabel]
                    826:
                    827: TOOL_EQN               Format equations for groff.  [eqn]
                    828:
                    829: TOOL_FDISK             MS-DOS partition maintenance program.  [fdisk]
                    830:
                    831: TOOL_FGEN              IEEE 1275 Open Firmware FCode Tokenizer.  [fgen]
                    832:
                    833: TOOL_GENASSYM          Generate constants for assembly files.  [genassym]
                    834:
                    835: TOOL_GENCAT            Generate NLS message catalogs.  [gencat]
                    836:
                    837: TOOL_GMAKE             GNU make utility.  [gmake]
                    838:
1.247     sketch    839: TOOL_GREP              Print lines matching a pattern.  [grep]
                    840:
1.236     apb       841: TOOL_GROFF             Front end for groff document formatting system.  [groff]
                    842:
1.327     apb       843: TOOL_GZIP              Compression/decompression tool.  [gzip]
                    844:
1.335     apb       845: TOOL_GZIP_N            Same as TOOL_GZIP, plus a command line option to
                    846:                        prevent it from inserting file names or timestamps
                    847:                        into the compressed output.
                    848:                        [${TOOL_GZIP} ${GZIP_N_FLAG}]
                    849:
1.236     apb       850: TOOL_HEXDUMP           Ascii, decimal, hexadecimal, octal dump.  [hexdump]
                    851:
                    852: TOOL_HP300MKBOOT       Make bootable image for hp300.  [hp300-mkboot]
                    853:
1.328     skrll     854: TOOL_HPPAMKBOOT                Make bootable image for hppa.  [hppa-mkboot]
1.236     apb       855:
                    856: TOOL_INDXBIB           Make bibliographic database's inverted index.  [indxbib]
                    857:
                    858: TOOL_INSTALLBOOT       Install disk bootstrap software.  [installboot]
                    859:
                    860: TOOL_INSTALL_INFO      Update info/dir entries.  [install-info]
                    861:
                    862: TOOL_JOIN              Relational database operator.  [join]
                    863:
                    864: TOOL_M4                        M4 macro language processor.  [m4]
                    865:
                    866: TOOL_MACPPCFIXCOFF     Fix up xcoff headers for macppc.  [macppc-fixcoff]
                    867:
                    868: TOOL_MAKEFS            Create file system image from directory tree.  [makefs]
                    869:
                    870: TOOL_MAKEINFO          Translate Texinfo documents.  [makeinfo]
                    871:
                    872: TOOL_MAKEWHATIS                Create a whatis.db database.  [makewhatis]
                    873:
                    874: TOOL_MDSETIMAGE                Set kernel RAM disk image.  [mdsetimage]
                    875:
                    876: TOOL_MENUC             Menu compiler.  [menuc]
                    877:
                    878: TOOL_MIPSELF2ECOFF     Convert ELF-format executable to ECOFF for mips.
                    879:                        [mips-elf2ecoff]
                    880:
                    881: TOOL_MKCSMAPPER                Make charset mapping table.  [mkcsmapper]
                    882:
                    883: TOOL_MKESDB            Make encoding scheme database.  [mkesdb]
                    884:
                    885: TOOL_MKLOCALE          Make LC_CTYPE locale files.  [mklocale]
                    886:
                    887: TOOL_MKMAGIC           Create database for file(1).  [file]
                    888:
1.311     jmcneill  889: TOOL_MKNOD             Make device special file.  [mknod]
                    890:
1.236     apb       891: TOOL_MKTEMP            Make (unique) temporary file name.  [mktemp]
                    892:
                    893: TOOL_MSGC              Simple message list compiler.  [msgc]
                    894:
                    895: TOOL_MTREE             Map a directory hierarchy.  [mtree]
                    896:
1.332     phx       897: TOOL_NCDCS             Turn ELF kernel into a NCD firmware image. [ncdcs]
                    898:
1.236     apb       899: TOOL_PAX               Manipulate file archives and copy directories.  [pax]
                    900:
                    901: TOOL_PIC               Compile pictures for groff.  [pic]
                    902:
1.273     mrg       903: TOOL_PIGZ              Parallel compressor.  [pigz]
                    904:
1.236     apb       905: TOOL_POWERPCMKBOOTIMAGE        Make bootable image for powerpc.  [powerpc-mkbootimage]
                    906:
                    907: TOOL_PWD_MKDB          Generate the password databases.  [pwd_mkdb]
                    908:
                    909: TOOL_REFER             Preprocess bibliographic references for groff.  [refer]
                    910:
                    911: TOOL_ROFF_ASCII                Generate ASCII groff output.  [nroff]
                    912:
                    913: TOOL_ROFF_DVI          Generate DVI groff output.  [${TOOL_GROFF} -Tdvi]
                    914:
                    915: TOOL_ROFF_HTML         Generate HTML groff output.
                    916:                        [${TOOL_GROFF} -Tlatin1 -mdoc2html]
                    917:
                    918: TOOL_ROFF_PS           Generate PS groff output.  [${TOOL_GROFF} -Tps]
                    919:
                    920: TOOL_ROFF_RAW          Generate "raw" groff output.  [${TOOL_GROFF} -Z]
                    921:
                    922: TOOL_RPCGEN            Remote Procedure Call (RPC) protocol compiler.  [rpcgen]
                    923:
                    924: TOOL_SED               Stream editor.  [sed]
                    925:
                    926: TOOL_SOELIM            Eliminate .so's from groff input.  [soelim]
                    927:
                    928: TOOL_SPARKCRC          Generate a crc suitable for use in a sparkive file.
                    929:                        [sparkcrc]
                    930:
                    931: TOOL_STAT              Display file status.  [stat]
                    932:
                    933: TOOL_STRFILE           Create a random access file for storing strings.
                    934:                        [strfile]
                    935:
                    936: TOOL_SUNLABEL          Read or modify a SunOS disk label.  [sunlabel]
                    937:
                    938: TOOL_TBL               Format tables for groff.  [tbl]
                    939:
                    940: TOOL_UUDECODE          Uudecode a binary file.  [uudecode]
                    941:
                    942: TOOL_VGRIND            Grind nice listings of programs.  [vgrind -f]
                    943:
                    944: TOOL_ZIC               Time zone compiler.  [zic]
                    945:
1.323     matt      946: For each possible value of MACHINE_CPU, MACHINES.${MACHINE_CPU} contain a
                    947: list of what ports can be built for it.  This keeps those definitions in
                    948: centralized place.
                    949:
1.134     lukem     950: <bsd.own.mk> is generally useful when building your own Makefiles so that
1.1       cgd       951: they use the same default owners etc. as the rest of the tree.
1.131     lukem     952:
                    953:
1.286     apb       954: =-=-=-=-=   bsd.clean.mk   =-=-=-=-=
                    955:
                    956: The include file <bsd.clean.mk> defines the clean and cleandir
                    957: targets.  It uses the following variables:
                    958:
                    959: CLEANFILES     Files to remove for both the clean and cleandir targets.
                    960:
                    961: CLEANDIRFILES  Files to remove for the cleandir target, but not for
                    962:                the clean target.
                    963:
1.287     apb       964: MKCLEANSRC     Controls whether or not the clean and cleandir targets
                    965:                will delete files from both the object directory,
                    966:                ${.OBJDIR}, and the source directory, ${.CURDIR}.
                    967:
                    968:                If MKCLEANSRC is set to "no", then the file names in
                    969:                CLEANFILES or CLEANDIRFILES are interpreted relative
                    970:                to the object directory, ${.OBJDIR}.  This is the
                    971:                traditional behaviour.
                    972:
                    973:                If MKCLEANSRC is set to "yes", then the file deletion
                    974:                is performed relative to both the object directory,
                    975:                ${.OBJDIR}, and the source directory, ${.CURDIR}.  (This
                    976:                has no effect if ${.OBJDIR} is the same as ${.CURDIR}.)
                    977:                Deleting files from ${.CURDIR} is intended to remove
                    978:                stray output files that had been left in the source
                    979:                directory by an earlier build that did not use object
                    980:                directories.
                    981:
                    982:                The default is MKCLEANSRC=yes.  If you always build with
                    983:                separate object directories, and you are sure that there
                    984:                are no stray files in the source directories, then you
                    985:                may set MKCLEANSRC=no to save some time.
                    986:
                    987: MKCLEANVERIFY  Controls whether or not the clean and cleandir targets
                    988:                will verify that files have been deleted.
                    989:
                    990:                If MKCLEANVERIFY is set to "no", then the files will
                    991:                be deleted using a "rm -f" command, and its success or
                    992:                failure will be ignored.
                    993:
                    994:                If MKCLEANVERIFY is set to "yes", then the success of
                    995:                the "rm -f" command will be verified using an "ls"
                    996:                command.
                    997:
                    998:                The default is MKCLEANVERIFY=yes.  If you are sure that
                    999:                there will be no problems caused by file permissions,
                   1000:                read-only file systems, or the like, then you may set
                   1001:                MKCLEANVERIFY=no to save some time.
1.286     apb      1002:
                   1003: To use the clean and cleandir targets defined in <bsd.clean.mk>, other
                   1004: Makefiles or bsd.*.mk files should append file names to the CLEANFILES
                   1005: or CLEANDIRFILES variables.  For example:
                   1006:
                   1007:            CLEANFILES+= a.out
                   1008:            CLEANDIRFILES+= .depend
                   1009:
                   1010:            .include <bsd.clean.mk>
                   1011:
1.308     apb      1012: The files listed in CLEANFILES and CLEANDIRFILES must not be
                   1013: directories, because the potential risk from running "rm -rf" commands
                   1014: in bsd.clean.mk is considered too great.  If you want to recursively
                   1015: delete a directory as part of "make clean" or "make cleandir" then you
                   1016: need to provide your own target.
1.286     apb      1017:
1.131     lukem    1018: =-=-=-=-=   bsd.dep.mk   =-=-=-=-=
                   1019:
                   1020: The include file <bsd.dep.mk> contains the default targets for building
1.133     lukem    1021: .depend files.  It creates .d files from entries in SRCS and DPSRCS
                   1022: that are C, C++, or Objective C source files, and builds .depend from the
                   1023: .d files.  All other files in SRCS and all of DPSRCS will be used as
                   1024: dependencies for the .d files.  In order for this to function correctly,
1.132     lukem    1025: it should be .included after all other .mk files and directives that may
                   1026: modify SRCS or DPSRCS.  It uses the following variables:
                   1027:
                   1028: SRCS           List of source files to build the program.
                   1029:
                   1030: DPSRCS         List of source files which are needed for generating
                   1031:                dependencies, but are not needed in ${SRCS}.
1.1       cgd      1032:
                   1033:
1.118     lukem    1034: =-=-=-=-=   bsd.files.mk   =-=-=-=-=
1.106     thorpej  1035:
1.118     lukem    1036: The include file <bsd.files.mk> handles the FILES variables and is included
1.134     lukem    1037: from <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables:
1.124     lukem    1038:
                   1039: FILES          The list of files to install.
                   1040:
1.153     lukem    1041: CONFIGFILES    Similar semantics to FILES, except that the files
                   1042:                are installed by the `configinstall' target,
                   1043:                not the `install' target.
                   1044:                The FILES* variables documented below also apply.
                   1045:
1.124     lukem    1046: FILESOWN       File owner.  [${BINOWN}]
                   1047:
                   1048: FILESGRP       File group.  [${BINGRP}]
                   1049:
1.203     dholland 1050: FILESMODE      File mode.  [${NONBINMODE}]
1.124     lukem    1051:
                   1052: FILESDIR       The location to install the files.
                   1053:
                   1054: FILESNAME      Optional name to install each file as.
                   1055:
1.153     lukem    1056: FILESOWN_<fn>  File owner of the specific file <fn>.
                   1057:
                   1058: FILESGRP_<fn>  File group of the specific file <fn>.
                   1059:
                   1060: FILESMODE_<fn> File mode of the specific file <fn>.
                   1061:
1.202     uwe      1062: FILESDIR_<fn>  The location to install the specific file <fn>.
1.153     lukem    1063:
                   1064: FILESNAME_<fn> Optional name to install <fn> as.
1.124     lukem    1065:
1.285     apb      1066: FILESBUILD     If this variable is defined, then its value will be
                   1067:                used as the default for all FILESBUILD_<fn> variables.
                   1068:                Otherwise, the default will be "no".
                   1069:
1.243     cube     1070: FILESBUILD_<fn>        A value different from "no" will add the file to the list of
                   1071:                targets to be built by `realall'.  Users of that variable
                   1072:                should provide a target to build the file.
                   1073:
1.135     lukem    1074:
1.139     lukem    1075: BUILDSYMLINKS  List of two word items:
1.135     lukem    1076:                        lnsrc lntgt
                   1077:                For each lnsrc item, create a symlink named lntgt.
                   1078:                The lntgt symlinks are removed by the cleandir target.
1.106     thorpej  1079:
1.148     jmc      1080: UUDECODE_FILES List of files which are stored as <file>.uue in the source
                   1081:                tree. Each one will be decoded with ${TOOL_UUDECODE}.
1.301     abs      1082:                The source files have a `.uue' suffix, the generated files do
1.148     jmc      1083:                not.
1.149     jmc      1084:
1.202     uwe      1085: UUDECODE_FILES_RENAME_<fn>
                   1086:                Rename the output from the decode to the provided name.
1.148     jmc      1087:
                   1088:                *NOTE: These files are simply decoded, with no install or other
                   1089:                       rule applying implicitly except being added to the clean
                   1090:                       target.
1.106     thorpej  1091:
1.118     lukem    1092: =-=-=-=-=   bsd.gcc.mk   =-=-=-=-=
1.113     thorpej  1093:
                   1094: The include file <bsd.gcc.mk> computes various parameters related to GCC
                   1095: support libraries.  It defines no targets.  <bsd.own.mk> MUST be included
1.134     lukem    1096: before <bsd.gcc.mk>.
1.113     thorpej  1097:
1.134     lukem    1098: The primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each
1.113     thorpej  1099: of which need to know where to find certain GCC support libraries.
                   1100:
1.134     lukem    1101: The behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable,
1.113     thorpej  1102: which is generally set by the user.  If EXTERNAL_TOOLCHAIN it set, then
                   1103: the compiler is asked where to find the support libraries, otherwise the
                   1104: support libraries are found in ${DESTDIR}/usr/lib.
                   1105:
1.134     lukem    1106: <bsd.gcc.mk> sets the following variables:
1.113     thorpej  1107:
1.118     lukem    1108: _GCC_CRTBEGIN  The full path name to crtbegin.o.
                   1109:
                   1110: _GCC_CRTBEGINS The full path name to crtbeginS.o.
                   1111:
                   1112: _GCC_CRTEND    The full path name to crtend.o.
                   1113:
                   1114: _GCC_CRTENDS   The full path name to crtendS.o.
                   1115:
                   1116: _GCC_LIBGCCDIR The directory where libgcc.a is located.
                   1117:
                   1118:
                   1119: =-=-=-=-=   bsd.inc.mk   =-=-=-=-=
                   1120:
1.134     lukem    1121: The include file <bsd.inc.mk> defines the includes target and uses the
1.118     lukem    1122: variables:
                   1123:
1.124     lukem    1124: INCS           The list of include files.
1.118     lukem    1125:
                   1126: INCSDIR                The location to install the include files.
                   1127:
                   1128: INCSNAME       Target name of the include file, if only one; same as
                   1129:                FILESNAME, but for include files.
                   1130:
1.134     lukem    1131: INCSYMLINKS    Similar to SYMLINKS in <bsd.links.mk>, except that these
                   1132:                are installed in the 'includes' target and not the
                   1133:                (much later) 'install' target.
                   1134:
1.118     lukem    1135: INCSNAME_<file>        The name file <file> should be installed as, if not <file>,
                   1136:                same as FILESNAME_<file>, but for include files.
                   1137:
                   1138:
                   1139: =-=-=-=-=   bsd.info.mk   =-=-=-=-=
                   1140:
                   1141: The include file <bsd.info.mk> is used to generate and install GNU Info
                   1142: documentation from respective Texinfo source files.  It defines three
                   1143: implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
                   1144: following variables:
                   1145:
                   1146: TEXINFO                List of Texinfo source files.  Info documentation will
                   1147:                consist of single files with the extension replaced by
                   1148:                .info.
                   1149:
                   1150: INFOFLAGS      Flags to pass to makeinfo.  []
                   1151:
                   1152:
                   1153: =-=-=-=-=   bsd.kernobj.mk   =-=-=-=-=
                   1154:
                   1155: The include file <bsd.kernobj.mk> defines variables related to the
                   1156: location of kernel sources and object directories.
                   1157:
                   1158: KERNSRCDIR     Is the location of the top of the kernel src.
1.124     lukem    1159:                [${_SRC_TOP_}/sys]
1.118     lukem    1160:
1.124     lukem    1161: KERNARCHDIR    Is the location of the machine dependent kernel sources.
                   1162:                [arch/${MACHINE}]
1.120     lukem    1163:
1.124     lukem    1164: KERNCONFDIR    Is where the configuration files for kernels are found.
                   1165:                [${KERNSRCDIR}/${KERNARCHDIR}/conf]
1.118     lukem    1166:
                   1167: KERNOBJDIR     Is the kernel build directory.  The kernel GENERIC for
                   1168:                instance will be compiled in ${KERNOBJDIR}/GENERIC.
                   1169:                The default value is
                   1170:                ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
                   1171:                if it exists or the target 'obj' is being made.
                   1172:                Otherwise the default is
                   1173:                ${KERNSRCDIR}/${KERNARCHDIR}/compile.
                   1174:
                   1175: It is important that Makefiles (such as those under src/distrib) that
1.134     lukem    1176: wish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR}
1.118     lukem    1177: rather than make assumptions about the location of the compiled kernel.
                   1178:
                   1179:
                   1180: =-=-=-=-=   bsd.kinc.mk   =-=-=-=-=
                   1181:
                   1182: The include file <bsd.kinc.mk> defines the many targets (includes,
                   1183: subdirectories, etc.), and is used by kernel makefiles to handle
                   1184: include file installation.  It is intended to be included alone, by
1.134     lukem    1185: kernel Makefiles.  It uses similar variables to <bsd.inc.mk>.
                   1186: Please see <bsd.kinc.mk> for more details, and keep the documentation
                   1187: in that file up to date.
1.118     lukem    1188:
1.325     christos 1189: =-=-=-=-=   bsd.syscall.mk =-=-=-=-=
                   1190:
                   1191: The include file <bsd.syscall.mk> contains the logic to create syscall
                   1192: files for various emulations. It includes <bsd.kinc.mk> to handle the
                   1193: rest of the targets.
1.118     lukem    1194:
                   1195: =-=-=-=-=   bsd.lib.mk   =-=-=-=-=
                   1196:
                   1197: The include file <bsd.lib.mk> has support for building libraries.  It has
                   1198: the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
                   1199: includes, install, lint, and tags.  Additionally, it has a checkver target
                   1200: which checks for installed shared object libraries whose version is greater
                   1201: that the version of the source. It has a limited number of suffixes,
1.134     lukem    1202: consistent with the current needs of the BSD tree.  <bsd.lib.mk> includes
1.118     lukem    1203: <bsd.shlib.mk> to get shared library parameters.
                   1204:
                   1205: It sets/uses the following variables:
                   1206:
                   1207: LIB            The name of the library to build.
                   1208:
                   1209: LIBDIR         Target directory for libraries.
                   1210:
1.248     perry    1211: MKARZERO       Normally, ar(1) sets the timestamps, uid, gid and
                   1212:                permissions in files inside its archives to those of
1.364     khorben  1213:                the file it was fed. This leads to non-reproducible
1.324     apb      1214:                builds. If MKARZERO is set to "yes" (default is the
                   1215:                same as MKREPRO, or "no" if MKREPRO is not defined),
1.248     perry    1216:                then the "D" flag is passed to ar, causing the
                   1217:                timestamp, uid and gid to be zeroed and the file
                   1218:                permissions to be set to 644. This allows .a files
                   1219:                from different builds to be bit identical.
                   1220:
1.300     joerg    1221: SHLIBINSTALLDIR        Target directory for shared libraries if ${USE_SHLIBDIR}
                   1222:                is not "no".
                   1223:
1.263     abs      1224: SHLIB_MAJOR
                   1225: SHLIB_MINOR
                   1226: SHLIB_TEENY    Major, minor, and teeny version numbers of shared library
                   1227:
1.300     joerg    1228: USE_SHLIBDIR   If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR}
1.118     lukem    1229:                as the path to install shared libraries to.
                   1230:                USE_SHLIBDIR must be defined before <bsd.own.mk> is included.
1.130     lukem    1231:                Default: no
1.118     lukem    1232:
1.218     lukem    1233: LIBISMODULE    If not "no", install as ${LIB}.so (without the "lib" prefix),
                   1234:                and act as "MKDEBUGLIB=no MKLINT=no MKPICINSTALL=no
                   1235:                MKPROFILE=no MKSTATICLIB=no".
                   1236:                Default: no
                   1237:
1.211     lukem    1238: LIBISPRIVATE   If not "no", act as "MKDEBUGLIB=no MKLINT=no MKPIC=no
                   1239:                MKPROFILE=no", and don't install the (.a) library.
1.154     lukem    1240:                This is useful for "build only" helper libraries.
                   1241:                Default: no
                   1242:
1.244     mrg      1243: LIBISCXX       If not "no", Use ${CXX} instead of ${CC} to link
                   1244:                shared libraries.
                   1245:                This is useful for C++ libraries.
                   1246:                Default: no
                   1247:
1.118     lukem    1248: LINTLIBDIR     Target directory for lint libraries.
                   1249:
                   1250: LIBGRP         Library group.
                   1251:
                   1252: LIBOWN         Library owner.
                   1253:
                   1254: LIBMODE                Library mode.
                   1255:
                   1256: LDADD          Additional loader objects.
                   1257:
                   1258: MAN            The manual pages to be installed (use a .1 - .9 suffix).
                   1259:
                   1260: NOCHECKVER_<library>
                   1261: NOCHECKVER     If set, disables checking for installed shared object
                   1262:                libraries with versions greater than the source.  A
                   1263:                particular library name, without the "lib" prefix, may
                   1264:                be appended to the variable name to disable the check for
                   1265:                only that library.
                   1266:
                   1267: SRCS           List of source files to build the library.  Suffix types
                   1268:                .s, .c, and .f are supported.  Note, .s files are preferred
                   1269:                to .c files of the same name.  (This is not the default for
                   1270:                versions of make.)
                   1271:
1.157     lukem    1272: LIBDPLIBS      A list of the tuples:
                   1273:                        libname  path-to-srcdir-of-libname
                   1274:
                   1275:                For each tuple;
                   1276:                     *  LIBDO.libname contains the .OBJDIR of the library
                   1277:                        `libname', and if it is not set it is determined
                   1278:                        from the srcdir and added to MAKEOVERRIDES (the
                   1279:                        latter is to allow for build time optimization).
                   1280:                     *  LDADD gets  -L${LIBDO.libname} -llibname    added.
                   1281:                     *  DPADD gets  ${LIBDO.libname}/liblibname.so  or
                   1282:                                    ${LIBDO.libname}/liblibname.a   added.
                   1283:
1.307     pooka    1284:                The special value "_external" for LIBDO.lib makes the
                   1285:                build system to assume the library comes from outside
                   1286:                of the NetBSD source tree and only causes -llibname
                   1287:                to be added to LDADD.
                   1288:
1.157     lukem    1289:                This variable may be used for individual libraries, as
1.301     abs      1290:                well as in parent directories to cache common libraries
1.157     lukem    1291:                as a build-time optimization.
                   1292:
1.118     lukem    1293: The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
                   1294: if it exists, as well as the include file <bsd.man.mk>.
                   1295:
                   1296: It has rules for building profiled objects; profiled libraries are
                   1297: built by default.
                   1298:
                   1299: Libraries are ranlib'd when made.
                   1300:
                   1301:
                   1302: =-=-=-=-=   bsd.links.mk   =-=-=-=-=
                   1303:
                   1304: The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
1.134     lukem    1305: and is included from from <bsd.lib.mk> and <bsd.prog.mk>.
                   1306:
1.249     apb      1307: LINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log
                   1308: is used. The defaults may be modified by other bsd.*.mk files which
                   1309: include bsd.links.mk.  In the future, these variables may be replaced
                   1310: by a method for explicitly recording hard links in a metadata log.
                   1311:
1.134     lukem    1312: LINKS          The list of hard links, consisting of pairs of paths:
                   1313:                        source-file target-file
                   1314:                ${DESTDIR} is prepended to both paths before linking.
                   1315:                For example, to link /bin/test and /bin/[, use:
                   1316:                        LINKS=/bin/test /bin/[
                   1317:
1.153     lukem    1318: CONFIGLINKS    Similar semantics to LINKS, except that the links
                   1319:                are installed by the `configinstall' target,
                   1320:                not the `install' target.
                   1321:
1.134     lukem    1322: SYMLINKS       The list of symbolic links, consisting of pairs of paths:
                   1323:                        source-file target-file
                   1324:                ${DESTDIR} is only prepended to target-file before linking.
                   1325:                For example, to symlink /usr/bin/tar to /bin/tar resulting
                   1326:                in ${DESTDIR}/usr/bin/tar -> /bin/tar:
                   1327:                        SYMLINKS=/bin/tar /usr/bin/tar
1.118     lukem    1328:
1.153     lukem    1329: CONFIGSYMLINKS Similar semantics to SYMLINKS, except that the symbolic links
                   1330:                are installed by the `configinstall' target,
                   1331:                not the `install' target.
                   1332:
1.249     apb      1333: LINKSOWN       Link owner.  [${BINOWN}]
                   1334:
                   1335: LINKSGRP       Link group.  [${BINGRP}]
                   1336:
                   1337: LINKSMODE      Link mode.  [${NONBINMODE}]
                   1338:
                   1339: LINKSOWN_<fn>  Link owner of the specific file <fn>.
                   1340:
                   1341: LINKSGRP_<fn>  Link group of the specific file <fn>.
                   1342:
                   1343: LINKSMODE_<fn> Link mode of the specific file <fn>.
                   1344:
1.118     lukem    1345:
                   1346: =-=-=-=-=   bsd.man.mk   =-=-=-=-=
                   1347:
                   1348: The include file <bsd.man.mk> handles installing manual pages and their
                   1349: links.
                   1350:
1.222     lukem    1351: It has a three targets:
1.118     lukem    1352:
1.222     lukem    1353:        catinstall:
                   1354:                Install the preformatted manual pages and their links.
                   1355:        htmlinstall:
                   1356:                Install the HTML manual pages and their links.
1.118     lukem    1357:        maninstall:
                   1358:                Install the manual page sources and their links.
                   1359:
                   1360: It sets/uses the following variables:
                   1361:
                   1362: MANDIR         Base path for manual installation.
                   1363:
                   1364: MANGRP         Manual group.
                   1365:
                   1366: MANOWN         Manual owner.
                   1367:
                   1368: MANMODE                Manual mode.
                   1369:
                   1370: MANSUBDIR      Subdirectory under the manual page section, i.e. "/vax"
                   1371:                or "/tahoe" for machine specific manual pages.
                   1372:
                   1373: MAN            The manual pages to be installed (use a .1 - .9 suffix).
                   1374:
                   1375: MLINKS         List of manual page links (using a .1 - .9 suffix).  The
                   1376:                linked-to file must come first, the linked file second,
1.276     reed     1377:                and there may be multiple pairs.
1.118     lukem    1378:
                   1379: The include file <bsd.man.mk> includes a file named "../Makefile.inc" if
                   1380: it exists.
                   1381:
                   1382:
                   1383: =-=-=-=-=   bsd.obj.mk   =-=-=-=-=
                   1384:
                   1385: The include file <bsd.obj.mk> defines targets related to the creation
                   1386: and use of separated object and source directories.
                   1387:
                   1388: If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
                   1389: ${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
                   1390: it exists.  Otherwise make(1) looks for the existence of a
                   1391: subdirectory (or a symlink to a directory) of the source directory
                   1392: into which built targets should be placed.  If an environment variable
                   1393: named MAKEOBJDIR is set, make(1) uses its value as the name of the
                   1394: object directory; failing that, make first looks for a subdirectory
                   1395: named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
                   1396:
                   1397: Object directories are not created automatically by make(1) if they
                   1398: don't exist; you need to run a separate "make obj".  (This will happen
                   1399: during a top-level build if "MKOBJDIRS" is set to a value other than
                   1400: "no").  When the source directory is a subdirectory of ${BSDSRCDIR} --
                   1401: and this is determined by a simple string prefix comparison -- object
                   1402: directories are created in a separate object directory tree, and a
                   1403: symlink to the object directory in that tree is created in the source
                   1404: directory; otherwise, "make obj" assumes that you're not in the main
                   1405: source tree and that it's not safe to use a separate object tree.
                   1406:
                   1407: Several variables used by <bsd.obj.mk> control exactly what
                   1408: directories and links get created during a "make obj":
                   1409:
                   1410: MAKEOBJDIR     If set, this is the component name of the object
                   1411:                directory.
                   1412:
                   1413: OBJMACHINE     If this is set but MAKEOBJDIR is not set, creates
                   1414:                object directories or links named "obj.${MACHINE}";
                   1415:                otherwise, just creates ones named "obj".
                   1416:
                   1417: USR_OBJMACHINE  If set, and the current directory is a subdirectory of
                   1418:                ${BSDSRCDIR}, create object directory in the
                   1419:                corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
                   1420:                otherwise, create it in the corresponding subdirectory
                   1421:                of ${BSDOBJDIR}
1.113     thorpej  1422:
1.118     lukem    1423: BUILDID                If set, the contents of this variable are appended
                   1424:                to the object directory name.  If OBJMACHINE is also
                   1425:                set, ".${BUILDID}" is added after ".${MACHINE}".
1.113     thorpej  1426:
1.106     thorpej  1427:
1.118     lukem    1428: =-=-=-=-=   bsd.prog.mk   =-=-=-=-=
1.106     thorpej  1429:
1.1       cgd      1430: The include file <bsd.prog.mk> handles building programs from one or
                   1431: more source files, along with their manual pages.  It has a limited number
1.301     abs      1432: of suffixes, consistent with the current needs of the BSD tree.
1.134     lukem    1433: <bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters.
1.1       cgd      1434:
1.16      jtc      1435: It has eight targets:
1.1       cgd      1436:
                   1437:        all:
1.102     thorpej  1438:                build the program and its manual page.  This also
                   1439:                creates a GDB initialization file (.gdbinit) in
                   1440:                the objdir.  The .gdbinit file sets the shared library
                   1441:                prefix to ${DESTDIR} to facilitate cross-debugging.
1.1       cgd      1442:        clean:
                   1443:                remove the program, any object files and the files a.out,
1.24      mikel    1444:                Errs, errs, mklog, and ${PROG}.core.
1.1       cgd      1445:        cleandir:
                   1446:                remove all of the files removed by the target clean, as
                   1447:                well as .depend, tags, and any manual pages.
1.42      lukem    1448:                `distclean' is a synonym for `cleandir'.
1.1       cgd      1449:        depend:
                   1450:                make the dependencies for the source files, and store
                   1451:                them in the file .depend.
1.16      jtc      1452:        includes:
                   1453:                install any header files.
1.1       cgd      1454:        install:
                   1455:                install the program and its manual pages; if the Makefile
                   1456:                does not itself define the target install, the targets
                   1457:                beforeinstall and afterinstall may also be used to cause
                   1458:                actions immediately before and after the install target
                   1459:                is executed.
                   1460:        lint:
                   1461:                run lint on the source files
                   1462:        tags:
                   1463:                create a tags file for the source files.
                   1464:
                   1465: It sets/uses the following variables:
                   1466:
                   1467: BINGRP         Binary group.
                   1468:
                   1469: BINOWN         Binary owner.
                   1470:
                   1471: BINMODE                Binary mode.
                   1472:
1.286     apb      1473: CLEANDIRFILES  Additional files to remove for the cleandir target.
                   1474:
1.1       cgd      1475: CLEANFILES     Additional files to remove for the clean and cleandir targets.
                   1476:
1.337     uebayasi 1477: CONFIGOPTS     Additional flags to config(1) when building kernels.
                   1478:
1.1       cgd      1479: COPTS          Additional flags to the compiler when creating C objects.
1.112     thorpej  1480:
1.125     lukem    1481: COPTS.<fn>     Additional flags to the compiler when creating the
                   1482:                C objects for <fn>.
                   1483:                For <fn>.[ly], "<fn>.c" must be used.
                   1484:
1.112     thorpej  1485: CPUFLAGS       Additional flags to the compiler/assembler to select
                   1486:                CPU instruction set options, CPU tuning options, etc.
1.35      lukem    1487:
1.125     lukem    1488: CPUFLAGS.<fn>  Additional flags to the compiler/assembler for <fn>.
                   1489:                For <fn>.[ly], "<fn>.c" must be used.
                   1490:
1.124     lukem    1491: CPPFLAGS       Additional flags to the C pre-processor.
1.125     lukem    1492:
                   1493: CPPFLAGS.<fn>  Additional flags to the C pre-processor for <fn>.
                   1494:                For <fn>.[ly], "<fn>.c" must be used.
1.102     thorpej  1495:
                   1496: GDBINIT                List of GDB initialization files to add to "source"
                   1497:                directives in the .gdbinit file that is created in the
                   1498:                objdir.
1.1       cgd      1499:
                   1500: LDADD          Additional loader objects.  Usually used for libraries.
                   1501:                For example, to load with the compatibility and utility
                   1502:                libraries, use:
                   1503:
1.5       jtc      1504:                        LDADD+=-lutil -lcompat
1.1       cgd      1505:
1.178     lukem    1506: LDFLAGS                Additional linker flags (passed to ${CC} during link).
1.1       cgd      1507:
1.134     lukem    1508: LINKS          See <bsd.links.mk>
                   1509:
1.177     mrg      1510: OBJCOPTS       Additional flags to the compiler when creating ObjC objects.
                   1511:
                   1512: OBJCOPTS.<fn>  Additional flags to the compiler when creating the
                   1513:                ObjC objects for <fn>.
                   1514:                For <fn>.[ly], "<fn>.c" must be used.
                   1515:
1.134     lukem    1516: SYMLINKS       See <bsd.links.mk>
1.1       cgd      1517:
1.15      cgd      1518: MAN            Manual pages (should end in .1 - .9).  If no MAN variable is
1.8       cgd      1519:                defined, "MAN=${PROG}.1" is assumed.
1.1       cgd      1520:
1.214     wiz      1521: PAXCTL_FLAGS   If defined, run paxctl(1) on the program binary after link
1.212     lukem    1522:                time, with the value of this variable as args to paxctl(1).
1.193     perry    1523:
                   1524: PAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS.
                   1525:
1.1       cgd      1526: PROG           The name of the program to build.  If not supplied, nothing
                   1527:                is built.
                   1528:
1.88      thorpej  1529: PROG_CXX       If defined, the name of the program to build.  Also
                   1530:                causes <bsd.prog.mk> to link the program with the C++
                   1531:                compiler rather than the C compiler.  PROG_CXX overrides
                   1532:                the value of PROG if PROG is also set.
1.87      thorpej  1533:
1.21      christos 1534: PROGNAME       The name that the above program will be installed as, if
                   1535:                different from ${PROG}.
                   1536:
1.37      tv       1537: SRCS           List of source files to build the program.  If SRCS is not
1.1       cgd      1538:                defined, it's assumed to be ${PROG}.c.
1.108     jwise    1539:
                   1540: DPSRCS         List of source files which are needed for generating
                   1541:                dependencies, but are not needed in ${SRCS}.
1.1       cgd      1542:
                   1543: DPADD          Additional dependencies for the program.  Usually used for
                   1544:                libraries.  For example, to depend on the compatibility and
                   1545:                utility libraries use:
                   1546:
1.5       jtc      1547:                        DPADD+=${LIBCOMPAT} ${LIBUTIL}
1.1       cgd      1548:
1.288     christos 1549:                The following system libraries are predefined for DPADD:
1.1       cgd      1550:
1.196     joerg    1551:                LIBARCHIVE?=    ${DESTDIR}/usr/lib/libarchive.a
1.159     lukem    1552:                LIBASN1?=       ${DESTDIR}/usr/lib/libasn1.a
1.279     jmmv     1553:                LIBATF_C?=      ${DESTDIR}/usr/lib/libatf-c.a
                   1554:                LIBATF_CXX?=    ${DESTDIR}/usr/lib/libatf-c++.a
1.288     christos 1555:                LIBBIND9?=      ${DESTDIR}/usr/lib/libbind9.a
1.180     gdamore  1556:                LIBBLUETOOTH?=  ${DESTDIR}/usr/lib/libbluetooth.a
1.159     lukem    1557:                LIBBSDMALLOC?=  ${DESTDIR}/usr/lib/libbsdmalloc.a
1.99      itojun   1558:                LIBBZ2?=        ${DESTDIR}/usr/lib/libbz2.a
1.21      christos 1559:                LIBC?=          ${DESTDIR}/usr/lib/libc.a
1.288     christos 1560:                LIBCOMPAT?=     ${DESTDIR}/usr/lib/libcompat.a
1.99      itojun   1561:                LIBCOM_ERR?=    ${DESTDIR}/usr/lib/libcom_err.a
1.288     christos 1562:                LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o
1.322     joerg    1563:                LIBCRTI?=       ${DESTDIR}/usr/lib/crti.o
1.21      christos 1564:                LIBCRYPT?=      ${DESTDIR}/usr/lib/libcrypt.a
1.99      itojun   1565:                LIBCRYPTO?=     ${DESTDIR}/usr/lib/libcrypto.a
1.21      christos 1566:                LIBCURSES?=     ${DESTDIR}/usr/lib/libcurses.a
1.288     christos 1567:                LIBC_PIC?=      ${DESTDIR}/usr/lib/libc_pic.a
1.21      christos 1568:                LIBDBM?=        ${DESTDIR}/usr/lib/libdbm.a
                   1569:                LIBDES?=        ${DESTDIR}/usr/lib/libdes.a
1.288     christos 1570:                LIBDNS?=        ${DESTDIR}/usr/lib/libdns.a
1.21      christos 1571:                LIBEDIT?=       ${DESTDIR}/usr/lib/libedit.a
1.114     provos   1572:                LIBEVENT?=      ${DESTDIR}/usr/lib/libevent.a
1.315     christos 1573:                LIBEVENT_OPENSSL?=      ${DESTDIR}/usr/lib/libevent_openssl.a
                   1574:                LIBEVENT_PTHREADS?=     ${DESTDIR}/usr/lib/libevent_pthreads.a
1.347     christos 1575:                LIBEXECINFO?=   ${DESTDIR}/usr/lib/libexecinfo.a
1.294     tron     1576:                LIBEXPAT?=      ${DESTDIR}/usr/lib/libexpat.a
1.227     joerg    1577:                LIBFETCH?=      ${DESTDIR}/usr/lib/libfetch.a
1.73      blymn    1578:                LIBFORM?=       ${DESTDIR}/usr/lib/libform.a
1.288     christos 1579:                LIBFL?=         ${DESTDIR}/usr/lib/libfl.a
                   1580:                LIBG2C?=        ${DESTDIR}/usr/lib/libg2c.a
1.21      christos 1581:                LIBGCC?=        ${DESTDIR}/usr/lib/libgcc.a
                   1582:                LIBGNUMALLOC?=  ${DESTDIR}/usr/lib/libgnumalloc.a
1.99      itojun   1583:                LIBGSSAPI?=     ${DESTDIR}/usr/lib/libgssapi.a
                   1584:                LIBHDB?=        ${DESTDIR}/usr/lib/libhdb.a
1.288     christos 1585:                LIBHEIMBASE?=   ${DESTDIR}/usr/lib/libheimbase.a
                   1586:                LIBHEIMNTLM?=   ${DESTDIR}/usr/lib/libheimntlm.a
                   1587:                LIBHX500?=      ${DESTDIR}/usr/lib/libhx500.a
1.70      itojun   1588:                LIBINTL?=       ${DESTDIR}/usr/lib/libintl.a
1.49      itojun   1589:                LIBIPSEC?=      ${DESTDIR}/usr/lib/libipsec.a
1.288     christos 1590:                LIBISC?=        ${DESTDIR}/usr/lib/libisc.a
                   1591:                LIBISCCC?=      ${DESTDIR}/usr/lib/libisccc.a
                   1592:                LIBISCFG?=      ${DESTDIR}/usr/lib/libiscfg.a
1.99      itojun   1593:                LIBKADM5CLNT?=  ${DESTDIR}/usr/lib/libkadm5clnt.a
                   1594:                LIBKADM5SRV?=   ${DESTDIR}/usr/lib/libkadm5srv.a
                   1595:                LIBKAFS?=       ${DESTDIR}/usr/lib/libkafs.a
                   1596:                LIBKRB5?=       ${DESTDIR}/usr/lib/libkrb5.a
1.21      christos 1597:                LIBKVM?=        ${DESTDIR}/usr/lib/libkvm.a
                   1598:                LIBL?=          ${DESTDIR}/usr/lib/libl.a
1.208     lukem    1599:                LIBLBER?=       ${DESTDIR}/usr/lib/liblber.a
                   1600:                LIBLDAP?=       ${DESTDIR}/usr/lib/libldap.a
1.209     lukem    1601:                LIBLDAP_R?=     ${DESTDIR}/usr/lib/libldap_r.a
1.277     mbalmer  1602:                LIBLUA?=        ${DESTDIR}/usr/lib/liblua.a
1.313     jmmv     1603:                LIBLUTOK?=      ${DESTDIR}/usr/lib/liblutok.a
1.288     christos 1604:                LIBLWRES?=      ${DESTDIR}/usr/lib/liblwres.a
1.21      christos 1605:                LIBM?=          ${DESTDIR}/usr/lib/libm.a
1.288     christos 1606:                LIBMAGIC?=      ${DESTDIR}/usr/lib/libmagic.a
1.53      blymn    1607:                LIBMENU?=       ${DESTDIR}/usr/lib/libmenu.a
1.99      itojun   1608:                LIBOBJC?=       ${DESTDIR}/usr/lib/libobjc.a
                   1609:                LIBOSSAUDIO?=   ${DESTDIR}/usr/lib/libossaudio.a
1.159     lukem    1610:                LIBPAM?=        ${DESTDIR}/usr/lib/libpam.a
1.348     kamil    1611:                LIBPANEL?=      ${DESTDIR}/usr/lib/libpanel.a
1.21      christos 1612:                LIBPCAP?=       ${DESTDIR}/usr/lib/libpcap.a
1.99      itojun   1613:                LIBPCI?=        ${DESTDIR}/usr/lib/libpci.a
1.100     thorpej  1614:                LIBPMC?=        ${DESTDIR}/usr/lib/libpmc.a
1.26      kleink   1615:                LIBPOSIX?=      ${DESTDIR}/usr/lib/libposix.a
1.110     thorpej  1616:                LIBPTHREAD?=    ${DESTDIR}/usr/lib/libpthread.a
1.288     christos 1617:                LIBPUFFS?=      ${DESTDIR}/usr/lib/libpuffs.a
                   1618:                LIBQUOTA?=      ${DESTDIR}/usr/lib/libquota.a
1.163     christos 1619:                LIBRADIUS?=     ${DESTDIR}/usr/lib/libradius.a
1.365   ! jmcneill 1620:                LIBREFUSE?=     ${DESTDIR}/usr/lib/librefuse.a
1.21      christos 1621:                LIBRESOLV?=     ${DESTDIR}/usr/lib/libresolv.a
1.99      itojun   1622:                LIBRMT?=        ${DESTDIR}/usr/lib/librmt.a
                   1623:                LIBROKEN?=      ${DESTDIR}/usr/lib/libroken.a
1.21      christos 1624:                LIBRPCSVC?=     ${DESTDIR}/usr/lib/librpcsvc.a
1.110     thorpej  1625:                LIBRT?=         ${DESTDIR}/usr/lib/librt.a
1.288     christos 1626:                LIBRUMP?=       ${DESTDIR}/usr/lib/librump.a
1.289     christos 1627:                LIBRUMPFS_CD9660FS?=${DESTDIR}/usr/lib/librumpfs_cd9660fs.a
                   1628:                LIBRUMPFS_EFS?= ${DESTDIR}/usr/lib/librumpfs_efs.a
                   1629:                LIBRUMPFS_EXT2FS?=${DESTDIR}/usr/lib/librumpfs_ext2fs.a
                   1630:                LIBRUMPFS_FFS?= ${DESTDIR}/usr/lib/librumpfs_ffs.a
                   1631:                LIBRUMPFS_HFS?= ${DESTDIR}/usr/lib/librumpfs_hfs.a
                   1632:                LIBRUMPFS_LFS?= ${DESTDIR}/usr/lib/librumpfs_lfs.a
                   1633:                LIBRUMPFS_MSDOSFS?=${DESTDIR}/usr/lib/librumpfs_msdosfs.a
                   1634:                LIBRUMPFS_NFS?= ${DESTDIR}/usr/lib/librumpfs_nfs.a
                   1635:                LIBRUMPFS_NTFS?=${DESTDIR}/usr/lib/librumpfs_ntfs.a
                   1636:                LIBRUMPFS_SYSPUFFS?=${DESTDIR}/usr/lib/librumpfs_syspuffs.a
                   1637:                LIBRUMPFS_TMPFS?=${DESTDIR}/usr/lib/librumpfs_tmpfs.a
                   1638:                LIBRUMPFS_UDF?= ${DESTDIR}/usr/lib/librumpfs_udf.a
                   1639:                LIBRUMPFS_UFS?= ${DESTDIR}/usr/lib/librumpfs_ufs.a
1.288     christos 1640:                LIBRUMPUSER?=   ${DESTDIR}/usr/lib/librumpuser.a
                   1641:                LIBSASLC?=      ${DESTDIR}/usr/lib/libsaslc.a
1.21      christos 1642:                LIBSKEY?=       ${DESTDIR}/usr/lib/libskey.a
1.140     lukem    1643:                LIBSL?=         ${DESTDIR}/usr/lib/libsl.a
1.288     christos 1644:                LIBSQLITE3?=    ${DESTDIR}/usr/lib/libsqlite3.a
1.99      itojun   1645:                LIBSS?=         ${DESTDIR}/usr/lib/libss.a
1.159     lukem    1646:                LIBSSH?=        ${DESTDIR}/usr/lib/libssh.a
1.99      itojun   1647:                LIBSSL?=        ${DESTDIR}/usr/lib/libssl.a
1.187     christos 1648:                LIBSSP?=        ${DESTDIR}/usr/lib/libssp.a
1.140     lukem    1649:                LIBSTDCXX?=     ${DESTDIR}/usr/lib/libstdc++.a
1.186     mrg      1650:                LIBSUPCXX?=     ${DESTDIR}/usr/lib/libsupc++.a
1.264     roy      1651:                LIBTERMINFO?=   ${DESTDIR}/usr/lib/libterminfo.a
1.290     christos 1652:                LIBTRE?=        ${DESTDIR}/usr/lib/libtre.a
1.355     christos 1653:                LIBUNBOUND?=    ${DESTDIR}/usr/lib/libunbound.a
1.99      itojun   1654:                LIBUSBHID?=     ${DESTDIR}/usr/lib/libusbhid.a
1.21      christos 1655:                LIBUTIL?=       ${DESTDIR}/usr/lib/libutil.a
1.288     christos 1656:                LIBWIND?=       ${DESTDIR}/usr/lib/libwind.a
1.21      christos 1657:                LIBWRAP?=       ${DESTDIR}/usr/lib/libwrap.a
                   1658:                LIBY?=          ${DESTDIR}/usr/lib/liby.a
                   1659:                LIBZ?=          ${DESTDIR}/usr/lib/libz.a
1.1       cgd      1660:
1.288     christos 1661:                The following X-Windows libraries are predefined for DPADD:
                   1662:
                   1663:                LIBFS?=         ${DESTDIR}/usr/X11R7/lib/libFS.a
                   1664:                LIBGL?=         ${DESTDIR}/usr/X11R7/lib/libGL.a
                   1665:                LIBGLU?=        ${DESTDIR}/usr/X11R7/lib/libGLU.a
                   1666:                LIBICE?=        ${DESTDIR}/usr/X11R7/lib/libICE.a
                   1667:                LIBSM?=         ${DESTDIR}/usr/X11R7/lib/libSM.a
                   1668:                LIBX11?=        ${DESTDIR}/usr/X11R7/lib/libX11.a
1.317     mrg      1669:                LIBX11_XCB?=    ${DESTDIR}/usr/X11R7/lib/libX11-xcb.a
1.288     christos 1670:                LIBXTRAP?=      ${DESTDIR}/usr/X11R7/lib/libXTrap.a
                   1671:                LIBXAU?=        ${DESTDIR}/usr/X11R7/lib/libXau.a
                   1672:                LIBXAW?=        ${DESTDIR}/usr/X11R7/lib/libXaw.a
1.320     christos 1673:                LIBXCB?=        ${DESTDIR}/usr/X11R7/lib/libxcb.a
1.288     christos 1674:                LIBXDMCP?=      ${DESTDIR}/usr/X11R7/lib/libXdmcp.a
                   1675:                LIBXEXT?=       ${DESTDIR}/usr/X11R7/lib/libXext.a
                   1676:                LIBXFONT?=      ${DESTDIR}/usr/X11R7/lib/libXfont.a
                   1677:                LIBXFT?=        ${DESTDIR}/usr/X11R7/lib/libXft.a
                   1678:                LIBXI?=         ${DESTDIR}/usr/X11R7/lib/libXi.a
                   1679:                LIBXINERAMA?=   ${DESTDIR}/usr/X11R7/lib/libXinerama.a
                   1680:                LIBXMU?=        ${DESTDIR}/usr/X11R7/lib/libXmu.a
                   1681:                LIBXMUU?=       ${DESTDIR}/usr/X11R7/lib/libXmuu.a
                   1682:                LIBXPM?=        ${DESTDIR}/usr/X11R7/lib/libXpm.a
                   1683:                LIBXRANDR?=     ${DESTDIR}/usr/X11R7/lib/libXrandr.a
                   1684:                LIBXRENDER?=    ${DESTDIR}/usr/X11R7/lib/libXrender.a
                   1685:                LIBXSS?=        ${DESTDIR}/usr/X11R7/lib/libXss.a
                   1686:                LIBXT?=         ${DESTDIR}/usr/X11R7/lib/libXt.a
                   1687:                LIBXTST?=       ${DESTDIR}/usr/X11R7/lib/libXtst.a
                   1688:                LIBXV?=         ${DESTDIR}/usr/X11R7/lib/libXv.a
                   1689:                LIBXXF86DGA?=   ${DESTDIR}/usr/X11R7/lib/libXxf86dga.a
                   1690:                LIBXXF86MISC?=  ${DESTDIR}/usr/X11R7/lib/libXxf86misc.a
                   1691:                LIBXXF86VM?=    ${DESTDIR}/usr/X11R7/lib/libXxf86vm.a
                   1692:                LIBDPS?=        ${DESTDIR}/usr/X11R7/lib/libdps.a
                   1693:                LIBFNTSTUBS?=   ${DESTDIR}/usr/X11R7/lib/libfntstubs.a
                   1694:                LIBFONTCACHE?=  ${DESTDIR}/usr/X11R7/lib/libfontcache.a
                   1695:                LIBFONTCONFIG?= ${DESTDIR}/usr/X11R7/lib/libfontconfig.a
                   1696:                LIBFONTENC?=    ${DESTDIR}/usr/X11R7/lib/libfontenc.a
                   1697:                LIBFREETYPE?=   ${DESTDIR}/usr/X11R7/lib/libfreetype.a
                   1698:                LIBLBXUTIL?=    ${DESTDIR}/usr/X11R7/lib/liblbxutil.a
                   1699:                LIBXKBFILE?=    ${DESTDIR}/usr/X11R7/lib/libxkbfile.a
                   1700:
1.1       cgd      1701: SHAREDSTRINGS  If defined, a new .c.o rule is used that results in shared
1.12      christos 1702:                strings, using xstr(1). Note that this will not work with
                   1703:                parallel makes.
1.1       cgd      1704:
1.59      jlam     1705: STRIPFLAG      The flag passed to the install program to cause the binary
1.1       cgd      1706:                to be stripped.
                   1707:
                   1708: SUBDIR         A list of subdirectories that should be built as well.
                   1709:                Each of the targets will execute the same target in the
                   1710:                subdirectories.
                   1711:
1.21      christos 1712: SCRIPTS                A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
                   1713:                These are installed exactly like programs.
                   1714:
1.166     rtr      1715: SCRIPTSDIR     The location to install the scripts.  Each script can be
                   1716:                installed to a separate path by setting SCRIPTSDIR_<script>.
                   1717:
1.21      christos 1718: SCRIPTSNAME    The name that the above program will be installed as, if
                   1719:                different from ${SCRIPTS}. These can be further specialized
                   1720:                by setting SCRIPTSNAME_<script>.
                   1721:
1.124     lukem    1722: FILES          See description of <bsd.files.mk>.
1.21      christos 1723:
1.106     thorpej  1724: SHLINKDIR      Target directory for shared linker.  See description of
                   1725:                <bsd.own.mk> for additional information about this variable.
1.130     lukem    1726:
1.1       cgd      1727: The include file <bsd.prog.mk> includes the file named "../Makefile.inc"
                   1728: if it exists, as well as the include file <bsd.man.mk>.
                   1729:
                   1730: Some simple examples:
                   1731:
                   1732: To build foo from foo.c with a manual page foo.1, use:
                   1733:
                   1734:        PROG=   foo
                   1735:
                   1736:        .include <bsd.prog.mk>
                   1737:
                   1738: To build foo from foo.c with a manual page foo.2, add the line:
                   1739:
1.9       cgd      1740:        MAN=    foo.2
1.1       cgd      1741:
                   1742: If foo does not have a manual page at all, add the line:
                   1743:
1.75      agc      1744:        MKMAN=  no
1.1       cgd      1745:
                   1746: If foo has multiple source files, add the line:
                   1747:
                   1748:        SRCS=   a.c b.c c.c d.c
                   1749:
                   1750:
1.118     lukem    1751: =-=-=-=-=   bsd.rpc.mk   =-=-=-=-=
                   1752:
                   1753: The include file <bsd.rpc.mk> contains a makefile fragment used to
                   1754: construct source files built by rpcgen.
1.72      sommerfe 1755:
1.118     lukem    1756: The following macros may be defined in makefiles which include
                   1757: <bsd.rpc.mk> in order to control which files get built and how they
                   1758: are to be built:
1.21      christos 1759:
1.118     lukem    1760: RPC_INCS:      construct .h file from .x file
1.120     lukem    1761: RPC_XDRFILES:  construct _xdr.c from .x file
1.118     lukem    1762:                (for marshalling/unmarshalling data types)
                   1763: RPC_SVCFILES:  construct _svc.c from .x file
                   1764:                (server-side stubs)
                   1765: RPC_SVCFLAGS:  Additional flags passed to builds of RPC_SVCFILES.
1.21      christos 1766:
1.118     lukem    1767: RPC_XDIR:      Directory containing .x/.h files
1.23      christos 1768:
                   1769:
1.118     lukem    1770: =-=-=-=-=   bsd.shlib.mk   =-=-=-=-=
1.21      christos 1771:
1.118     lukem    1772: The include file <bsd.shlib.mk> computes parameters for shared library
                   1773: installation and use.  It defines no targets.  <bsd.own.mk> MUST be
1.134     lukem    1774: included before <bsd.shlib.mk>.
1.21      christos 1775:
1.134     lukem    1776: <bsd.own.mk> sets the following variables, if they are not already defined
1.118     lukem    1777: (defaults are in brackets):
1.21      christos 1778:
1.300     joerg    1779: SHLIBINSTALLDIR        If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR}
                   1780:                instead of ${LIBDIR} as the base path for shared library
                   1781:                installation.  [/lib]
                   1782:
1.118     lukem    1783: SHLIBDIR       The path to USE_SHLIBDIR shared libraries to use when building
                   1784:                a program.  [/lib for programs in /bin and /sbin, /usr/lib
                   1785:                for all others.]
1.81      wiz      1786:
1.300     joerg    1787: _LIBSODIR      Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no",
1.118     lukem    1788:                otherwise set to ${LIBDIR}
1.81      wiz      1789:
1.300     joerg    1790: SHLINKINSTALLDIR Base path for shared linker.  [/libexec]
                   1791:
1.118     lukem    1792: SHLINKDIR      Path to use for shared linker when building a program.
                   1793:                [/libexec for programs in /bin and /sbin, /usr/libexec for
                   1794:                all others.]
1.39      cgd      1795:
1.13      christos 1796:
1.118     lukem    1797: =-=-=-=-=   bsd.subdir.mk   =-=-=-=-=
1.13      christos 1798:
1.118     lukem    1799: The include file <bsd.subdir.mk> contains the default targets for building
1.120     lukem    1800: subdirectories.  It has the same eight targets as <bsd.prog.mk>: all,
1.233     apb      1801: clean, cleandir, depend, includes, install, lint, and tags.  It uses the
                   1802: following variables:
                   1803:
                   1804: NOSUBDIR       If this variable is defined, then the SUBDIR variable
                   1805:                will be ignored and subdirectories will not be processed.
                   1806:
                   1807: SUBDIR         For all of the directories listed in ${SUBDIR}, the
                   1808:                specified directory will be visited and the target made.
                   1809:
                   1810:                As a special case, the use of a token .WAIT as an
                   1811:                entry in SUBDIR acts as a synchronization barrier
                   1812:                when multiple make jobs are run; subdirs before the
                   1813:                .WAIT must complete before any subdirs after .WAIT are
                   1814:                started.  See make(1) for some caveats on use of .WAIT
                   1815:                and other special sources.
1.47      tv       1816:
                   1817:
1.326     christos 1818: =-=-=-=-=   bsd.x11.mk   =-=-=-=-=
                   1819:
                   1820: The include file <bsd.x11.mk> contains parameters and targets for
1.346     mrg      1821: cross-building X11 from ${X11SRCDIR.<package>}.  It should be included
                   1822: after the general Makefile contents but before the include files such as
                   1823: <bsd.prog.mk> and <bsd.lib.mk>.
1.326     christos 1824:
                   1825: It provides the following targets:
                   1826:        .man.1 .man.3 .man.4 .man.5 .man.7:
                   1827:                If ${MAN} or ${PROG} is set and ${MKMAN} != "no",
                   1828:                these rules convert from X11's manual page source
                   1829:                into an mdoc.old source file.
                   1830:
                   1831: It sets the following variables:
                   1832:
                   1833: BINDIR                 Set to ${X11BINDIR}.
                   1834:                        To override, define after including <bsd.x11.mk>
                   1835:
                   1836: LIBDIR                 Set to ${X11USRLIBDIR}.
                   1837:                        To override, define after including <bsd.x11.mk>
                   1838:
                   1839: MANDIR                 Set to ${X11MANDIR}.
                   1840:                        To override, define after including <bsd.x11.mk>
                   1841:
                   1842: CPPFLAGS               Appended with definitions to include from
                   1843:                        ${DESTDIR}${X11INCDIR}
                   1844:
                   1845: LDFLAGS                        Appended with definitions to link from
                   1846:                        ${DESTDIR}${X11USRLIBDIR}
                   1847:
                   1848: X11FLAGS.CONNECTION    Equivalent to X11's CONNECTION_FLAGS.
                   1849:
                   1850: X11FLAGS.EXTENSION     Equivalent to X11's EXT_DEFINES.
                   1851:
                   1852: X11FLAGS.LOADABLE      Equivalent to X11's LOADABLE.
                   1853:
                   1854: X11FLAGS.OS_DEFINES    Equivalent to X11's OS_DEFINES.
                   1855:
                   1856: X11FLAGS.SERVER                Equivalent to X11's ServerDefines.
                   1857:
                   1858: X11FLAGS.THREADLIB     Equivalent to X11's THREADS_DEFINES for libraries.
                   1859:
                   1860: X11FLAGS.THREADS       Equivalent to X11's THREADS_DEFINES.
                   1861:
                   1862: X11FLAGS.VERSION       cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION.
                   1863:
                   1864: X11FLAGS.DIX           Equivalent to X11's DIX_DEFINES.
                   1865:
                   1866: X11TOOL_UNXCOMM                Commandline to convert `XCOMM' comments to `#'
                   1867:
                   1868: It uses the following variables:
                   1869:
                   1870: APPDEFS                        List of app-default files to install.
                   1871:
                   1872: CPPSCRIPTS             List of files/scripts to run through cpp(1)
                   1873:                        and then ${X11TOOL_UNXCOMM}.  The source files
                   1874:                        have a `.cpp' suffix, the generated files do not.
                   1875:
                   1876: CPPSCRIPTFLAGS         Additional flags to cpp(1) when building CPPSCRIPTS.
                   1877:
                   1878: CPPSCRIPTFLAGS_<fn>    Additional flags to cpp(1) when building CPPSCRIPT <fn>.
                   1879:
                   1880:
                   1881: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                   1882:
                   1883: The following files are described here for completion, but they are not
                   1884: supposed to be included directly from other Makefiles; they are used
                   1885: internally by other system files.
                   1886:
1.118     lukem    1887: =-=-=-=-=   bsd.sys.mk   =-=-=-=-=
1.47      tv       1888:
1.326     christos 1889: The include file <bsd.sys.mk> is used by other system mk files and
                   1890: it is not intended to be included standalone. It contains rules and
                   1891: system build variables. It requires bsd.own.mk to be included first.
                   1892: It contains overrides that are used when building the NetBSD source tree.
1.133     lukem    1893:
                   1894: The following variables control how various files are compiled/built.
1.142     lukem    1895: (Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"):
1.133     lukem    1896:
                   1897: AR             Create, modify, and extract from archives.  [ar]
                   1898:
                   1899: ARFLAGS                Options to ${AR}.  [rl]
                   1900:
1.151     lukem    1901: AS             Assembler.  [as]
                   1902:
1.211     lukem    1903: AFLAGS         Options to ${CC} when compiling or linking .s or .S
                   1904:                assembly source files.  []
1.151     lukem    1905:
1.217     joerg    1906: BUILDSEED      GCC uses random numbers when compiling C++ code.
                   1907:                If this option is present, seed the random number
                   1908:                generator based on the value, source file names and
                   1909:                the output file name to make builds more deterministic.
                   1910:                Additional information is available in the GCC
                   1911:                documentation of -frandom-seed.
                   1912:
1.133     lukem    1913: CC             C compiler.  [cc]
                   1914:
                   1915: CFLAGS         Options to ${CC}.  [Usually -O or -O2]
                   1916:
                   1917: CPP            C Pre-Processor.  [cpp]
                   1918:
                   1919: CPPFLAGS       Options to ${CPP}.  []
                   1920:
1.151     lukem    1921: CPUFLAGS       Optimization flags for ${CC}.  []
1.133     lukem    1922:
                   1923: CXX            C++ compiler.  [c++]
                   1924:
                   1925: CXXFLAGS       Options to ${CXX}.  [${CFLAGS}]
                   1926:
                   1927: ELF2ECOFF      Convert ELF-format executable to ECOFF.  [elf2ecoff]
                   1928:
                   1929: FC             Fortran compiler.  [f77]
                   1930:
                   1931: FFLAGS         Options to {$FC}.  [-O]
                   1932:
1.235     apb      1933: HOST_SH                Shell.  This must be an absolute path, because it may be
                   1934:                substituted into "#!" lines in scripts.  [/bin/sh]
                   1935:
1.133     lukem    1936: INSTALL                install(1) command.  [install]
                   1937:
                   1938: LEX            Lexical analyzer.  [lex]
                   1939:
                   1940: LFLAGS         Options to ${LEX}.  []
                   1941:
1.145     jwise    1942: LPREFIX                Symbol prefix for ${LEX} (see -P option in lex(1)) [yy]
                   1943:
1.133     lukem    1944: LD             Linker.  [ld]
                   1945:
1.178     lukem    1946: LDFLAGS                Options to ${CC} during the link process.  []
1.133     lukem    1947:
                   1948: LINT           C program verifier.  [lint]
                   1949:
1.330     christos 1950: LINTFLAGS      Options to ${LINT}.  [-chapbxzgFS]
1.133     lukem    1951:
                   1952: LORDER         List dependencies for object files.  [lorder]
                   1953:
                   1954: MAKE           make(1).  [make]
                   1955:
                   1956: MKDEP          Construct Makefile dependency list.  [mkdep]
                   1957:
1.321     mrg      1958: MKDEPCXX       Construct Makefile dependency list for C++ files.  [mkdep]
                   1959:
1.133     lukem    1960: NM             List symbols from object files.  [nm]
                   1961:
                   1962: PC             Pascal compiler.  [pc]  (Not present)
                   1963:
                   1964: PFLAGS         Options to ${PC}.  []
                   1965:
                   1966: OBJC           Objective C compiler.  [${CC}]
                   1967:
                   1968: OBJCFLAGS      Options to ${OBJC}.  [${CFLAGS}]
                   1969:
                   1970: OBJCOPY                Copy and translate object files.  [objcopy]
                   1971:
1.291     christos 1972: OBJCOPYLIBFLAGS        Flags to pass to objcopy when library objects are
                   1973:                being built. [${.TARGET} =~ "*.po" ? -X : -x]
                   1974:
1.168     riz      1975: OBJDUMP                Display information from object files.  [objdump]
                   1976:
1.133     lukem    1977: RANLIB         Generate index to archive.  [ranlib]
                   1978:
1.343     pooka    1979: READELF                Display information from ELF object files.  [readelf]
                   1980:
1.133     lukem    1981: SIZE           List section sizes and total size.  [size]
                   1982:
1.343     pooka    1983: STRINGS                Display printable character sequences in files.  [strings]
                   1984:
1.133     lukem    1985: STRIP          Discard symbols from object files.  [strip]
                   1986:
                   1987: TSORT          Topological sort of a directed graph.  [tsort -q]
                   1988:
                   1989: YACC           LALR(1) parser generator.  [yacc]
                   1990:
                   1991: YFLAGS         Options to ${YACC}.  []
                   1992:
                   1993: YHEADER                If defined, add "-d" to YFLAGS, and add dependencies
                   1994:                from <file>.y to <file>.h and <file>.c, and add
                   1995:                <foo>.h to CLEANFILES.
                   1996:
                   1997: YPREFIX                If defined, add "-p ${YPREFIX}" to YFLAGS.
                   1998:
1.116     lukem    1999:
1.69      sommerfe 2000: Other variables of note (incomplete list):
                   2001:
1.213     lukem    2002: NOGCCERROR     If defined, prevents passing certain ${CFLAGS} to GCC
                   2003:                that cause warnings to be fatal, such as:
                   2004:                        -Werror -Wa,--fatal-warnings
                   2005:                (The latter being for as(1).)
1.212     lukem    2006:
1.283     joerg    2007: NOCLANGERROR   If defined and clang is used as C compiler, -Werror is not
                   2008:                passed to it.
                   2009:
1.296     plunky   2010: WARNS          Crank up compiler warning options; the distinct levels are:
1.82      lukem    2011:                        WARNS=1
                   2012:                        WARNS=2
                   2013:                        WARNS=3
1.164     matt     2014:                        WARNS=4
1.296     plunky   2015:                        WARNS=5
1.336     christos 2016:                        WARNS=6
1.69      sommerfe 2017:
1.326     christos 2018: =-=-=-=-=   bsd.host.mk  =-=-=-=-=
1.144     lukem    2019:
1.326     christos 2020: This file is automatically included from bsd.own.mk. It contains settings
                   2021: for all the HOST_* variables that are used in host programs and libraries.
1.144     lukem    2022:
1.326     christos 2023: HOST_AR                        The host archive processing command
1.144     lukem    2024:
1.326     christos 2025: HOST_CC                        The host c compiler
1.144     lukem    2026:
1.326     christos 2027: HOST_CFLAGS            The host c compiler flags
1.144     lukem    2028:
1.326     christos 2029: HOST_COMPILE.c         The host c compiler line with flags
1.144     lukem    2030:
1.326     christos 2031: HOST_COMPILE.cc                The host c++ compiler line with flags
1.144     lukem    2032:
1.326     christos 2033: HOST_CPP               The host c pre-processor
1.144     lukem    2034:
1.326     christos 2035: HOST_CPPFLAGS          The cost c pre-processor flags
1.144     lukem    2036:
1.326     christos 2037: HOST_CXX               The host c++ compiler
1.144     lukem    2038:
1.326     christos 2039: HOST_CXXFLAGS          The host c++ compiler flags
1.144     lukem    2040:
1.326     christos 2041: HOST_INSTALL_DIR       The host command to install a directory
1.144     lukem    2042:
1.326     christos 2043: HOST_INSTALL_FILE      The host command to install a file
1.144     lukem    2044:
1.326     christos 2045: HOST_INSTALL_SYMLINK   The host command to install a symlink
1.144     lukem    2046:
1.326     christos 2047: HOST_LD                        The host linker command
1.144     lukem    2048:
1.326     christos 2049: HOST_LDFLAGS           The host linker flags
1.144     lukem    2050:
1.326     christos 2051: HOST_LINK.c            The host c linker line with flags
1.221     mrg      2052:
1.326     christos 2053: HOST_LINK.cc           The host c++ linker line with flags
1.144     lukem    2054:
1.326     christos 2055: HOST_LN                        The host command to link two files
1.144     lukem    2056:
1.326     christos 2057: HOST_MKDEP             The host command to create dependencies for c programs
1.144     lukem    2058:
1.326     christos 2059: HOST_MKDEPCXX          The host command to create dependencies for c++ programs
1.144     lukem    2060:
1.326     christos 2061: HOST_OSTYPE            The host OSNAME-RELEASE-ARCH tupple
1.144     lukem    2062:
1.326     christos 2063: HOST_RANLIB            The host command to create random access archives
1.144     lukem    2064:
1.326     christos 2065: HOST_SH                        The host Bourne shell interpreter name (absolute path)
1.144     lukem    2066:
1.30      agc      2067: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

CVSweb <webmaster@jp.NetBSD.org>