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

1.215   ! dyoung      1: #      $NetBSD: bsd.README,v 1.214 2008/07/22 08:01:54 wiz 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.21      christos   59: object, and ".so" 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:
                     69: MKxxx          Can be set to "no" to disable functionality, or
                     70:                "yes" to enable it.
                     71:                Usually defaults to "yes", although some variables
                     72:                default to "no".
                     73:                Due to make(1) implementation issues, if a temporary
                     74:                command-line override of a mk.conf or <bsd.own.mk>
1.214     wiz        75:                setting is required whilst still honoring a particular
1.172     hubertf    76:                Makefile's setting of MKxxx, use
                     77:                        env MKxxx=value make
                     78:                instead of
                     79:                        make MKxxx=value
                     80:
                     81: NOxxx          If defined, disables a feature.
                     82:                Not intended for users.
                     83:                This is to allow Makefiles to disable functionality
                     84:                that they don't support (such as missing man pages).
                     85:                NOxxx variables must be defined before <bsd.own.mk>
                     86:                is included.
                     87:
                     88: The following variables that control how things are made/installed that
                     89: are not set by default. These should not be set by Makefiles; they're for
                     90: the user to define in MAKECONF (see <bsd.own.mk>, below) or on the make(1)
                     91: command line:
                     92:
                     93: BUILD          If defined, 'make install' checks that the targets in the
                     94:                source directories are up-to-date and remakes them if they
                     95:                 are out of date, instead of blindly trying to install
                     96:                 out of date or non-existent targets.
                     97:
                     98: MAKEVERBOSE    Control how "verbose" the standard make(1) rules are.
                     99:                Default: 2
                    100:                Supported values:
                    101:                    0   Minimal output ("quiet")
                    102:                    1   Describe what is occurring
                    103:                    2   Describe what is occurring and echo the actual command
                    104:
                    105:
1.210     gmcgarry  106: MKATF          If "no", don't build libatf-c, libatf-c++ libraries associated
                    107:                with the Automated Testing Framework (ATF).
                    108:                Default: yes
                    109:
1.172     hubertf   110: MKBFD          If "no", don't build libbfd, libiberty, or any of the things
                    111:                that depend on them (binutils/gas/ld, gdb, dbsym, mdsetimage).
                    112:                Default: yes
                    113:
                    114: MKCATPAGES     If "no", don't build or install the catman pages.
                    115:                Default: yes
                    116:
1.210     gmcgarry  117: MKCOMPLEX      If "no", don't build libm support for <complex.h>
                    118:                Default: yes
                    119:
1.172     hubertf   120: MKCRYPTO       If "no", no cryptography support will be built into the system,
1.174     christos  121:                and also acts as "MKKERBEROS=no".
1.172     hubertf   122:                Default: yes
                    123:
                    124: MKCRYPTO_IDEA  If not "no", IDEA support will be built into libcrypto_idea.a.
                    125:                Default: no
                    126:
                    127: MKCRYPTO_MDC2  If not "no", MDC2 support will be built into libcrypto_mdc2.a
                    128:                Default: no
                    129:
                    130: MKCRYPTO_RC5   If not "no", RC5 support will be built into libcrypto_rc5.a.
                    131:                Default: no
                    132:
                    133: MKCVS          If "no", don't build or install cvs(1).
                    134:                Default: yes
                    135:
1.184     lukem     136: MKDEBUG                If "no", don't build and install separate debugging symbols
                    137:                into /usr/libdata/debug.
                    138:                Default: no
                    139:
1.183     lukem     140: MKDEBUGLIB     Build debugging libraries.
1.176     christos  141:                Default: no
                    142:
1.172     hubertf   143: MKDOC          If "no", don't build or install the documentation.
                    144:                Default: yes
                    145:
                    146: MKDYNAMICROOT  If "no", build programs in /bin and /sbin statically,
                    147:                don't install certain libraries in /lib, and don't
                    148:                install the shared linker into /libexec.
                    149:                Default: yes
                    150:
1.201     lukem     151: MKGCC          If "no", don't build gcc(1) or any of the GCC-related
1.186     mrg       152:                libraries (libgcc, libobjc, libstdc++).
1.172     hubertf   153:                Default: yes
                    154:
1.201     lukem     155: MKGCCCMDS      If "no", don't build gcc(1), but do build the GCC-related
                    156:                libraries (libgcc, libobjc, libstdc++).
1.172     hubertf   157:                Default: yes
                    158:
                    159: MKGDB          If "no", don't build gdb(1).
                    160:                Default: yes
                    161:
                    162: MKHESIOD       If "no", disables building of Hesiod infrastructure
                    163:                (libraries and support programs).
                    164:                Default: yes
                    165:
                    166: MKHOSTOBJ      If not "no", for programs intended to be run on the compile
                    167:                host, the name, release, and architecture of the host
                    168:                operating system will be suffixed to the name of the object
                    169:                directory created by "make obj".
                    170:                Default: no
                    171:
                    172: MKHTML         If "no", don't build or install the html man pages.
                    173:                Default: no
                    174:
                    175: MKIEEEFP       If "no", don't add code for IEEE754/IEC60559 conformance.
                    176:                Has no effect on most platforms.
                    177:                Default: yes
                    178:
                    179: MKINET6                If "no", disables building of INET6 (IPv6) infrastructure
                    180:                (libraries and support programs).
                    181:                Default: yes
                    182:
                    183: MKINFO         If "no", don't build or install Info documentation from
                    184:                Texinfo source files.
                    185:                Default: yes
                    186:
                    187: MKIPFILTER     If "no", don't build or install the IP Filter programs and LKM.
                    188:                Default: yes
                    189:
1.208     lukem     190: MKISCSI                If "no", don't build or install iSCSI library or applications
1.181     mrg       191:                (depends on libpthread.)
                    192:                Default: yes
                    193:
1.172     hubertf   194: MKKERBEROS     If "no", disables building of Kerberos v5
                    195:                infrastructure (libraries and support programs).
                    196:                Default: yes
                    197:
1.208     lukem     198: MKLDAP         If "no", disables building of LDAP infrastructure
                    199:                (libraries and support programs).
                    200:                Default: yes
                    201:
1.206     lukem     202: MKLINKLIB      If "no", act as "MKLINT=no MKPICINSTALL=no MKPROFILE=no".
1.172     hubertf   203:                Also:
                    204:                        - don't install the .a libraries
                    205:                        - don't install _pic.a libraries on PIC systems
                    206:                        - don't build .a libraries on PIC systems
                    207:                        - don't install the .so symlink on ELF systems
                    208:                I.e, only install the shared library (and the .so.major
                    209:                symlink on ELF).
                    210:                Default: yes
                    211:
                    212: MKLINT         If "no", don't build or install the lint libraries.
                    213:                Default: yes
                    214:
                    215: MKMAN          If "no", don't build or install the man or catman pages,
                    216:                and also acts as "MKCATPAGES=no MKHTML=no".
                    217:                Default: yes
                    218:
                    219: MKMANZ         If not "no", compress manual pages at installation time.
                    220:                Default: no
                    221:
1.200     jmmv      222: MKMODULAR      If "no", don't build the versions of modload(8), modstat(8)
                    223:                and modunload(8) that use the new modules framework present
                    224:                in the kernel (enabled separately using 'options MODULAR'
                    225:                int the configuration file).  Also don't build any other
                    226:                stuff that may rely on this support, such as tests or kernel
                    227:                modules.
                    228:                Note: This flag will disappear when the new modules framework
                    229:                is complete enough to replace the old LKM, effectively
                    230:                switching it to "yes" by default.
                    231:                Default: no
                    232:
1.172     hubertf   233: MKNLS          If "no", don't build or install the NLS files and locale
                    234:                definition files.
                    235:                Default: yes
                    236:
1.215   ! dyoung    237: MKNVI          If "no", don't build or install the experimental new version
        !           238:                of nvi (/usr/bin/nvi et cetera).
        !           239:                Default: yes
        !           240:
1.172     hubertf   241: MKOBJ          If "no", don't enable the rule which creates objdirs,
                    242:                and also acts as "MKOBJDIRS=no".
                    243:                Default: yes
                    244:
                    245: MKOBJDIRS      If "no", don't create objdirs during a "make build".
                    246:                Default: no
                    247:
                    248: MKPAM          If "no", disables building of PAM authentication
                    249:                infrastructure (libraries and support programs).
1.182     peter     250:                Default: yes
1.172     hubertf   251:
1.210     gmcgarry  252: MKPCC          If "no", don't build pcc(1) or any of the PCC-related
                    253:                libraries (libpcc, libpccsoftfloat).
                    254:                Default: no
                    255:
                    256: MKPCCCMDS      If "no", don't build pcc(1), but do build the PCC-related
                    257:                libraries (libpcc, libpccsoftfloat).
                    258:                Default: no
                    259:
1.172     hubertf   260: MKPF           If "no", don't build or install the pf programs and LKM.
                    261:                Default: yes
                    262:
                    263: MKPIC          If "no", don't build or install shared libraries, and
                    264:                also acts as "MKPICLIB=no"
                    265:                Default: yes (for MACHINE_ARCHs that support it)
                    266:
                    267: MKPICINSTALL   If "no", don't install the *_pic.a libraries.
                    268:                Default: yes
                    269:
                    270: MKPICLIB       If "no", don't build *_pic.a libraries, and build the
                    271:                shared object libraries from the .a libraries.
                    272:                A symlink is installed in ${DESTDIR}/usr/lib for the
                    273:                _pic.a library pointing to the .a library.
                    274:                Default: yes
                    275:
1.198     christos  276: MKPIE          If "no", create regular executables. Otherwise create
                    277:                PIE (Position Independent Executables).
                    278:                Default: no
                    279:
1.172     hubertf   280: MKPOSTFIX      If "no", don't build or install postfix(1).
                    281:                Default: yes
                    282:
                    283: MKPROFILE      If "no", don't build or install the profiling (*_p.a) libraries.
                    284:                Default: yes
                    285:
1.194     pooka     286: MKPUFFS                If "no", don't build librefuse (lib/librefuse) or
                    287:                puffs applications (usr.sbin/puffs).  NOTE: libpuffs
                    288:                is always built due to historic reasons.  This flag will
                    289:                disappear once puffs is no longer considered experimental,
                    290:                i.e. it will effectively default to "yes".
1.190     pooka     291:                Default: no
                    292:
1.172     hubertf   293: MKSHARE                If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no
                    294:                MKMAN=no MKNLS=no".
                    295:                I.e, don't build catman pages, documentation, Info
                    296:                documentation, man pages, NLS files, ...
                    297:                Default: yes
                    298:
                    299: MKSKEY         If "no", disables building of S/key authentication
                    300:                infrastructure (libraries and support programs).
                    301:                Default: yes
                    302:
                    303: MKSOFTFLOAT    If not "no", build with options to enable the compiler to
                    304:                generate output containing library calls for floating
                    305:                point and possibly soft-float library support.
                    306:                Default: no
                    307:
                    308: MKSTATICLIB    If "no", don't build or install the normal static (*.a)
                    309:                libraries.
                    310:                Default: yes
                    311:
                    312: MKUNPRIVED     If not "no", don't set the owner/group/mode when installing
                    313:                files or directories, and keep a metadata log of what
                    314:                the owner/group/mode should be.  This allows a
                    315:                non-root "make install".
                    316:                Default: no
                    317:
                    318: MKUPDATE       If not "no", 'make install' only installs targets that are
                    319:                more recently modified in the source directories that their
                    320:                installed counterparts.
                    321:                Default: no
                    322:
                    323: MKX11          If not "no", 'make build' also descends into src/x11
                    324:                to cross build X11R6 and automatically enables creation
                    325:                of X sets.
                    326:                Default: no
                    327:
                    328: MKYP           If "no", disables building of YP (NIS)
                    329:                infrastructure (libraries and support programs).
                    330:                Default: yes
                    331:
                    332: USE_HESIOD     If "no", disables building Hesiod support into
                    333:                various system utilities/libraries that support it.
                    334:                If ${MKHESIOD} is "no", USE_HESIOD will also be
                    335:                forced to "no".
                    336:
                    337: USE_INET6      If "no", disables building INET6 (IPv6) support into
                    338:                various system utilities/libraries that support it.
                    339:                If ${MKINET6} is "no", USE_INET6 will also be
                    340:                forced to "no".
                    341:
1.197     ad        342: USE_JEMALLOC   If "no", disables building the "jemalloc" allocator
                    343:                designed for improved performance with threaded
                    344:                applications.  The "phkmalloc" allocator as used up
                    345:                before NetBSD-5.0 will be substituted.
                    346:
1.175     christos  347: USE_KERBEROS   If "no", disables building Kerberos v5
1.172     hubertf   348:                support into various system utilities/libraries that
                    349:                support it.  If ${MKKERBEROS} is "no", USE_KERBEROS
                    350:                will also be forced to "no".
                    351:
1.208     lukem     352: USE_LDAP       If "no", disables building LDAP support into various
                    353:                system utilities/libraries that support it.
                    354:                If ${MKLDAP} is "no", USE_LDAP will also be forced to "no".
                    355:
1.172     hubertf   356: USE_PAM                If "no", disables building PAM authentication support
                    357:                into various system utilities/libraries that support it.
                    358:                If ${MKPAM} is "no", USE_PAM will also be forced to "no".
                    359:
                    360: USE_SKEY       If "no", disables building S/key authentication
                    361:                support into various system utilities/libraries that
                    362:                support it.  If ${MKSKEY} is "no", USE_SKEY will
                    363:                also be forced to "no".
1.204     lukem     364:                Default: no
1.172     hubertf   365:
1.201     lukem     366: USE_SSP                If "no", disables GCC stack protection code, which
1.191     rumble    367:                detects stack overflows and aborts the program. This
                    368:                imposes some performance penalty.
                    369:                Default: no
1.187     christos  370:
1.172     hubertf   371: USE_YP         If "no", disables building YP (NIS) support into
                    372:                various system utilities/libraries that support it.
                    373:                If ${MKYP} is "no", USE_YP will also be forced to "no".
                    374:
                    375: COPTS.lib<lib>
1.177     mrg       376: OBJCOPTS.lib<lib>
1.172     hubertf   377: LDADD.lib<lib>
                    378: CPPFLAGS.lib<lib>
                    379: CXXFLAGS.lib<lib>
                    380: COPTS.<prog>
1.177     mrg       381: OBJCCOPTS.<prog>
1.172     hubertf   382: LDADD.<prog>
                    383: CPPFLAGS.<prog>
                    384: CXXFLAGS.<prog>        These provide a way to specify additions to the associated
                    385:                variables in a way that applies only to a particular library
                    386:                or program.  <lib> corresponds to the LIB variable set in
                    387:                the library's makefile.  <prog> corresponds to either PROG
                    388:                or PROG_CXX (if set).  For example, if COPTS.libcrypto is
                    389:                set to "-g", "-g" will be added to COPTS only when compiling
                    390:                the crypto library.
1.118     lukem     391:
                    392: =-=-=-=-=   sys.mk   =-=-=-=-=
1.1       cgd       393:
                    394: The include file <sys.mk> has the default rules for all makes, in the BSD
                    395: environment or otherwise.  You probably don't want to touch this file.
                    396:
1.118     lukem     397: =-=-=-=-=   bsd.own.mk   =-=-=-=-=
1.1       cgd       398:
1.17      thorpej   399: The include file <bsd.own.mk> contains source tree configuration parameters,
                    400: such as the owners, groups, etc. for both manual pages and binaries, and
                    401: a few global "feature configuration" parameters.
1.1       cgd       402:
                    403: It has no targets.
                    404:
1.134     lukem     405: To get system-specific configuration parameters, <bsd.own.mk> will try to
1.29      cjs       406: include the file specified by the "MAKECONF" variable.  If MAKECONF is not
                    407: set, or no such file exists, the system make configuration file, /etc/mk.conf
                    408: is included.  These files may define any of the variables described below.
1.17      thorpej   409:
1.134     lukem     410: <bsd.own.mk> sets the following variables, if they are not already defined
1.17      thorpej   411: (defaults are in brackets):
1.15      cgd       412:
1.98      lukem     413: NETBSDSRCDIR   Top of the NetBSD source tree.
                    414:                If _SRC_TOP_ != "", that will be used as the default,
                    415:                otherwise BSDSRCDIR will be used as the default.
                    416:                Various makefiles within the NetBSD source tree will
                    417:                use this to reference the top level of the source tree.
                    418:
1.95      lukem     419: _SRC_TOP_      Top of the system source tree, as determined by <bsd.own.mk>
1.98      lukem     420:                based on the presence of tools/ and build.sh.  This variable
                    421:                is "internal" to <bsd.own.mk>, although its value is only
                    422:                determined once and then propagated to all sub-makes.
1.95      lukem     423:
1.15      cgd       424: BSDSRCDIR      The real path to the system sources, so that 'make obj'
1.116     lukem     425:                will work correctly.  [/usr/src]
1.15      cgd       426:
                    427: BSDOBJDIR      The real path to the system 'obj' tree, so that 'make obj'
1.116     lukem     428:                will work correctly.  [/usr/obj]
1.15      cgd       429:
1.116     lukem     430: BINGRP         Binary group.  [wheel]
1.15      cgd       431:
1.116     lukem     432: BINOWN         Binary owner.  [root]
1.15      cgd       433:
1.116     lukem     434: BINMODE                Binary mode.  [555]
1.15      cgd       435:
1.116     lukem     436: NONBINMODE     Mode for non-executable files.  [444]
1.15      cgd       437:
1.116     lukem     438: MANDIR         Base path for manual installation.  [/usr/share/man/cat]
1.15      cgd       439:
1.116     lukem     440: MANGRP         Manual group.  [wheel]
1.15      cgd       441:
1.116     lukem     442: MANOWN         Manual owner.  [root]
1.15      cgd       443:
1.116     lukem     444: MANMODE                Manual mode.  [${NONBINMODE}]
1.15      cgd       445:
1.21      christos  446: MANINSTALL     Manual installation type: maninstall, catinstall, or both
1.155     jmc       447:                [maninstall catinstall]
1.76      fair      448:
                    449: LDSTATIC       Control program linking; if set blank, link everything
1.129     lukem     450:                dynamically.  If set to "-static", link everything statically.
1.76      fair      451:                If not set, programs link according to their makefile.
1.21      christos  452:
1.116     lukem     453: LIBDIR         Base path for library installation.  [/usr/lib]
1.15      cgd       454:
1.116     lukem     455: LINTLIBDIR     Base path for lint(1) library installation.  [/usr/libdata/lint]
1.15      cgd       456:
1.116     lukem     457: LIBGRP         Library group.  [${BINGRP}]
1.15      cgd       458:
1.116     lukem     459: LIBOWN         Library owner.  [${BINOWN}]
1.15      cgd       460:
1.116     lukem     461: LIBMODE                Library mode.  [${NONBINMODE}]
1.15      cgd       462:
                    463: DOCDIR         Base path for system documentation (e.g. PSD, USD, etc.)
1.116     lukem     464:                installation.  [/usr/share/doc]
1.62      simonb    465:
                    466: HTMLDOCDIR     Base path for html system documentation installation.
                    467:                [/usr/share/doc/html]
1.15      cgd       468:
1.116     lukem     469: DOCGRP         Documentation group.  [wheel]
1.15      cgd       470:
1.116     lukem     471: DOCOWN         Documentation owner.  [root]
1.15      cgd       472:
1.116     lukem     473: DOCMODE                Documentation mode.  [${NONBINMODE}]
1.15      cgd       474:
1.84      kleink    475: NLSDIR         Base path for Native Language Support files installation.
1.15      cgd       476:                [/usr/share/nls]
1.1       cgd       477:
1.116     lukem     478: NLSGRP         Native Language Support files group.  [wheel]
1.1       cgd       479:
1.116     lukem     480: NLSOWN         Native Language Support files owner.  [root]
1.1       cgd       481:
1.116     lukem     482: NLSMODE                Native Language Support files mode.  [${NONBINMODE}]
1.1       cgd       483:
1.144     lukem     484: X11SRCDIR      The path to the xsrc tree.  [/usr/xsrc]
                    485:
                    486: X11SRCDIR.xc   The path to the X11R6 xc src tree.  [${X11SRCDIR}/xfree/xc]
                    487:
                    488: X11SRCDIR.local        The path to the local X11R6 src tree.  [${X11SRCDIR}/local]
                    489:
                    490: X11ROOTDIR     Root directory of the X11 installation.  [/usr/X11R6]
                    491:
                    492: X11BINDIR      X11 bin directory.  [${X11ROOTDIR}/bin]
                    493:
                    494: X11FONTDIR     X11 font directory.  [${X11ROOTDIR}/lib/X11/fonts]
                    495:
                    496: X11INCDIR      X11 include directory.  [${X11ROOTDIR}/include]
                    497:
                    498: X11LIBDIR      X11 lib/x11 (config) directory.  [${X11ROOTDIR}/lib/X11]
                    499:
                    500: X11MANDIR      X11 manual directory.  [${X11ROOTDIR}/man]
                    501:
                    502: X11USRLIBDIR   X11 library directory.  [${X11ROOTDIR}/lib]
                    503:
1.32      mikel     504: STRIPFLAG      The flag passed to the install program to cause the binary
1.1       cgd       505:                to be stripped.  This is to be used when building your
                    506:                own install script so that the entire system can be made
1.146     lukem     507:                stripped/not-stripped using a single knob.  []
1.1       cgd       508:
1.2       cgd       509: COPY           The flag passed to the install program to cause the binary
                    510:                to be copied rather than moved.  This is to be used when
                    511:                building our own install script so that the entire system
                    512:                can either be installed with copies, or with moves using
1.116     lukem     513:                a single knob.  [-c]
1.15      cgd       514:
1.150     lukem     515: MAKEDIRTARGET dir target [params]
                    516:                Runs "cd $${dir} && ${MAKE} [params] $${target}",
                    517:                displaying a "pretty" message whilst doing so.
                    518:
1.152     cl        519: RELEASEMACHINEDIR
                    520:                Subdirectory used below RELEASEDIR when building
                    521:                a release.  [${MACHINE}]
                    522:
                    523: RELEASEMACHINE Subdirectory or path component used for the following
                    524:                paths:
                    525:                        distrib/${RELEASEMACHINE}
                    526:                        distrib/notes/${RELEASEMACHINE}
                    527:                        etc/etc.${RELEASEMACHINE}
                    528:                Used when building a release.  [${MACHINE}]
1.150     lukem     529:
1.134     lukem     530: Additionally, the following variables may be set by <bsd.own.mk> or in a
1.214     wiz       531: make configuration file to modify the behavior of the system build
1.17      thorpej   532: process (default values are in brackets along with comments, if set by
1.134     lukem     533: <bsd.own.mk>):
1.33      jonathan  534:
1.172     hubertf   535: USETOOLS       Indicates whether the tools specified by ${TOOLDIR} should
                    536:                be used as part of a build in progress.
                    537:                Supported values:
                    538:
                    539:                yes     Use the tools from TOOLDIR.
                    540:                        Must be set to this if cross-compiling.
                    541:
                    542:                no      Do not use the tools from TOOLDIR, but refuse to
                    543:                        build native compilation tool components that are
                    544:                        version-specific for that tool.
                    545:
                    546:                never   Do not use the tools from TOOLDIR, even when
                    547:                        building native tool components.  This is similar to
                    548:                        the traditional NetBSD build method, but does not
                    549:                        verify that the compilation tools in use are
                    550:                        up-to-date enough in order to build the tree
                    551:                        successfully.  This may cause build or runtime
                    552:                        problems when building the whole NetBSD source tree.
                    553:
                    554:                Default: "yes" if building all or part of a whole NetBSD
                    555:                source tree (detected automatically); "no" otherwise
                    556:                (to preserve traditional semantics of the <bsd.*.mk>
                    557:                make(1) include files).
1.142     lukem     558:
1.116     lukem     559: OBJECT_FMT     Object file format.  [set to "ELF" on architectures that
1.199     simonb    560:                use ELF -- currently all architectures].
1.33      jonathan  561:
1.103     thorpej   562: TOOLCHAIN_MISSING
1.142     lukem     563:                If not "no", this indicates that the platform being built
1.103     thorpej   564:                does not have a working in-tree toolchain.  If the
1.142     lukem     565:                ${MACHINE_ARCH} in question falls into this category,
                    566:                TOOLCHAIN_MISSING is conditionally assigned the value "yes".
1.103     thorpej   567:                Otherwise, the variable is unconditionally assigned the
                    568:                value "no".
1.142     lukem     569:                If not "no", ${MKBFD}, ${MKGCC}, and ${MKGDB} are
                    570:                unconditionally assigned the value "no".
1.103     thorpej   571:
                    572: EXTERNAL_TOOLCHAIN
                    573:                This variable is not directly set by <bsd.own.mk>, but
                    574:                including <bsd.own.mk> is the canonical way to gain
                    575:                access to this variable.  The variable should be defined
                    576:                either in the user's environment or in the user's mk.conf
                    577:                file.  If defined, this variable indicates the root of
                    578:                an external toolchain which will be used to build the
1.142     lukem     579:                tree.  For example, if a platform is a ${TOOLCHAIN_MISSING}
1.103     thorpej   580:                platform, EXTERNAL_TOOLCHAIN can be used to re-enable the
                    581:                cross-compile framework.
                    582:
1.142     lukem     583:                If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally
                    584:                assigned the value "no", since the external version of the
                    585:                compiler may not be able to build the library components of
                    586:                the in-tree compiler.
1.103     thorpej   587:
                    588:                NOTE: This variable is not yet used in as many places as
                    589:                it should be.  Expect the exact semantics of this variable
                    590:                to change in the short term as parts of the cross-compile
                    591:                framework continue to be cleaned up.
1.1       cgd       592:
1.134     lukem     593: <bsd.own.mk> is generally useful when building your own Makefiles so that
1.1       cgd       594: they use the same default owners etc. as the rest of the tree.
1.131     lukem     595:
                    596:
                    597: =-=-=-=-=   bsd.dep.mk   =-=-=-=-=
                    598:
                    599: The include file <bsd.dep.mk> contains the default targets for building
1.133     lukem     600: .depend files.  It creates .d files from entries in SRCS and DPSRCS
                    601: that are C, C++, or Objective C source files, and builds .depend from the
                    602: .d files.  All other files in SRCS and all of DPSRCS will be used as
                    603: dependencies for the .d files.  In order for this to function correctly,
1.132     lukem     604: it should be .included after all other .mk files and directives that may
                    605: modify SRCS or DPSRCS.  It uses the following variables:
                    606:
                    607: SRCS           List of source files to build the program.
                    608:
                    609: DPSRCS         List of source files which are needed for generating
                    610:                dependencies, but are not needed in ${SRCS}.
1.1       cgd       611:
                    612:
1.118     lukem     613: =-=-=-=-=   bsd.files.mk   =-=-=-=-=
1.106     thorpej   614:
1.118     lukem     615: The include file <bsd.files.mk> handles the FILES variables and is included
1.134     lukem     616: from <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables:
1.124     lukem     617:
                    618: FILES          The list of files to install.
                    619:
1.153     lukem     620: CONFIGFILES    Similar semantics to FILES, except that the files
                    621:                are installed by the `configinstall' target,
                    622:                not the `install' target.
                    623:                The FILES* variables documented below also apply.
                    624:
1.124     lukem     625: FILESOWN       File owner.  [${BINOWN}]
                    626:
                    627: FILESGRP       File group.  [${BINGRP}]
                    628:
1.203     dholland  629: FILESMODE      File mode.  [${NONBINMODE}]
1.124     lukem     630:
                    631: FILESDIR       The location to install the files.
                    632:
                    633: FILESNAME      Optional name to install each file as.
                    634:
1.153     lukem     635: FILESOWN_<fn>  File owner of the specific file <fn>.
                    636:
                    637: FILESGRP_<fn>  File group of the specific file <fn>.
                    638:
                    639: FILESMODE_<fn> File mode of the specific file <fn>.
                    640:
1.202     uwe       641: FILESDIR_<fn>  The location to install the specific file <fn>.
1.153     lukem     642:
                    643: FILESNAME_<fn> Optional name to install <fn> as.
1.124     lukem     644:
1.135     lukem     645:
1.139     lukem     646: BUILDSYMLINKS  List of two word items:
1.135     lukem     647:                        lnsrc lntgt
                    648:                For each lnsrc item, create a symlink named lntgt.
                    649:                The lntgt symlinks are removed by the cleandir target.
1.106     thorpej   650:
1.148     jmc       651: UUDECODE_FILES List of files which are stored as <file>.uue in the source
                    652:                tree. Each one will be decoded with ${TOOL_UUDECODE}.
                    653:                The source files have a `.uue' suffix, the generated files do
                    654:                not.
1.149     jmc       655:
1.202     uwe       656: UUDECODE_FILES_RENAME_<fn>
                    657:                Rename the output from the decode to the provided name.
1.148     jmc       658:
                    659:                *NOTE: These files are simply decoded, with no install or other
                    660:                       rule applying implicitly except being added to the clean
                    661:                       target.
1.106     thorpej   662:
1.118     lukem     663: =-=-=-=-=   bsd.gcc.mk   =-=-=-=-=
1.113     thorpej   664:
                    665: The include file <bsd.gcc.mk> computes various parameters related to GCC
                    666: support libraries.  It defines no targets.  <bsd.own.mk> MUST be included
1.134     lukem     667: before <bsd.gcc.mk>.
1.113     thorpej   668:
1.134     lukem     669: The primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each
1.113     thorpej   670: of which need to know where to find certain GCC support libraries.
                    671:
1.134     lukem     672: The behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable,
1.113     thorpej   673: which is generally set by the user.  If EXTERNAL_TOOLCHAIN it set, then
                    674: the compiler is asked where to find the support libraries, otherwise the
                    675: support libraries are found in ${DESTDIR}/usr/lib.
                    676:
1.134     lukem     677: <bsd.gcc.mk> sets the following variables:
1.113     thorpej   678:
1.118     lukem     679: _GCC_CRTBEGIN  The full path name to crtbegin.o.
                    680:
                    681: _GCC_CRTBEGINS The full path name to crtbeginS.o.
                    682:
                    683: _GCC_CRTEND    The full path name to crtend.o.
                    684:
                    685: _GCC_CRTENDS   The full path name to crtendS.o.
                    686:
                    687: _GCC_LIBGCCDIR The directory where libgcc.a is located.
                    688:
                    689:
                    690: =-=-=-=-=   bsd.inc.mk   =-=-=-=-=
                    691:
1.134     lukem     692: The include file <bsd.inc.mk> defines the includes target and uses the
1.118     lukem     693: variables:
                    694:
1.124     lukem     695: INCS           The list of include files.
1.118     lukem     696:
                    697: INCSDIR                The location to install the include files.
                    698:
                    699: INCSNAME       Target name of the include file, if only one; same as
                    700:                FILESNAME, but for include files.
                    701:
1.134     lukem     702: INCSYMLINKS    Similar to SYMLINKS in <bsd.links.mk>, except that these
                    703:                are installed in the 'includes' target and not the
                    704:                (much later) 'install' target.
                    705:
1.118     lukem     706: INCSNAME_<file>        The name file <file> should be installed as, if not <file>,
                    707:                same as FILESNAME_<file>, but for include files.
                    708:
                    709:
                    710: =-=-=-=-=   bsd.info.mk   =-=-=-=-=
                    711:
                    712: The include file <bsd.info.mk> is used to generate and install GNU Info
                    713: documentation from respective Texinfo source files.  It defines three
                    714: implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
                    715: following variables:
                    716:
                    717: TEXINFO                List of Texinfo source files.  Info documentation will
                    718:                consist of single files with the extension replaced by
                    719:                .info.
                    720:
                    721: INFOFLAGS      Flags to pass to makeinfo.  []
                    722:
                    723:
                    724: =-=-=-=-=   bsd.kernobj.mk   =-=-=-=-=
                    725:
                    726: The include file <bsd.kernobj.mk> defines variables related to the
                    727: location of kernel sources and object directories.
                    728:
                    729: KERNSRCDIR     Is the location of the top of the kernel src.
1.124     lukem     730:                [${_SRC_TOP_}/sys]
1.118     lukem     731:
1.124     lukem     732: KERNARCHDIR    Is the location of the machine dependent kernel sources.
                    733:                [arch/${MACHINE}]
1.120     lukem     734:
1.124     lukem     735: KERNCONFDIR    Is where the configuration files for kernels are found.
                    736:                [${KERNSRCDIR}/${KERNARCHDIR}/conf]
1.118     lukem     737:
                    738: KERNOBJDIR     Is the kernel build directory.  The kernel GENERIC for
                    739:                instance will be compiled in ${KERNOBJDIR}/GENERIC.
                    740:                The default value is
                    741:                ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
                    742:                if it exists or the target 'obj' is being made.
                    743:                Otherwise the default is
                    744:                ${KERNSRCDIR}/${KERNARCHDIR}/compile.
                    745:
                    746: It is important that Makefiles (such as those under src/distrib) that
1.134     lukem     747: wish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR}
1.118     lukem     748: rather than make assumptions about the location of the compiled kernel.
                    749:
                    750:
                    751: =-=-=-=-=   bsd.kinc.mk   =-=-=-=-=
                    752:
                    753: The include file <bsd.kinc.mk> defines the many targets (includes,
                    754: subdirectories, etc.), and is used by kernel makefiles to handle
                    755: include file installation.  It is intended to be included alone, by
1.134     lukem     756: kernel Makefiles.  It uses similar variables to <bsd.inc.mk>.
                    757: Please see <bsd.kinc.mk> for more details, and keep the documentation
                    758: in that file up to date.
1.118     lukem     759:
                    760:
                    761: =-=-=-=-=   bsd.lib.mk   =-=-=-=-=
                    762:
                    763: The include file <bsd.lib.mk> has support for building libraries.  It has
                    764: the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
                    765: includes, install, lint, and tags.  Additionally, it has a checkver target
                    766: which checks for installed shared object libraries whose version is greater
                    767: that the version of the source. It has a limited number of suffixes,
1.134     lukem     768: consistent with the current needs of the BSD tree.  <bsd.lib.mk> includes
1.118     lukem     769: <bsd.shlib.mk> to get shared library parameters.
                    770:
                    771: It sets/uses the following variables:
                    772:
                    773: LIB            The name of the library to build.
                    774:
                    775: LIBDIR         Target directory for libraries.
                    776:
                    777: SHLIBINSTALLDIR        Target directory for shared libraries if ${USE_SHLIBDIR}
1.142     lukem     778:                is not "no".
1.118     lukem     779:
1.142     lukem     780: USE_SHLIBDIR   If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR}
1.118     lukem     781:                as the path to install shared libraries to.
                    782:                USE_SHLIBDIR must be defined before <bsd.own.mk> is included.
1.130     lukem     783:                Default: no
1.118     lukem     784:
1.211     lukem     785: LIBISPRIVATE   If not "no", act as "MKDEBUGLIB=no MKLINT=no MKPIC=no
                    786:                MKPROFILE=no", and don't install the (.a) library.
1.154     lukem     787:                This is useful for "build only" helper libraries.
                    788:                Default: no
                    789:
1.118     lukem     790: LINTLIBDIR     Target directory for lint libraries.
                    791:
                    792: LIBGRP         Library group.
                    793:
                    794: LIBOWN         Library owner.
                    795:
                    796: LIBMODE                Library mode.
                    797:
                    798: LDADD          Additional loader objects.
                    799:
                    800: MAN            The manual pages to be installed (use a .1 - .9 suffix).
                    801:
                    802: NOCHECKVER_<library>
                    803: NOCHECKVER     If set, disables checking for installed shared object
                    804:                libraries with versions greater than the source.  A
                    805:                particular library name, without the "lib" prefix, may
                    806:                be appended to the variable name to disable the check for
                    807:                only that library.
                    808:
                    809: SRCS           List of source files to build the library.  Suffix types
                    810:                .s, .c, and .f are supported.  Note, .s files are preferred
                    811:                to .c files of the same name.  (This is not the default for
                    812:                versions of make.)
                    813:
1.157     lukem     814: LIBDPLIBS      A list of the tuples:
                    815:                        libname  path-to-srcdir-of-libname
                    816:
                    817:                For each tuple;
                    818:                     *  LIBDO.libname contains the .OBJDIR of the library
                    819:                        `libname', and if it is not set it is determined
                    820:                        from the srcdir and added to MAKEOVERRIDES (the
                    821:                        latter is to allow for build time optimization).
                    822:                     *  LDADD gets  -L${LIBDO.libname} -llibname    added.
                    823:                     *  DPADD gets  ${LIBDO.libname}/liblibname.so  or
                    824:                                    ${LIBDO.libname}/liblibname.a   added.
                    825:
                    826:                This variable may be used for individual libraries, as
                    827:                well as in parent directories to cache common libraries
                    828:                as a build-time optimization.
                    829:
1.118     lukem     830: The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
                    831: if it exists, as well as the include file <bsd.man.mk>.
                    832:
                    833: It has rules for building profiled objects; profiled libraries are
                    834: built by default.
                    835:
                    836: Libraries are ranlib'd when made.
                    837:
                    838:
                    839: =-=-=-=-=   bsd.links.mk   =-=-=-=-=
                    840:
                    841: The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
1.134     lukem     842: and is included from from <bsd.lib.mk> and <bsd.prog.mk>.
                    843:
                    844: LINKS          The list of hard links, consisting of pairs of paths:
                    845:                        source-file target-file
                    846:                ${DESTDIR} is prepended to both paths before linking.
                    847:                For example, to link /bin/test and /bin/[, use:
                    848:                        LINKS=/bin/test /bin/[
                    849:
1.153     lukem     850: CONFIGLINKS    Similar semantics to LINKS, except that the links
                    851:                are installed by the `configinstall' target,
                    852:                not the `install' target.
                    853:
1.134     lukem     854: SYMLINKS       The list of symbolic links, consisting of pairs of paths:
                    855:                        source-file target-file
                    856:                ${DESTDIR} is only prepended to target-file before linking.
                    857:                For example, to symlink /usr/bin/tar to /bin/tar resulting
                    858:                in ${DESTDIR}/usr/bin/tar -> /bin/tar:
                    859:                        SYMLINKS=/bin/tar /usr/bin/tar
1.118     lukem     860:
1.153     lukem     861: CONFIGSYMLINKS Similar semantics to SYMLINKS, except that the symbolic links
                    862:                are installed by the `configinstall' target,
                    863:                not the `install' target.
                    864:
1.118     lukem     865:
                    866: =-=-=-=-=   bsd.man.mk   =-=-=-=-=
                    867:
                    868: The include file <bsd.man.mk> handles installing manual pages and their
                    869: links.
                    870:
                    871: It has a two targets:
                    872:
                    873:        maninstall:
                    874:                Install the manual page sources and their links.
                    875:        catinstall:
                    876:                Install the preformatted manual pages and their links.
                    877:
                    878: It sets/uses the following variables:
                    879:
                    880: MANDIR         Base path for manual installation.
                    881:
                    882: MANGRP         Manual group.
                    883:
                    884: MANOWN         Manual owner.
                    885:
                    886: MANMODE                Manual mode.
                    887:
                    888: MANSUBDIR      Subdirectory under the manual page section, i.e. "/vax"
                    889:                or "/tahoe" for machine specific manual pages.
                    890:
                    891: MAN            The manual pages to be installed (use a .1 - .9 suffix).
                    892:
                    893: MLINKS         List of manual page links (using a .1 - .9 suffix).  The
                    894:                linked-to file must come first, the linked file second,
                    895:                and there may be multiple pairs.  The files are soft-linked.
                    896:
                    897: The include file <bsd.man.mk> includes a file named "../Makefile.inc" if
                    898: it exists.
                    899:
                    900:
                    901: =-=-=-=-=   bsd.obj.mk   =-=-=-=-=
                    902:
                    903: The include file <bsd.obj.mk> defines targets related to the creation
                    904: and use of separated object and source directories.
                    905:
                    906: If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
                    907: ${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
                    908: it exists.  Otherwise make(1) looks for the existence of a
                    909: subdirectory (or a symlink to a directory) of the source directory
                    910: into which built targets should be placed.  If an environment variable
                    911: named MAKEOBJDIR is set, make(1) uses its value as the name of the
                    912: object directory; failing that, make first looks for a subdirectory
                    913: named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
                    914:
                    915: Object directories are not created automatically by make(1) if they
                    916: don't exist; you need to run a separate "make obj".  (This will happen
                    917: during a top-level build if "MKOBJDIRS" is set to a value other than
                    918: "no").  When the source directory is a subdirectory of ${BSDSRCDIR} --
                    919: and this is determined by a simple string prefix comparison -- object
                    920: directories are created in a separate object directory tree, and a
                    921: symlink to the object directory in that tree is created in the source
                    922: directory; otherwise, "make obj" assumes that you're not in the main
                    923: source tree and that it's not safe to use a separate object tree.
                    924:
                    925: Several variables used by <bsd.obj.mk> control exactly what
                    926: directories and links get created during a "make obj":
                    927:
                    928: MAKEOBJDIR     If set, this is the component name of the object
                    929:                directory.
                    930:
                    931: OBJMACHINE     If this is set but MAKEOBJDIR is not set, creates
                    932:                object directories or links named "obj.${MACHINE}";
                    933:                otherwise, just creates ones named "obj".
                    934:
                    935: USR_OBJMACHINE  If set, and the current directory is a subdirectory of
                    936:                ${BSDSRCDIR}, create object directory in the
                    937:                corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
                    938:                otherwise, create it in the corresponding subdirectory
                    939:                of ${BSDOBJDIR}
1.113     thorpej   940:
1.118     lukem     941: BUILDID                If set, the contents of this variable are appended
                    942:                to the object directory name.  If OBJMACHINE is also
                    943:                set, ".${BUILDID}" is added after ".${MACHINE}".
1.113     thorpej   944:
1.106     thorpej   945:
1.118     lukem     946: =-=-=-=-=   bsd.prog.mk   =-=-=-=-=
1.106     thorpej   947:
1.1       cgd       948: The include file <bsd.prog.mk> handles building programs from one or
                    949: more source files, along with their manual pages.  It has a limited number
1.134     lukem     950: of suffixes, consistent with the current needs of the BSD tree.
                    951: <bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters.
1.1       cgd       952:
1.16      jtc       953: It has eight targets:
1.1       cgd       954:
                    955:        all:
1.102     thorpej   956:                build the program and its manual page.  This also
                    957:                creates a GDB initialization file (.gdbinit) in
                    958:                the objdir.  The .gdbinit file sets the shared library
                    959:                prefix to ${DESTDIR} to facilitate cross-debugging.
1.1       cgd       960:        clean:
                    961:                remove the program, any object files and the files a.out,
1.24      mikel     962:                Errs, errs, mklog, and ${PROG}.core.
1.1       cgd       963:        cleandir:
                    964:                remove all of the files removed by the target clean, as
                    965:                well as .depend, tags, and any manual pages.
1.42      lukem     966:                `distclean' is a synonym for `cleandir'.
1.1       cgd       967:        depend:
                    968:                make the dependencies for the source files, and store
                    969:                them in the file .depend.
1.16      jtc       970:        includes:
                    971:                install any header files.
1.1       cgd       972:        install:
                    973:                install the program and its manual pages; if the Makefile
                    974:                does not itself define the target install, the targets
                    975:                beforeinstall and afterinstall may also be used to cause
                    976:                actions immediately before and after the install target
                    977:                is executed.
                    978:        lint:
                    979:                run lint on the source files
                    980:        tags:
                    981:                create a tags file for the source files.
                    982:
                    983: It sets/uses the following variables:
                    984:
                    985: BINGRP         Binary group.
                    986:
                    987: BINOWN         Binary owner.
                    988:
                    989: BINMODE                Binary mode.
                    990:
                    991: CLEANFILES     Additional files to remove for the clean and cleandir targets.
                    992:
                    993: COPTS          Additional flags to the compiler when creating C objects.
1.112     thorpej   994:
1.125     lukem     995: COPTS.<fn>     Additional flags to the compiler when creating the
                    996:                C objects for <fn>.
                    997:                For <fn>.[ly], "<fn>.c" must be used.
                    998:
1.112     thorpej   999: CPUFLAGS       Additional flags to the compiler/assembler to select
                   1000:                CPU instruction set options, CPU tuning options, etc.
1.35      lukem    1001:
1.125     lukem    1002: CPUFLAGS.<fn>  Additional flags to the compiler/assembler for <fn>.
                   1003:                For <fn>.[ly], "<fn>.c" must be used.
                   1004:
1.124     lukem    1005: CPPFLAGS       Additional flags to the C pre-processor.
1.125     lukem    1006:
                   1007: CPPFLAGS.<fn>  Additional flags to the C pre-processor for <fn>.
                   1008:                For <fn>.[ly], "<fn>.c" must be used.
1.102     thorpej  1009:
                   1010: GDBINIT                List of GDB initialization files to add to "source"
                   1011:                directives in the .gdbinit file that is created in the
                   1012:                objdir.
1.1       cgd      1013:
                   1014: LDADD          Additional loader objects.  Usually used for libraries.
                   1015:                For example, to load with the compatibility and utility
                   1016:                libraries, use:
                   1017:
1.5       jtc      1018:                        LDADD+=-lutil -lcompat
1.1       cgd      1019:
1.178     lukem    1020: LDFLAGS                Additional linker flags (passed to ${CC} during link).
1.1       cgd      1021:
1.134     lukem    1022: LINKS          See <bsd.links.mk>
                   1023:
1.177     mrg      1024: OBJCOPTS       Additional flags to the compiler when creating ObjC objects.
                   1025:
                   1026: OBJCOPTS.<fn>  Additional flags to the compiler when creating the
                   1027:                ObjC objects for <fn>.
                   1028:                For <fn>.[ly], "<fn>.c" must be used.
                   1029:
1.134     lukem    1030: SYMLINKS       See <bsd.links.mk>
1.1       cgd      1031:
1.15      cgd      1032: MAN            Manual pages (should end in .1 - .9).  If no MAN variable is
1.8       cgd      1033:                defined, "MAN=${PROG}.1" is assumed.
1.1       cgd      1034:
1.214     wiz      1035: PAXCTL_FLAGS   If defined, run paxctl(1) on the program binary after link
1.212     lukem    1036:                time, with the value of this variable as args to paxctl(1).
1.193     perry    1037:
                   1038: PAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS.
                   1039:
1.1       cgd      1040: PROG           The name of the program to build.  If not supplied, nothing
                   1041:                is built.
                   1042:
1.88      thorpej  1043: PROG_CXX       If defined, the name of the program to build.  Also
                   1044:                causes <bsd.prog.mk> to link the program with the C++
                   1045:                compiler rather than the C compiler.  PROG_CXX overrides
                   1046:                the value of PROG if PROG is also set.
1.87      thorpej  1047:
1.21      christos 1048: PROGNAME       The name that the above program will be installed as, if
                   1049:                different from ${PROG}.
                   1050:
1.37      tv       1051: SRCS           List of source files to build the program.  If SRCS is not
1.1       cgd      1052:                defined, it's assumed to be ${PROG}.c.
1.108     jwise    1053:
                   1054: DPSRCS         List of source files which are needed for generating
                   1055:                dependencies, but are not needed in ${SRCS}.
1.1       cgd      1056:
                   1057: DPADD          Additional dependencies for the program.  Usually used for
                   1058:                libraries.  For example, to depend on the compatibility and
                   1059:                utility libraries use:
                   1060:
1.5       jtc      1061:                        DPADD+=${LIBCOMPAT} ${LIBUTIL}
1.1       cgd      1062:
                   1063:                The following libraries are predefined for DPADD:
                   1064:
1.21      christos 1065:                LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o
1.196     joerg    1066:                LIBARCHIVE?=    ${DESTDIR}/usr/lib/libarchive.a
1.159     lukem    1067:                LIBASN1?=       ${DESTDIR}/usr/lib/libasn1.a
1.180     gdamore  1068:                LIBBLUETOOTH?=  ${DESTDIR}/usr/lib/libbluetooth.a
1.159     lukem    1069:                LIBBSDMALLOC?=  ${DESTDIR}/usr/lib/libbsdmalloc.a
1.99      itojun   1070:                LIBBZ2?=        ${DESTDIR}/usr/lib/libbz2.a
1.21      christos 1071:                LIBC?=          ${DESTDIR}/usr/lib/libc.a
                   1072:                LIBC_PIC?=      ${DESTDIR}/usr/lib/libc_pic.a
1.99      itojun   1073:                LIBCOM_ERR?=    ${DESTDIR}/usr/lib/libcom_err.a
1.21      christos 1074:                LIBCOMPAT?=     ${DESTDIR}/usr/lib/libcompat.a
                   1075:                LIBCRYPT?=      ${DESTDIR}/usr/lib/libcrypt.a
1.99      itojun   1076:                LIBCRYPTO?=     ${DESTDIR}/usr/lib/libcrypto.a
                   1077:                LIBCRYPTO_IDEA?=${DESTDIR}/usr/lib/libcrypto_idea.a
1.105     itojun   1078:                LIBCRYPTO_MDC2?=${DESTDIR}/usr/lib/libcrypto_mdc2.a
1.99      itojun   1079:                LIBCRYPTO_RC5?= ${DESTDIR}/usr/lib/libcrypto_rc5.a
1.21      christos 1080:                LIBCURSES?=     ${DESTDIR}/usr/lib/libcurses.a
                   1081:                LIBDBM?=        ${DESTDIR}/usr/lib/libdbm.a
                   1082:                LIBDES?=        ${DESTDIR}/usr/lib/libdes.a
                   1083:                LIBEDIT?=       ${DESTDIR}/usr/lib/libedit.a
1.114     provos   1084:                LIBEVENT?=      ${DESTDIR}/usr/lib/libevent.a
1.73      blymn    1085:                LIBFORM?=       ${DESTDIR}/usr/lib/libform.a
1.21      christos 1086:                LIBGCC?=        ${DESTDIR}/usr/lib/libgcc.a
                   1087:                LIBGNUMALLOC?=  ${DESTDIR}/usr/lib/libgnumalloc.a
1.99      itojun   1088:                LIBGSSAPI?=     ${DESTDIR}/usr/lib/libgssapi.a
                   1089:                LIBHDB?=        ${DESTDIR}/usr/lib/libhdb.a
1.70      itojun   1090:                LIBINTL?=       ${DESTDIR}/usr/lib/libintl.a
1.49      itojun   1091:                LIBIPSEC?=      ${DESTDIR}/usr/lib/libipsec.a
1.99      itojun   1092:                LIBKADM5CLNT?=  ${DESTDIR}/usr/lib/libkadm5clnt.a
                   1093:                LIBKADM5SRV?=   ${DESTDIR}/usr/lib/libkadm5srv.a
                   1094:                LIBKAFS?=       ${DESTDIR}/usr/lib/libkafs.a
                   1095:                LIBKRB5?=       ${DESTDIR}/usr/lib/libkrb5.a
1.21      christos 1096:                LIBKVM?=        ${DESTDIR}/usr/lib/libkvm.a
                   1097:                LIBL?=          ${DESTDIR}/usr/lib/libl.a
1.208     lukem    1098:                LIBLBER?=       ${DESTDIR}/usr/lib/liblber.a
                   1099:                LIBLDAP?=       ${DESTDIR}/usr/lib/libldap.a
1.209     lukem    1100:                LIBLDAP_R?=     ${DESTDIR}/usr/lib/libldap_r.a
1.21      christos 1101:                LIBM?=          ${DESTDIR}/usr/lib/libm.a
1.53      blymn    1102:                LIBMENU?=       ${DESTDIR}/usr/lib/libmenu.a
1.99      itojun   1103:                LIBOBJC?=       ${DESTDIR}/usr/lib/libobjc.a
                   1104:                LIBOSSAUDIO?=   ${DESTDIR}/usr/lib/libossaudio.a
1.159     lukem    1105:                LIBPAM?=        ${DESTDIR}/usr/lib/libpam.a
1.21      christos 1106:                LIBPCAP?=       ${DESTDIR}/usr/lib/libpcap.a
1.99      itojun   1107:                LIBPCI?=        ${DESTDIR}/usr/lib/libpci.a
1.100     thorpej  1108:                LIBPMC?=        ${DESTDIR}/usr/lib/libpmc.a
1.26      kleink   1109:                LIBPOSIX?=      ${DESTDIR}/usr/lib/libposix.a
1.110     thorpej  1110:                LIBPTHREAD?=    ${DESTDIR}/usr/lib/libpthread.a
                   1111:                LIBPTHREAD_DBG?=${DESTDIR}/usr/lib/libpthread_dbg.a
1.163     christos 1112:                LIBRADIUS?=     ${DESTDIR}/usr/lib/libradius.a
1.21      christos 1113:                LIBRESOLV?=     ${DESTDIR}/usr/lib/libresolv.a
1.99      itojun   1114:                LIBRMT?=        ${DESTDIR}/usr/lib/librmt.a
                   1115:                LIBROKEN?=      ${DESTDIR}/usr/lib/libroken.a
1.21      christos 1116:                LIBRPCSVC?=     ${DESTDIR}/usr/lib/librpcsvc.a
1.110     thorpej  1117:                LIBRT?=         ${DESTDIR}/usr/lib/librt.a
1.180     gdamore  1118:                LIBSDP?=        ${DESTDIR}/usr/lib/libsdp.a
1.21      christos 1119:                LIBSKEY?=       ${DESTDIR}/usr/lib/libskey.a
1.140     lukem    1120:                LIBSL?=         ${DESTDIR}/usr/lib/libsl.a
1.99      itojun   1121:                LIBSS?=         ${DESTDIR}/usr/lib/libss.a
1.159     lukem    1122:                LIBSSH?=        ${DESTDIR}/usr/lib/libssh.a
1.99      itojun   1123:                LIBSSL?=        ${DESTDIR}/usr/lib/libssl.a
1.187     christos 1124:                LIBSSP?=        ${DESTDIR}/usr/lib/libssp.a
1.140     lukem    1125:                LIBSTDCXX?=     ${DESTDIR}/usr/lib/libstdc++.a
1.186     mrg      1126:                LIBSUPCXX?=     ${DESTDIR}/usr/lib/libsupc++.a
1.21      christos 1127:                LIBTERMCAP?=    ${DESTDIR}/usr/lib/libtermcap.a
1.99      itojun   1128:                LIBUSBHID?=     ${DESTDIR}/usr/lib/libusbhid.a
1.21      christos 1129:                LIBUTIL?=       ${DESTDIR}/usr/lib/libutil.a
                   1130:                LIBWRAP?=       ${DESTDIR}/usr/lib/libwrap.a
                   1131:                LIBY?=          ${DESTDIR}/usr/lib/liby.a
                   1132:                LIBZ?=          ${DESTDIR}/usr/lib/libz.a
1.1       cgd      1133:
                   1134: SHAREDSTRINGS  If defined, a new .c.o rule is used that results in shared
1.12      christos 1135:                strings, using xstr(1). Note that this will not work with
                   1136:                parallel makes.
1.1       cgd      1137:
1.59      jlam     1138: STRIPFLAG      The flag passed to the install program to cause the binary
1.1       cgd      1139:                to be stripped.
                   1140:
                   1141: SUBDIR         A list of subdirectories that should be built as well.
                   1142:                Each of the targets will execute the same target in the
                   1143:                subdirectories.
                   1144:
1.21      christos 1145: SCRIPTS                A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
                   1146:                These are installed exactly like programs.
                   1147:
1.166     rtr      1148: SCRIPTSDIR     The location to install the scripts.  Each script can be
                   1149:                installed to a separate path by setting SCRIPTSDIR_<script>.
                   1150:
1.21      christos 1151: SCRIPTSNAME    The name that the above program will be installed as, if
                   1152:                different from ${SCRIPTS}. These can be further specialized
                   1153:                by setting SCRIPTSNAME_<script>.
                   1154:
1.124     lukem    1155: FILES          See description of <bsd.files.mk>.
1.21      christos 1156:
1.106     thorpej  1157: SHLINKDIR      Target directory for shared linker.  See description of
                   1158:                <bsd.own.mk> for additional information about this variable.
1.130     lukem    1159:
1.1       cgd      1160: The include file <bsd.prog.mk> includes the file named "../Makefile.inc"
                   1161: if it exists, as well as the include file <bsd.man.mk>.
                   1162:
                   1163: Some simple examples:
                   1164:
                   1165: To build foo from foo.c with a manual page foo.1, use:
                   1166:
                   1167:        PROG=   foo
                   1168:
                   1169:        .include <bsd.prog.mk>
                   1170:
                   1171: To build foo from foo.c with a manual page foo.2, add the line:
                   1172:
1.9       cgd      1173:        MAN=    foo.2
1.1       cgd      1174:
                   1175: If foo does not have a manual page at all, add the line:
                   1176:
1.75      agc      1177:        MKMAN=  no
1.1       cgd      1178:
                   1179: If foo has multiple source files, add the line:
                   1180:
                   1181:        SRCS=   a.c b.c c.c d.c
                   1182:
                   1183:
1.118     lukem    1184: =-=-=-=-=   bsd.rpc.mk   =-=-=-=-=
                   1185:
                   1186: The include file <bsd.rpc.mk> contains a makefile fragment used to
                   1187: construct source files built by rpcgen.
1.72      sommerfe 1188:
1.118     lukem    1189: The following macros may be defined in makefiles which include
                   1190: <bsd.rpc.mk> in order to control which files get built and how they
                   1191: are to be built:
1.21      christos 1192:
1.118     lukem    1193: RPC_INCS:      construct .h file from .x file
1.120     lukem    1194: RPC_XDRFILES:  construct _xdr.c from .x file
1.118     lukem    1195:                (for marshalling/unmarshalling data types)
                   1196: RPC_SVCFILES:  construct _svc.c from .x file
                   1197:                (server-side stubs)
                   1198: RPC_SVCFLAGS:  Additional flags passed to builds of RPC_SVCFILES.
1.21      christos 1199:
1.118     lukem    1200: RPC_XDIR:      Directory containing .x/.h files
1.23      christos 1201:
                   1202:
1.118     lukem    1203: =-=-=-=-=   bsd.shlib.mk   =-=-=-=-=
1.21      christos 1204:
1.118     lukem    1205: The include file <bsd.shlib.mk> computes parameters for shared library
                   1206: installation and use.  It defines no targets.  <bsd.own.mk> MUST be
1.134     lukem    1207: included before <bsd.shlib.mk>.
1.21      christos 1208:
1.134     lukem    1209: <bsd.own.mk> sets the following variables, if they are not already defined
1.118     lukem    1210: (defaults are in brackets):
1.21      christos 1211:
1.142     lukem    1212: SHLIBINSTALLDIR        If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR}
                   1213:                instead of ${LIBDIR} as the base path for shared library
                   1214:                installation.  [/lib]
1.21      christos 1215:
1.118     lukem    1216: SHLIBDIR       The path to USE_SHLIBDIR shared libraries to use when building
                   1217:                a program.  [/lib for programs in /bin and /sbin, /usr/lib
                   1218:                for all others.]
1.81      wiz      1219:
1.142     lukem    1220: _LIBSODIR      Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no",
1.118     lukem    1221:                otherwise set to ${LIBDIR}
1.81      wiz      1222:
1.118     lukem    1223: SHLINKINSTALLDIR Base path for shared linker.  [/libexec]
1.39      cgd      1224:
1.118     lukem    1225: SHLINKDIR      Path to use for shared linker when building a program.
                   1226:                [/libexec for programs in /bin and /sbin, /usr/libexec for
                   1227:                all others.]
1.39      cgd      1228:
1.13      christos 1229:
1.118     lukem    1230: =-=-=-=-=   bsd.subdir.mk   =-=-=-=-=
1.13      christos 1231:
1.118     lukem    1232: The include file <bsd.subdir.mk> contains the default targets for building
1.120     lukem    1233: subdirectories.  It has the same eight targets as <bsd.prog.mk>: all,
1.118     lukem    1234: clean, cleandir, depend, includes, install, lint, and tags.  For all of
1.142     lukem    1235: the directories listed in ${SUBDIR}, the specified directory will be
                   1236: visited and the target made.  There is also a default target which allows
                   1237: the command "make subdir" where subdir is any directory listed in ${SUBDIR}.
1.47      tv       1238:
1.118     lukem    1239: As a special case, the use of a token .WAIT as an entry in SUBDIR acts
                   1240: as a synchronization barrier when multiple make jobs are run; subdirs
                   1241: before the .WAIT must complete before any subdirs after .WAIT are
                   1242: started.  See make(1) for some caveats on use of .WAIT and other
                   1243: special sources.
1.47      tv       1244:
                   1245:
1.118     lukem    1246: =-=-=-=-=   bsd.sys.mk   =-=-=-=-=
1.47      tv       1247:
1.13      christos 1248: The include file <bsd.sys.mk> is used by <bsd.prog.mk> and
1.14      cgd      1249: <bsd.lib.mk>.  It contains overrides that are used when building
1.133     lukem    1250: the NetBSD source tree.
                   1251:
                   1252: The following variables control how various files are compiled/built.
1.142     lukem    1253: (Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"):
1.133     lukem    1254:
                   1255: AR             Create, modify, and extract from archives.  [ar]
                   1256:
                   1257: ARFLAGS                Options to ${AR}.  [rl]
                   1258:
1.151     lukem    1259: AS             Assembler.  [as]
                   1260:
1.211     lukem    1261: AFLAGS         Options to ${CC} when compiling or linking .s or .S
                   1262:                assembly source files.  []
1.151     lukem    1263:
1.133     lukem    1264: CC             C compiler.  [cc]
                   1265:
                   1266: CFLAGS         Options to ${CC}.  [Usually -O or -O2]
                   1267:
                   1268: CPP            C Pre-Processor.  [cpp]
                   1269:
                   1270: CPPFLAGS       Options to ${CPP}.  []
                   1271:
1.151     lukem    1272: CPUFLAGS       Optimization flags for ${CC}.  []
1.133     lukem    1273:
                   1274: CXX            C++ compiler.  [c++]
                   1275:
                   1276: CXXFLAGS       Options to ${CXX}.  [${CFLAGS}]
                   1277:
                   1278: ELF2ECOFF      Convert ELF-format executable to ECOFF.  [elf2ecoff]
                   1279:
                   1280: FC             Fortran compiler.  [f77]
                   1281:
                   1282: FFLAGS         Options to {$FC}.  [-O]
                   1283:
                   1284: INSTALL                install(1) command.  [install]
                   1285:
                   1286: LEX            Lexical analyzer.  [lex]
                   1287:
                   1288: LFLAGS         Options to ${LEX}.  []
                   1289:
1.145     jwise    1290: LPREFIX                Symbol prefix for ${LEX} (see -P option in lex(1)) [yy]
                   1291:
1.133     lukem    1292: LD             Linker.  [ld]
                   1293:
1.178     lukem    1294: LDFLAGS                Options to ${CC} during the link process.  []
1.133     lukem    1295:
                   1296: LINT           C program verifier.  [lint]
                   1297:
1.173     perry    1298: LINTFLAGS      Options to ${LINT}.  [-chapbxzFS]
1.133     lukem    1299:
                   1300: LORDER         List dependencies for object files.  [lorder]
                   1301:
                   1302: MAKE           make(1).  [make]
                   1303:
                   1304: MKDEP          Construct Makefile dependency list.  [mkdep]
                   1305:
                   1306: NM             List symbols from object files.  [nm]
                   1307:
                   1308: PC             Pascal compiler.  [pc]  (Not present)
                   1309:
                   1310: PFLAGS         Options to ${PC}.  []
                   1311:
                   1312: OBJC           Objective C compiler.  [${CC}]
                   1313:
                   1314: OBJCFLAGS      Options to ${OBJC}.  [${CFLAGS}]
                   1315:
                   1316: OBJCOPY                Copy and translate object files.  [objcopy]
                   1317:
1.168     riz      1318: OBJDUMP                Display information from object files.  [objdump]
                   1319:
1.133     lukem    1320: RANLIB         Generate index to archive.  [ranlib]
                   1321:
                   1322: SHELL          Shell.  [sh]
                   1323:
                   1324: SIZE           List section sizes and total size.  [size]
                   1325:
                   1326: STRIP          Discard symbols from object files.  [strip]
                   1327:
                   1328: TSORT          Topological sort of a directed graph.  [tsort -q]
                   1329:
                   1330: YACC           LALR(1) parser generator.  [yacc]
                   1331:
                   1332: YFLAGS         Options to ${YACC}.  []
                   1333:
                   1334: YHEADER                If defined, add "-d" to YFLAGS, and add dependencies
                   1335:                from <file>.y to <file>.h and <file>.c, and add
                   1336:                <foo>.h to CLEANFILES.
                   1337:
                   1338: YPREFIX                If defined, add "-p ${YPREFIX}" to YFLAGS.
                   1339:
1.116     lukem    1340:
                   1341: The following variables are defined to commands to perform the
                   1342: appropriate operation, with the default in [brackets].
1.142     lukem    1343: (Note that these are overridden in <bsd.own.mk> if USETOOLS == "yes"):
1.116     lukem    1344:
                   1345: TOOL_ASN1_COMPILE      ASN1 compiler.  [asn1_compile]
                   1346:
                   1347: TOOL_CAP_MKDB          Create capability database.  [cap_mkdb]
                   1348:
                   1349: TOOL_CAT               Concatenate and print files.  [cat]
                   1350:
                   1351: TOOL_CKSUM             Display file checksums.  [cksum]
                   1352:
                   1353: TOOL_COMPILE_ET                Error table compiler.  [compile_et]
                   1354:
                   1355: TOOL_CONFIG            Build kernel compilation directories.  [config]
                   1356:
                   1357: TOOL_CRUNCHGEN         Generate crunched binary build environment.  [crunchgen]
                   1358:
                   1359: TOOL_CTAGS             Create a tags file.  [ctags]
                   1360:
                   1361: TOOL_DB                        Manipulate db(3) databases.  [db]
                   1362:
                   1363: TOOL_EQN               Format equations for groff.  [eqn]
                   1364:
                   1365: TOOL_FGEN              IEEE 1275 Open Firmware FCode Tokenizer.  [fgen]
                   1366:
1.169     thorpej  1367: TOOL_GENASSYM          Generate constants for assembly files.  [genassym]
                   1368:
1.116     lukem    1369: TOOL_GENCAT            Generate NLS message catalogs.  [gencat]
                   1370:
                   1371: TOOL_GROFF             Front end for groff document formatting system.  [groff]
                   1372:
                   1373: TOOL_HEXDUMP           Ascii, decimal, hexadecimal, octal dump.  [hexdump]
                   1374:
                   1375: TOOL_INDXBIB           Make bibliographic database's inverted index.  [indxbib]
                   1376:
                   1377: TOOL_INSTALLBOOT       Install disk bootstrap software.  [installboot]
                   1378:
                   1379: TOOL_INSTALL_INFO      Update info/dir entries.  [install-info]
                   1380:
1.192     apb      1381: TOOL_JOIN              Relational database operator.  [join]
                   1382:
1.116     lukem    1383: TOOL_M4                        M4 macro language processor.  [m4]
                   1384:
                   1385: TOOL_MAKEFS            Create file system image from directory tree.  [makefs]
                   1386:
                   1387: TOOL_MAKEINFO          Translate Texinfo documents.  [makeinfo]
                   1388:
                   1389: TOOL_MAKEWHATIS                Create a whatis.db database.  [makewhatis]
                   1390:
                   1391: TOOL_MDSETIMAGE                Set kernel RAM disk image.  [mdsetimage]
                   1392:
                   1393: TOOL_MENUC             Menu compiler.  [menuc]
                   1394:
                   1395: TOOL_MKCSMAPPER                Make charset mapping table.  [mkcsmapper]
                   1396:
                   1397: TOOL_MKESDB            Make encoding scheme database.  [mkesdb]
                   1398:
                   1399: TOOL_MKLOCALE          Make LC_CTYPE locale files.  [mklocale]
                   1400:
                   1401: TOOL_MKMAGIC           Create database for file(1).  [file]
                   1402:
                   1403: TOOL_MKTEMP            Make (unique) temporary file name.  [mktemp]
                   1404:
                   1405: TOOL_MSGC              Simple message list compiler.  [msgc]
                   1406:
                   1407: TOOL_MTREE             Map a directory hierarchy.  [mtree]
                   1408:
                   1409: TOOL_PAX               Manipulate file archives and copy directories.  [pax]
                   1410:
                   1411: TOOL_PIC               Compile pictures for groff.  [pic]
                   1412:
1.205     garbled  1413: TOOL_POWERPCMKBOOTIMAGE        powerpc-mkbootimage (XXXBUILDSH).  [powerpc-mkbootimage]
1.116     lukem    1414:
                   1415: TOOL_PWD_MKDB          Generate the password databases.  [pwd_mkdb]
                   1416:
                   1417: TOOL_REFER             Preprocess bibliographic references for groff.  [refer]
                   1418:
                   1419: TOOL_ROFF_ASCII                Generate ASCII groff output.  [nroff]
                   1420:
                   1421: TOOL_ROFF_DVI          Generate DVI groff output.  [${TOOL_GROFF} -Tdvi]
                   1422:
                   1423: TOOL_ROFF_HTML         Generate HTML groff output.
1.119     lukem    1424:                        [${TOOL_GROFF} -Tlatin1 -mdoc2html]
1.116     lukem    1425:
                   1426: TOOL_ROFF_PS           Generate PS groff output.  [${TOOL_GROFF} -Tps]
                   1427:
                   1428: TOOL_ROFF_RAW          Generate "raw" groff output.  [${TOOL_GROFF} -Z]
                   1429:
                   1430: TOOL_RPCGEN            Remote Procedure Call (RPC) protocol compiler.  [rpcgen]
                   1431:
                   1432: TOOL_SOELIM            Eliminate .so's from groff input.  [soelim]
1.123     lukem    1433:
                   1434: TOOL_STAT              Display file status.  [stat]
1.116     lukem    1435:
                   1436: TOOL_SUNLABEL          Read or modify a SunOS disk label.  [sunlabel]
                   1437:
                   1438: TOOL_TBL               Format tables for groff.  [tbl]
                   1439:
                   1440: TOOL_UUDECODE          Uudecode a binary file.  [uudecode]
                   1441:
                   1442: TOOL_VGRIND            Grind nice listings of programs.  [vgrind -f]
                   1443:
                   1444: TOOL_ZIC               Time zone compiler.  [zic]
                   1445:
1.69      sommerfe 1446:
                   1447: Other variables of note (incomplete list):
                   1448:
1.213     lukem    1449: NOGCCERROR     If defined, prevents passing certain ${CFLAGS} to GCC
                   1450:                that cause warnings to be fatal, such as:
                   1451:                        -Werror -Wa,--fatal-warnings
                   1452:                (The latter being for as(1).)
1.212     lukem    1453:
                   1454: WARNS          Crank up GCC warning options; the distinct levels are:
1.82      lukem    1455:                        WARNS=1
                   1456:                        WARNS=2
                   1457:                        WARNS=3
1.164     matt     1458:                        WARNS=4
1.69      sommerfe 1459:
1.144     lukem    1460: =-=-=-=-=   bsd.x11.mk   =-=-=-=-=
                   1461:
                   1462: The include file <bsd.x11.mk> contains parameters and targets for
                   1463: cross-building X11R6 from ${X11SRCDIR.xc}.
                   1464: It should be included after the general Makefile contents but before
                   1465: the include files such as <bsd.prog.mk> and <bsd.lib.mk>.
                   1466:
                   1467: It provides the following targets:
                   1468:        .man.1 .man.3 .man.4 .man.5 .man.7:
                   1469:                If ${MAN} or ${PROG} is set and ${MKMAN} != "no",
                   1470:                these rules convert from X11R6's manual page source
                   1471:                into an mdoc.old source file.
                   1472:        cleanx11man:
                   1473:                Clean up the mdoc.old files generated by the above.
                   1474:
                   1475: It sets the following variables:
                   1476:
                   1477: BINDIR                 Set to ${X11BINDIR}.
                   1478:                        To override, define after including <bsd.x11.mk>
                   1479:
                   1480: LIBDIR                 Set to ${X11USRLIBDIR}.
                   1481:                        To override, define after including <bsd.x11.mk>
                   1482:
                   1483: MANDIR                 Set to ${X11MANDIR}.
                   1484:                        To override, define after including <bsd.x11.mk>
                   1485:
                   1486: CPPFLAGS               Appended with definitions to include from
                   1487:                        ${DESTDIR}${X11INCDIR}
                   1488:
                   1489: LDFLAGS                        Appended with definitions to link from
                   1490:                        ${DESTDIR}${X11USRLIBDIR}
                   1491:
                   1492: X11FLAGS.CONNECTION    Equivalent to X11R6's CONNECTION_FLAGS.
                   1493:
                   1494: X11FLAGS.EXTENSION     Equivalent to X11R6's EXT_DEFINES.
                   1495:
                   1496: X11FLAGS.LOADABLE      Equivalent to X11R6's LOADABLE.
                   1497:
                   1498: X11FLAGS.OS_DEFINES    Equivalent to X11R6's OS_DEFINES.
                   1499:
                   1500: X11FLAGS.SERVER                Equivalent to X11R6's ServerDefines.
                   1501:
                   1502: X11FLAGS.THREADLIB     Equivalent to X11R6's THREADS_DEFINES for libraries.
                   1503:
                   1504: X11FLAGS.THREADS       Equivalent to X11R6's THREADS_DEFINES.
                   1505:
                   1506: X11FLAGS.VERSION       cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION.
                   1507:
                   1508: X11TOOL_UNXCOMM                Commandline to convert `XCOMM' comments to `#'
                   1509:
                   1510: It uses the following variables:
                   1511:
                   1512: APPDEFS                        List of app-default files to install.
                   1513:
                   1514: CPPSCRIPTS             List of files/scripts to run through cpp(1)
                   1515:                        and then ${X11TOOL_UNXCOMM}.  The source files
                   1516:                        have a `.cpp' suffix, the generated files do not.
                   1517:
                   1518: CPPSCRIPTFLAGS         Additional flags to cpp(1) when building CPPSCRIPTS.
                   1519:
                   1520: CPPSCRIPTFLAGS_<fn>    Additional flags to cpp(1) when building CPPSCRIPT <fn>.
                   1521:
                   1522:
1.30      agc      1523: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

CVSweb <webmaster@jp.NetBSD.org>