[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.329

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

CVSweb <webmaster@jp.NetBSD.org>