| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: bsd.README,v 1.300 2012/08/23 21:21:16 joerg Exp $ | | 1 | # $NetBSD: bsd.README,v 1.301 2012/09/20 15:48:54 abs Exp $ |
2 | # @(#)bsd.README 8.2 (Berkeley) 4/2/94 | | 2 | # @(#)bsd.README 8.2 (Berkeley) 4/2/94 |
3 | | | 3 | |
4 | This is the README file for the make "include" files for the NetBSD | | 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, | | 5 | source tree. The files are installed in /usr/share/mk, and are, |
6 | by convention, named with the suffix ".mk". | | 6 | by convention, named with the suffix ".mk". |
7 | | | 7 | |
8 | Note, this file is not intended to replace reading through the .mk | | 8 | Note, this file is not intended to replace reading through the .mk |
9 | files for anything tricky. | | 9 | files for anything tricky. |
10 | | | 10 | |
11 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | | 11 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
12 | | | 12 | |
13 | RANDOM THINGS WORTH KNOWING: | | 13 | RANDOM THINGS WORTH KNOWING: |
14 | | | 14 | |
| @@ -273,27 +273,27 @@ MKOBJDIRS If "no", don't create objdirs | | | @@ -273,27 +273,27 @@ MKOBJDIRS If "no", don't create objdirs |
273 | MKPAM If "no", disables building of PAM authentication | | 273 | MKPAM If "no", disables building of PAM authentication |
274 | infrastructure (libraries and support programs). | | 274 | infrastructure (libraries and support programs). |
275 | Default: yes | | 275 | Default: yes |
276 | | | 276 | |
277 | MKPCC If "no", don't build pcc(1) or any of the PCC-related | | 277 | MKPCC If "no", don't build pcc(1) or any of the PCC-related |
278 | libraries (libpcc, libpccsoftfloat). | | 278 | libraries (libpcc, libpccsoftfloat). |
279 | Default: no | | 279 | Default: no |
280 | | | 280 | |
281 | MKPF If "no", don't build or install the pf programs and LKM. | | 281 | MKPF If "no", don't build or install the pf programs and LKM. |
282 | Default: yes | | 282 | Default: yes |
283 | | | 283 | |
284 | MKPIC If "no", don't build or install shared libraries, and | | 284 | MKPIC If "no", don't build or install shared libraries, and |
285 | also acts as "MKPICLIB=no" | | 285 | also acts as "MKPICLIB=no" |
286 | Default: yes (for MACHINE_ARCHs that support it) | | 286 | Default: yes (for MACHINE_ARCHs that support it) |
287 | | | 287 | |
288 | MKPICINSTALL If "no", don't install the *_pic.a libraries. | | 288 | MKPICINSTALL If "no", don't install the *_pic.a libraries. |
289 | Default: yes | | 289 | Default: yes |
290 | | | 290 | |
291 | MKPICLIB If "no", don't build *_pic.a libraries, and build the | | 291 | MKPICLIB If "no", don't build *_pic.a libraries, and build the |
292 | shared object libraries from the .a libraries. | | 292 | shared object libraries from the .a libraries. |
293 | A symlink is installed in ${DESTDIR}/usr/lib for the | | 293 | A symlink is installed in ${DESTDIR}/usr/lib for the |
294 | _pic.a library pointing to the .a library. | | 294 | _pic.a library pointing to the .a library. |
295 | Default: yes | | 295 | Default: yes |
296 | | | 296 | |
297 | MKPIE If "no", create regular executables. Otherwise create | | 297 | MKPIE If "no", create regular executables. Otherwise create |
298 | PIE (Position Independent Executables). | | 298 | PIE (Position Independent Executables). |
299 | Default: no | | 299 | Default: no |
| @@ -347,28 +347,28 @@ MKX11 If not "no", depending on the val | | | @@ -347,28 +347,28 @@ MKX11 If not "no", depending on the val |
347 | src/external/mit/xorg (modular Xorg) to cross-build X11 and | | 347 | src/external/mit/xorg (modular Xorg) to cross-build X11 and |
348 | automatically enables creation of X sets. | | 348 | automatically enables creation of X sets. |
349 | Default: no | | 349 | Default: no |
350 | | | 350 | |
351 | MKX11FONTS If not "no", if ${X11FLAVOUR} is "Xorg", do not build or | | 351 | MKX11FONTS If not "no", if ${X11FLAVOUR} is "Xorg", do not build or |
352 | install the X fonts. The xfont set is still created but | | 352 | install the X fonts. The xfont set is still created but |
353 | will be empty. | | 353 | will be empty. |
354 | Default: yes | | 354 | Default: yes |
355 | | | 355 | |
356 | MKYP If "no", disables building of YP (NIS) | | 356 | MKYP If "no", disables building of YP (NIS) |
357 | infrastructure (libraries and support programs). | | 357 | infrastructure (libraries and support programs). |
358 | Default: yes | | 358 | Default: yes |
359 | | | 359 | |
360 | MKZFS If "no", do not build and install utilities and libraries | | 360 | MKZFS If "no", do not build and install utilities and libraries |
361 | used to manage ZFS file system. Do not build zfs and solaris | | 361 | used to manage ZFS file system. Do not build zfs and solaris |
362 | compatibility kernel modules. | | 362 | compatibility kernel modules. |
363 | Default: yes on i386/amd64, no elsewhere. | | 363 | Default: yes on i386/amd64, no elsewhere. |
364 | | | 364 | |
365 | MKRUMP If "no", do not build and install rump related headers, | | 365 | MKRUMP If "no", do not build and install rump related headers, |
366 | libraries, and programs. | | 366 | libraries, and programs. |
367 | Default: yes | | 367 | Default: yes |
368 | | | 368 | |
369 | USE_HESIOD If "no", disables building Hesiod support into | | 369 | USE_HESIOD If "no", disables building Hesiod support into |
370 | various system utilities/libraries that support it. | | 370 | various system utilities/libraries that support it. |
371 | If ${MKHESIOD} is "no", USE_HESIOD will also be | | 371 | If ${MKHESIOD} is "no", USE_HESIOD will also be |
372 | forced to "no". | | 372 | forced to "no". |
373 | | | 373 | |
374 | USE_INET6 If "no", disables building INET6 (IPv6) support into | | 374 | USE_INET6 If "no", disables building INET6 (IPv6) support into |
| @@ -399,27 +399,27 @@ USE_SKEY If "no", disables building S/ke | | | @@ -399,27 +399,27 @@ USE_SKEY If "no", disables building S/ke |
399 | support it. If ${MKSKEY} is "no", USE_SKEY will | | 399 | support it. If ${MKSKEY} is "no", USE_SKEY will |
400 | also be forced to "no". | | 400 | also be forced to "no". |
401 | Default: no | | 401 | Default: no |
402 | | | 402 | |
403 | USE_SSP If "no", disables GCC stack protection code, which | | 403 | USE_SSP If "no", disables GCC stack protection code, which |
404 | detects stack overflows and aborts the program. The | | 404 | detects stack overflows and aborts the program. The |
405 | stack protection code imposes a performance penalty | | 405 | stack protection code imposes a performance penalty |
406 | of about 5%. | | 406 | of about 5%. |
407 | Default: "no", unless "USE_FORT" is set to "yes" | | 407 | Default: "no", unless "USE_FORT" is set to "yes" |
408 | | | 408 | |
409 | USE_FORT If "yes" turns on substitute wrappers for commonly used | | 409 | USE_FORT If "yes" turns on substitute wrappers for commonly used |
410 | functions that do not do bounds checking regularly, but | | 410 | functions that do not do bounds checking regularly, but |
411 | they could in some cases by using the gcc | | 411 | they could in some cases by using the gcc |
412 | __builtin_object_size() function to determine the buffer | | 412 | __builtin_object_size() function to determine the buffer |
413 | size where it is known and detect buffer overflows. | | 413 | size where it is known and detect buffer overflows. |
414 | These substitute functions are in /usr/include/ssp. | | 414 | These substitute functions are in /usr/include/ssp. |
415 | Default: depends on the part of the source tree | | 415 | Default: depends on the part of the source tree |
416 | | | 416 | |
417 | USE_YP If "no", disables building YP (NIS) support into | | 417 | USE_YP If "no", disables building YP (NIS) support into |
418 | various system utilities/libraries that support it. | | 418 | various system utilities/libraries that support it. |
419 | If ${MKYP} is "no", USE_YP will also be forced to "no". | | 419 | If ${MKYP} is "no", USE_YP will also be forced to "no". |
420 | | | 420 | |
421 | USE_PIGZGZIP If "no", use the host "gzip" program to compress things. | | 421 | USE_PIGZGZIP If "no", use the host "gzip" program to compress things. |
422 | Otherwise, build tools/pigz and use nbpigz to compress | | 422 | Otherwise, build tools/pigz and use nbpigz to compress |
423 | things. | | 423 | things. |
424 | Default: "no". | | 424 | Default: "no". |
425 | | | 425 | |
| @@ -631,27 +631,27 @@ USETOOLS Indicates whether the tools spe | | | @@ -631,27 +631,27 @@ USETOOLS Indicates whether the tools spe |
631 | | | 631 | |
632 | Default: "yes" if building all or part of a whole NetBSD | | 632 | Default: "yes" if building all or part of a whole NetBSD |
633 | source tree (detected automatically); "no" otherwise | | 633 | source tree (detected automatically); "no" otherwise |
634 | (to preserve traditional semantics of the <bsd.*.mk> | | 634 | (to preserve traditional semantics of the <bsd.*.mk> |
635 | make(1) include files). | | 635 | make(1) include files). |
636 | | | 636 | |
637 | OBJECT_FMT Object file format. [set to "ELF" on architectures that | | 637 | OBJECT_FMT Object file format. [set to "ELF" on architectures that |
638 | use ELF -- currently all architectures]. | | 638 | use ELF -- currently all architectures]. |
639 | | | 639 | |
640 | TOOLCHAIN_MISSING | | 640 | TOOLCHAIN_MISSING |
641 | If not "no", this indicates that the platform being built | | 641 | If not "no", this indicates that the platform being built |
642 | does not have a working in-tree toolchain. If the | | 642 | does not have a working in-tree toolchain. If the |
643 | ${MACHINE_ARCH} in question falls into this category, | | 643 | ${MACHINE_ARCH} in question falls into this category, |
644 | TOOLCHAIN_MISSING is conditionally assigned the value "yes". | | 644 | TOOLCHAIN_MISSING is conditionally assigned the value "yes". |
645 | Otherwise, the variable is unconditionally assigned the | | 645 | Otherwise, the variable is unconditionally assigned the |
646 | value "no". | | 646 | value "no". |
647 | If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are | | 647 | If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are |
648 | unconditionally assigned the value "no". | | 648 | unconditionally assigned the value "no". |
649 | | | 649 | |
650 | EXTERNAL_TOOLCHAIN | | 650 | EXTERNAL_TOOLCHAIN |
651 | This variable is not directly set by <bsd.own.mk>, but | | 651 | This variable is not directly set by <bsd.own.mk>, but |
652 | including <bsd.own.mk> is the canonical way to gain | | 652 | including <bsd.own.mk> is the canonical way to gain |
653 | access to this variable. The variable should be defined | | 653 | access to this variable. The variable should be defined |
654 | either in the user's environment or in the user's mk.conf | | 654 | either in the user's environment or in the user's mk.conf |
655 | file. If defined, this variable indicates the root of | | 655 | file. If defined, this variable indicates the root of |
656 | an external toolchain which will be used to build the | | 656 | an external toolchain which will be used to build the |
657 | tree. For example, if a platform is a ${TOOLCHAIN_MISSING} | | 657 | tree. For example, if a platform is a ${TOOLCHAIN_MISSING} |
| @@ -925,27 +925,27 @@ FILESBUILD If this variable is defined, | | | @@ -925,27 +925,27 @@ FILESBUILD If this variable is defined, |
925 | | | 925 | |
926 | FILESBUILD_<fn> A value different from "no" will add the file to the list of | | 926 | FILESBUILD_<fn> A value different from "no" will add the file to the list of |
927 | targets to be built by `realall'. Users of that variable | | 927 | targets to be built by `realall'. Users of that variable |
928 | should provide a target to build the file. | | 928 | should provide a target to build the file. |
929 | | | 929 | |
930 | | | 930 | |
931 | BUILDSYMLINKS List of two word items: | | 931 | BUILDSYMLINKS List of two word items: |
932 | lnsrc lntgt | | 932 | lnsrc lntgt |
933 | For each lnsrc item, create a symlink named lntgt. | | 933 | For each lnsrc item, create a symlink named lntgt. |
934 | The lntgt symlinks are removed by the cleandir target. | | 934 | The lntgt symlinks are removed by the cleandir target. |
935 | | | 935 | |
936 | UUDECODE_FILES List of files which are stored as <file>.uue in the source | | 936 | UUDECODE_FILES List of files which are stored as <file>.uue in the source |
937 | tree. Each one will be decoded with ${TOOL_UUDECODE}. | | 937 | tree. Each one will be decoded with ${TOOL_UUDECODE}. |
938 | The source files have a `.uue' suffix, the generated files do | | 938 | The source files have a `.uue' suffix, the generated files do |
939 | not. | | 939 | not. |
940 | | | 940 | |
941 | UUDECODE_FILES_RENAME_<fn> | | 941 | UUDECODE_FILES_RENAME_<fn> |
942 | Rename the output from the decode to the provided name. | | 942 | Rename the output from the decode to the provided name. |
943 | | | 943 | |
944 | *NOTE: These files are simply decoded, with no install or other | | 944 | *NOTE: These files are simply decoded, with no install or other |
945 | rule applying implicitly except being added to the clean | | 945 | rule applying implicitly except being added to the clean |
946 | target. | | 946 | target. |
947 | | | 947 | |
948 | =-=-=-=-= bsd.gcc.mk =-=-=-=-= | | 948 | =-=-=-=-= bsd.gcc.mk =-=-=-=-= |
949 | | | 949 | |
950 | The include file <bsd.gcc.mk> computes various parameters related to GCC | | 950 | The include file <bsd.gcc.mk> computes various parameters related to GCC |
951 | support libraries. It defines no targets. <bsd.own.mk> MUST be included | | 951 | support libraries. It defines no targets. <bsd.own.mk> MUST be included |
| @@ -1122,27 +1122,27 @@ SRCS List of source files to build the | | | @@ -1122,27 +1122,27 @@ SRCS List of source files to build the |
1122 | LIBDPLIBS A list of the tuples: | | 1122 | LIBDPLIBS A list of the tuples: |
1123 | libname path-to-srcdir-of-libname | | 1123 | libname path-to-srcdir-of-libname |
1124 | | | 1124 | |
1125 | For each tuple; | | 1125 | For each tuple; |
1126 | * LIBDO.libname contains the .OBJDIR of the library | | 1126 | * LIBDO.libname contains the .OBJDIR of the library |
1127 | `libname', and if it is not set it is determined | | 1127 | `libname', and if it is not set it is determined |
1128 | from the srcdir and added to MAKEOVERRIDES (the | | 1128 | from the srcdir and added to MAKEOVERRIDES (the |
1129 | latter is to allow for build time optimization). | | 1129 | latter is to allow for build time optimization). |
1130 | * LDADD gets -L${LIBDO.libname} -llibname added. | | 1130 | * LDADD gets -L${LIBDO.libname} -llibname added. |
1131 | * DPADD gets ${LIBDO.libname}/liblibname.so or | | 1131 | * DPADD gets ${LIBDO.libname}/liblibname.so or |
1132 | ${LIBDO.libname}/liblibname.a added. | | 1132 | ${LIBDO.libname}/liblibname.a added. |
1133 | | | 1133 | |
1134 | This variable may be used for individual libraries, as | | 1134 | This variable may be used for individual libraries, as |
1135 | well as in parent directories to cache common libraries | | 1135 | well as in parent directories to cache common libraries |
1136 | as a build-time optimization. | | 1136 | as a build-time optimization. |
1137 | | | 1137 | |
1138 | The include file <bsd.lib.mk> includes the file named "../Makefile.inc" | | 1138 | The include file <bsd.lib.mk> includes the file named "../Makefile.inc" |
1139 | if it exists, as well as the include file <bsd.man.mk>. | | 1139 | if it exists, as well as the include file <bsd.man.mk>. |
1140 | | | 1140 | |
1141 | It has rules for building profiled objects; profiled libraries are | | 1141 | It has rules for building profiled objects; profiled libraries are |
1142 | built by default. | | 1142 | built by default. |
1143 | | | 1143 | |
1144 | Libraries are ranlib'd when made. | | 1144 | Libraries are ranlib'd when made. |
1145 | | | 1145 | |
1146 | | | 1146 | |
1147 | =-=-=-=-= bsd.links.mk =-=-=-=-= | | 1147 | =-=-=-=-= bsd.links.mk =-=-=-=-= |
1148 | | | 1148 | |
| @@ -1264,27 +1264,27 @@ USR_OBJMACHINE If set, and the current | | | @@ -1264,27 +1264,27 @@ USR_OBJMACHINE If set, and the current |
1264 | corresponding subdirectory of ${BSDOBJDIR}.${MACHINE}; | | 1264 | corresponding subdirectory of ${BSDOBJDIR}.${MACHINE}; |
1265 | otherwise, create it in the corresponding subdirectory | | 1265 | otherwise, create it in the corresponding subdirectory |
1266 | of ${BSDOBJDIR} | | 1266 | of ${BSDOBJDIR} |
1267 | | | 1267 | |
1268 | BUILDID If set, the contents of this variable are appended | | 1268 | BUILDID If set, the contents of this variable are appended |
1269 | to the object directory name. If OBJMACHINE is also | | 1269 | to the object directory name. If OBJMACHINE is also |
1270 | set, ".${BUILDID}" is added after ".${MACHINE}". | | 1270 | set, ".${BUILDID}" is added after ".${MACHINE}". |
1271 | | | 1271 | |
1272 | | | 1272 | |
1273 | =-=-=-=-= bsd.prog.mk =-=-=-=-= | | 1273 | =-=-=-=-= bsd.prog.mk =-=-=-=-= |
1274 | | | 1274 | |
1275 | The include file <bsd.prog.mk> handles building programs from one or | | 1275 | The include file <bsd.prog.mk> handles building programs from one or |
1276 | more source files, along with their manual pages. It has a limited number | | 1276 | more source files, along with their manual pages. It has a limited number |
1277 | of suffixes, consistent with the current needs of the BSD tree. | | 1277 | of suffixes, consistent with the current needs of the BSD tree. |
1278 | <bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters. | | 1278 | <bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters. |
1279 | | | 1279 | |
1280 | It has eight targets: | | 1280 | It has eight targets: |
1281 | | | 1281 | |
1282 | all: | | 1282 | all: |
1283 | build the program and its manual page. This also | | 1283 | build the program and its manual page. This also |
1284 | creates a GDB initialization file (.gdbinit) in | | 1284 | creates a GDB initialization file (.gdbinit) in |
1285 | the objdir. The .gdbinit file sets the shared library | | 1285 | the objdir. The .gdbinit file sets the shared library |
1286 | prefix to ${DESTDIR} to facilitate cross-debugging. | | 1286 | prefix to ${DESTDIR} to facilitate cross-debugging. |
1287 | clean: | | 1287 | clean: |
1288 | remove the program, any object files and the files a.out, | | 1288 | remove the program, any object files and the files a.out, |
1289 | Errs, errs, mklog, and ${PROG}.core. | | 1289 | Errs, errs, mklog, and ${PROG}.core. |
1290 | cleandir: | | 1290 | cleandir: |