1# $NetBSD: bsd.README,v 1.64 2000/06/23 06:11:05 thorpej Exp $ 2# @(#)bsd.README 8.2 (Berkeley) 4/2/94 3 4This is the README file for the new make "include" files for the BSD 5source tree. The files are installed in /usr/share/mk, and are, by 6convention, named with the suffix ".mk". 7 8Note, this file is not intended to replace reading through the .mk 9files for anything tricky. 10 11=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 12 13RANDOM THINGS WORTH KNOWING: 14 15The files are simply C-style #include files, and pretty much behave like 16you'd expect. The syntax is slightly different in that a single '.' is 17used instead of the hash mark, i.e. ".include <bsd.prog.mk>". 18 19One difference that will save you lots of debugging time is that inclusion 20of the file is normally done at the *end* of the Makefile. The reason for 21this is because .mk files often modify variables and behavior based on the 22values of variables set in the Makefile. To make this work, remember that 23the 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 30the command "make a" will echo "a". To make things confusing, the SECOND 31variable 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 39the command "make b" will echo "bar". This is for compatibility with the 40way the V7 make behaved. 41 42It's fairly difficult to make the BSD .mk files work when you're building 43multiple programs in a single directory. It's a lot easier split up the 44programs than to deal with the problem. Most of the agony comes from making 45the "obj" directory stuff work right, not because we switched to a new version 46of make. So, don't get mad at us, figure out a better way to handle multiple 47architectures so we can quit using the symbolic link stuff. (Imake doesn't 48count.) 49 50The file .depend in the source directory is expected to contain dependencies 51for the source files. This file is read automatically by make after reading 52the Makefile. 53 54The variable DESTDIR works as before. It's not set anywhere but will change 55the tree where the file gets installed. 56 57The profiled libraries are no longer built in a different directory than 58the regular libraries. A new suffix, ".po", is used to denote a profiled 59object, and ".so" denotes a shared (position-independent) object. 60 61The following variables that control how things are made/installed that 62are not set by default. These should not be set by Makefiles; they're for 63the user to define in MAKECONF (see bsd.own.mk, below) or on the make(1) 64command line: 65 66BUILD If defined, 'make install' checks that the targets in the 67 source directories are up-to-date and remakes them if they 68 are out of date, instead of blindly trying to install 69 out of date or non-existant targets. 70 71UPDATE If defined, 'make install' only installs targets that are 72 more recently modified in the source directories that their 73 installed counterparts. 74 75UNPRIVILEGED If defined, don't set the owner/group/mode when installing 76 files or directories. This allows a non-root "make install". 77 78MKCATPAGES If "no", don't build or install the catman pages. 79 80MKDOC If "no", don't build or install the documentation. 81 82MKINFO If "no", don't build or install Info documentation from 83 Texinfo source files. 84 85MKLINT If "no", don't build or install the lint libraries. 86 87MKMAN If "no", don't build or install the man or catman pages. 88 Also acts as "MKCATPAGES=no" 89 90MKNLS If "no", don't build or install the NLS files. 91 92MKOBJ If "no", don't enable the rule which creates objdirs. 93 "yes" by default. 94 95MKOBJDIRS If "no", don't create objdirs during a "make build". 96 "no" by default. 97 98MKPIC If "no", don't build or install shared libraries. 99 100MKPICINSTALL If "no", don't install the *_pic.a libraries. 101 102MKPROFILE If "no", don't build or install the profiling libraries. 103 104MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKINFO=no MKMAN=no 105 MKNLS=no". I.e, don't build catman pages, documentation, 106 Info documentation, man pages, NLS files, ... 107 108=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 109 110The include file <sys.mk> has the default rules for all makes, in the BSD 111environment or otherwise. You probably don't want to touch this file. 112 113=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 114 115The include file <bsd.man.mk> handles installing manual pages and their 116links. 117 118It has a two targets: 119 120 maninstall: 121 Install the manual page sources and their links. 122 catinstall: 123 Install the preformatted manual pages and their links. 124 125It sets/uses the following variables: 126 127MANDIR Base path for manual installation. 128 129MANGRP Manual group. 130 131MANOWN Manual owner. 132 133MANMODE Manual mode. 134 135MANSUBDIR Subdirectory under the manual page section, i.e. "/vax" 136 or "/tahoe" for machine specific manual pages. 137 138MAN The manual pages to be installed (use a .1 - .9 suffix). 139 140MLINKS List of manual page links (using a .1 - .9 suffix). The 141 linked-to file must come first, the linked file second, 142 and there may be multiple pairs. The files are soft-linked. 143 144The include file <bsd.man.mk> includes a file named "../Makefile.inc" if 145it exists. 146 147=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 148 149The include file <bsd.own.mk> contains source tree configuration parameters, 150such as the owners, groups, etc. for both manual pages and binaries, and 151a few global "feature configuration" parameters. 152 153It has no targets. 154 155To get system-specific configuration parameters, bsd.own.mk will try to 156include the file specified by the "MAKECONF" variable. If MAKECONF is not 157set, or no such file exists, the system make configuration file, /etc/mk.conf 158is included. These files may define any of the variables described below. 159 160bsd.own.mk sets the following variables, if they are not already defined 161(defaults are in brackets): 162 163BSDSRCDIR The real path to the system sources, so that 'make obj' 164 will work correctly. [/usr/src] 165 166BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj' 167 will work correctly. [/usr/obj] 168 169BINGRP Binary group. [wheel] 170 171BINOWN Binary owner. [root] 172 173BINMODE Binary mode. [555] 174 175NONBINMODE Mode for non-executable files. [444] 176 177MANDIR Base path for manual installation. [/usr/share/man/cat] 178 179MANGRP Manual group. [wheel] 180 181MANOWN Manual owner. [root] 182 183MANMODE Manual mode. [${NONBINMODE}] 184 185MANINSTALL Manual installation type: maninstall, catinstall, or both 186 187LIBDIR Base path for library installation. [/usr/lib] 188 189LINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint] 190 191LIBGRP Library group. [${BINGRP}] 192 193LIBOWN Library owner. [${BINOWN}] 194 195LIBMODE Library mode. [${NONBINMODE}] 196 197DOCDIR Base path for system documentation (e.g. PSD, USD, etc.) 198 installation. [/usr/share/doc] 199 200HTMLDOCDIR Base path for html system documentation installation. 201 [/usr/share/doc/html] 202 203DOCGRP Documentation group. [wheel] 204 205DOCOWN Documentation owner. [root] 206 207DOCMODE Documentation mode. [${NONBINMODE}] 208 209NLSDIR Base path for National Language Support files installation. 210 [/usr/share/nls] 211 212NLSGRP National Language Support files group. [wheel] 213 214NLSOWN National Language Support files owner. [root] 215 216NLSMODE National Language Support files mode. [${NONBINMODE}] 217 218STRIPFLAG The flag passed to the install program to cause the binary 219 to be stripped. This is to be used when building your 220 own install script so that the entire system can be made 221 stripped/not-stripped using a single knob. [-s] 222 223COPY The flag passed to the install program to cause the binary 224 to be copied rather than moved. This is to be used when 225 building our own install script so that the entire system 226 can either be installed with copies, or with moves using 227 a single knob. [-c] 228 229Additionally, the following variables may be set by bsd.own.mk or in a 230make configuration file to modify the behaviour of the system build 231process (default values are in brackets along with comments, if set by 232bsd.own.mk): 233 234MKCRYPTO If set to "no", no cryptography support will be built 235 into the system. Defaults to "yes". 236 237NOCRYPTO If set, it is equivalent to setting MKCRYPTO to "no". 238 239MKCRYPTO_RSA If set to "no", RSA support will not be built into 240 the system's cryptography libraries. This implies 241 that SSLv2 support will not be present. Defaults to "yes". 242 243NOCRYPTO_RSA If set, it is equivalent to setting MKCRYPTO_RSA to "no". 244 245MKCRYPTO_IDEA If set to "no", IDEA support will not be built into 246 the system's cryptography libraries. Defaults to "yes". 247 248NOCRYPTO_IDEA If set, it is equivalent to setting MKCRYPTO_IDEA to "no". 249 250MKCRYPTO_RC5 If set to "no", RC5 support will not be built into 251 the system's cryptography libraries. Defaults to "yes". 252 253NOCRYPTO_RC5 If set, it is equivalent to setting MKCRYPTO_RC5 to "no". 254 255MKKERBEROS If set to "no", disables building Kerberos (v4 or v5) 256 support into various system utilities that support it. 257 Defaults to "yes". NOTE: This does not affect the 258 building of the Kerberos libraries or infrastructure 259 programs themselves. To completely disable Kerberos, 260 set MKCRYPTO to "no". 261 262NOKERBEROS If set, it is equivalent to setting MKKERBEROS to "no". 263 264SKEY Compile in support for S/key authentication. [yes, set 265 unconditionally] 266 267MANZ Compress manual pages at installation time. 268 269SYS_INCLUDE Copy or symlink kernel include files into /usr/include. 270 Possible values are "symlinks" or "copies" (which is 271 the same as the variable being unset). 272 273NOPROFILE Do not build profiled versions of system libraries 274 275NOPIC Do not build PIC versions of system libraries, and 276 do not build shared libraries. [set if ${MACHINE_ARCH} 277 is "sparc64", unset otherwise.] 278 279NOLINT Do not build lint libraries. 280 281OBJECT_FMT Object file format. [set to "ELF" on architectures that 282 use ELF -- currently if ${MACHINE_ARCH} is "alpha", 283 "mipsel", "mipseb", "powerpc", "sparc", "sparc64", 284 and "i386", or set to "a.out" on other architectures]. 285 286 287bsd.own.mk is generally useful when building your own Makefiles so that 288they use the same default owners etc. as the rest of the tree. 289 290=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 291 292The include file <bsd.prog.mk> handles building programs from one or 293more source files, along with their manual pages. It has a limited number 294of suffixes, consistent with the current needs of the BSD tree. 295 296It has eight targets: 297 298 all: 299 build the program and its manual page 300 clean: 301 remove the program, any object files and the files a.out, 302 Errs, errs, mklog, and ${PROG}.core. 303 cleandir: 304 remove all of the files removed by the target clean, as 305 well as .depend, tags, and any manual pages. 306 `distclean' is a synonym for `cleandir'. 307 depend: 308 make the dependencies for the source files, and store 309 them in the file .depend. 310 includes: 311 install any header files. 312 install: 313 install the program and its manual pages; if the Makefile 314 does not itself define the target install, the targets 315 beforeinstall and afterinstall may also be used to cause 316 actions immediately before and after the install target 317 is executed. 318 lint: 319 run lint on the source files 320 tags: 321 create a tags file for the source files. 322 323It sets/uses the following variables: 324 325BINGRP Binary group. 326 327BINOWN Binary owner. 328 329BINMODE Binary mode. 330 331CLEANFILES Additional files to remove for the clean and cleandir targets. 332 333COPTS Additional flags to the compiler when creating C objects. 334 335CPPFLAGS Additional flags to the C pre-processor 336 337LDADD Additional loader objects. Usually used for libraries. 338 For example, to load with the compatibility and utility 339 libraries, use: 340 341 LDADD+=-lutil -lcompat 342 343LDFLAGS Additional loader flags. 344 345LINKS The list of binary links; should be full pathnames, the 346 linked-to file coming first, followed by the linked 347 file. The files are hard-linked. For example, to link 348 /bin/test and /bin/[, use: 349 350 LINKS= ${DESTDIR}/bin/test ${DESTDIR}/bin/[ 351 352SYMLINKS The list of symbolic links; should be full pathnames. 353 Syntax is identical to LINKS. Note that DESTDIR is not 354 automatically included in the link. 355 356MAN Manual pages (should end in .1 - .9). If no MAN variable is 357 defined, "MAN=${PROG}.1" is assumed. 358 359PROG The name of the program to build. If not supplied, nothing 360 is built. 361 362PROGNAME The name that the above program will be installed as, if 363 different from ${PROG}. 364 365SRCS List of source files to build the program. If SRCS is not 366 defined, it's assumed to be ${PROG}.c. 367 368DPADD Additional dependencies for the program. Usually used for 369 libraries. For example, to depend on the compatibility and 370 utility libraries use: 371 372 DPADD+=${LIBCOMPAT} ${LIBUTIL} 373 374 The following libraries are predefined for DPADD: 375 376 LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o 377 LIBC?= ${DESTDIR}/usr/lib/libc.a 378 LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a 379 LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a 380 LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a 381 LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a 382 LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a 383 LIBDES?= ${DESTDIR}/usr/lib/libdes.a 384 LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a 385 LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a 386 LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a 387 LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a 388 LIBKDB?= ${DESTDIR}/usr/lib/libkdb.a 389 LIBKRB?= ${DESTDIR}/usr/lib/libkrb.a 390 LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a 391 LIBL?= ${DESTDIR}/usr/lib/libl.a 392 LIBM?= ${DESTDIR}/usr/lib/libm.a 393 LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a 394 LIBMP?= ${DESTDIR}/usr/lib/libmp.a 395 LIBNTP?= ${DESTDIR}/usr/lib/libntp.a 396 LIBPC?= ${DESTDIR}/usr/lib/libpc.a 397 LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a 398 LIBPLOT?= ${DESTDIR}/usr/lib/libplot.a 399 LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a 400 LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a 401 LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a 402 LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a 403 LIBTERMCAP?= ${DESTDIR}/usr/lib/libtermcap.a 404 LIBTELNET?= ${DESTDIR}/usr/lib/libtelnet.a 405 LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a 406 LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a 407 LIBY?= ${DESTDIR}/usr/lib/liby.a 408 LIBZ?= ${DESTDIR}/usr/lib/libz.a 409 410 411SHAREDSTRINGS If defined, a new .c.o rule is used that results in shared 412 strings, using xstr(1). Note that this will not work with 413 parallel makes. 414 415STRIPFLAG The flag passed to the install program to cause the binary 416 to be stripped. 417 418SUBDIR A list of subdirectories that should be built as well. 419 Each of the targets will execute the same target in the 420 subdirectories. 421 422SCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}]. 423 These are installed exactly like programs. 424 425SCRIPTSNAME The name that the above program will be installed as, if 426 different from ${SCRIPTS}. These can be further specialized 427 by setting SCRIPTSNAME_<script>. 428 429FILES A list of files to install. The installation is controlled 430 by the FILESNAME, FILESOWN, FILESGRP, FILESMODE, FILESDIR 431 variables that can be further specialized by FILES<VAR>_<file> 432 433The include file <bsd.prog.mk> includes the file named "../Makefile.inc" 434if it exists, as well as the include file <bsd.man.mk>. 435 436Some simple examples: 437 438To build foo from foo.c with a manual page foo.1, use: 439 440 PROG= foo 441 442 .include <bsd.prog.mk> 443 444To build foo from foo.c with a manual page foo.2, add the line: 445 446 MAN= foo.2 447 448If foo does not have a manual page at all, add the line: 449 450 NOMAN= noman 451 452If foo has multiple source files, add the line: 453 454 SRCS= a.c b.c c.c d.c 455 456=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 457 458The include file <bsd.subdir.mk> contains the default targets for building 459subdirectories. It has the same eight targets as <bsd.prog.mk>: all, 460clean, cleandir, depend, includes, install, lint, and tags. For all of 461the directories listed in the variable SUBDIRS, the specified directory 462will be visited and the target made. There is also a default target which 463allows the command "make subdir" where subdir is any directory listed in 464the variable SUBDIRS. 465 466=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 467 468The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables 469and is included from from bsd.lib.mk and bsd.prog.mk. 470 471=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 472 473The include file <bsd.files.mk> handles the FILES variables and is included 474from bsd.lib.mk and bsd.prog.mk. 475 476=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 477 478The include file <bsd.inc.mk> defines the includes target and uses two 479variables: 480 481INCS The list of include files 482 483INCSDIR The location to install the include files. 484 485=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 486 487The include file <bsd.kinc.mk> defines the many targets (includes, 488subdirectories, etc.), and is used by kernel makefiles to handle 489include file installation. It is intended to be included alone, by 490kernel Makefiles. Please see bsd.kinc.mk for more details, and keep 491the documentation in that file up to date. 492 493=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 494 495The include file <bsd.info.mk> is used to generate and install GNU Info 496documentation from respective Texinfo source files. It defines three 497implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the 498following variables: 499 500TEXINFO List of Texinfo source files. Info documentation will 501 consist of single files with the extension replaced by 502 .info. 503 504INFOFLAGS Flags to pass to makeinfo. [] 505 506INSTALL_INFO Name of install-info program. [install-info] 507 508MAKEINFO Name of makeinfo program. [makeinfo] 509 510=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 511 512The include file <bsd.sys.mk> is used by <bsd.prog.mk> and 513<bsd.lib.mk>. It contains overrides that are used when building 514the NetBSD source tree. For instance, if "PARALLEL" is defined by 515the program/library Makefile, it includes a set of rules for lex and 516yacc that allow multiple lex and yacc targets to be built in parallel. 517 518=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 519 520The include file <bsd.lib.mk> has support for building libraries. It has 521the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend, 522includes, install, lint, and tags. Additionally, it has a checkver target 523which checks for installed shared object libraries whose version is greater 524that the version of the source. It has a limited number of suffixes, 525consistent with the current needs of the BSD tree. 526 527It sets/uses the following variables: 528 529LIB The name of the library to build. 530 531LIBDIR Target directory for libraries. 532 533LINTLIBDIR Target directory for lint libraries. 534 535LIBGRP Library group. 536 537LIBOWN Library owner. 538 539LIBMODE Library mode. 540 541LDADD Additional loader objects. 542 543MAN The manual pages to be installed (use a .1 - .9 suffix). 544 545MKLINKLIB If "no", act as "MKPICINSTALL=no MKPROFILE=no". 546 Also: 547 - don't install the .a libraries 548 - don't install _pic.a libraries on PIC systems 549 - don't build .a libraries on PIC systems 550 - don't install the .so symlink on ELF systems 551 I.e, only install the shared library (and the .so.major 552 symlink on ELF). 553 554MKPICLIB If "no", don't build _pic.a libraries, and build the 555 shared object libraries from the .a libraries. A 556 symlink is installed in ${DESTDIR}/usr/lib for the 557 _pic.a library pointing to the .a library. 558 559NOCHECKVER_<library> 560NOCHECKVER If set, disables checking for installed shared object 561 libraries with versions greater than the source. A 562 particular library name, without the "lib" prefix, may 563 be appended to the variable name to disable the check for 564 only that library. 565 566SRCS List of source files to build the library. Suffix types 567 .s, .c, and .f are supported. Note, .s files are preferred 568 to .c files of the same name. (This is not the default for 569 versions of make.) 570 571The include file <bsd.lib.mk> includes the file named "../Makefile.inc" 572if it exists, as well as the include file <bsd.man.mk>. 573 574It has rules for building profiled objects; profiled libraries are 575built by default. 576 577Libraries are ranlib'd when made. 578 579=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 580 581The include file <bsd.obj.mk> defines targets related to the creation 582and use of separated object and source directories. 583 584If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses 585${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if 586it exists. Otherwise make(1) looks for the existance of a 587subdirectory (or a symlink to a directory) of the source directory 588into which built targets should be placed. If an environment variable 589named MAKEOBJDIR is set, make(1) uses its value as the name of the 590object directory; failing that, make first looks for a subdirectory 591named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj". 592 593Object directories are not created automatically by make(1) if they 594don't exist; you need to run a separate "make obj". (This will happen 595during a top-level build if "MKOBJDIRS" is set to a value other than 596"no"). When the source directory is a subdirectory of ${BSDSRCDIR} -- 597and this is determined by a simple string prefix comparison -- object 598directories are created in a separate object directory tree, and a 599symlink to the object directory in that tree is created in the source 600directory; otherwise, "make obj" assumes that you're not in the main 601source tree and that it's not safe to use a separate object tree. 602 603Several variables used by <bsd.obj.mk> control exactly what 604directories and links get created during a "make obj": 605 606MAKEOBJDIR If set, this is the component name of the object 607 directory. 608 609OBJMACHINE If this is set but MAKEOBJDIR is not set, creates 610 object directories or links named "obj.${MACHINE}"; 611 otherwise, just creates ones named "obj". 612 613USR_OBJMACHINE If set, and the current directory is a subdirectory of 614 ${BSDSRCDIR}, create object directory in the 615 corresponding subdirectory of ${BSDOBJDIR}.${MACHINE}; 616 otherwise, create it in the corresponding subdirectory 617 of ${BSDOBJDIR} 618 619=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 620 621The include file <bsd.kernobj.mk> defines variables related to the 622location of kernel sources and object directories. 623 624KERNSRCDIR Is the location of the top of the kernel src. 625 It defaults to ${BSDSRCDIR}/sys, but the top-level 626 Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the 627 absolute path to the directory where the top-level 628 Makefile.inc was found. 629 630KERNARCHDIR Is the location of the machine dependent kernel 631 sources. It defaults to arch/${MACHINE} 632 633KERNCONFDIR Is where the configuration files for kernels are 634 found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf. 635 636KERNOBJDIR Is the kernel build directory. The kernel GENERIC for 637 instance will be compiled in ${KERNOBJDIR}/GENERIC. 638 The default value is 639 ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile 640 if it exists or the target 'obj' is being made. 641 Otherwise the default is 642 ${KERNSRCDIR}/${KERNARCHDIR}/compile. 643 644It is important that Makefiles (such as those under src/distrib) that 645wish to find compiled kernels use bsd.kernobj.mk and ${KERNOBJDIR} 646rather than make assumptions about the location of the compiled kernel. 647 648=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 649