Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 1 | Environment variables |
| 2 | |
| 3 | KCPPFLAGS |
| 4 | -------------------------------------------------- |
| 5 | Additional options to pass when preprocessing. The preprocessing options |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 6 | will be used in all cases where kbuild does preprocessing including |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 7 | building C files and assembler files. |
| 8 | |
| 9 | KAFLAGS |
| 10 | -------------------------------------------------- |
| 11 | Additional options to the assembler. |
| 12 | |
| 13 | KCFLAGS |
| 14 | -------------------------------------------------- |
| 15 | Additional options to the C compiler. |
| 16 | |
| 17 | KBUILD_VERBOSE |
| 18 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 19 | Set the kbuild verbosity. Can be assigned same values as "V=...". |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 20 | See make help for the full list. |
| 21 | Setting "V=..." takes precedence over KBUILD_VERBOSE. |
| 22 | |
| 23 | KBUILD_EXTMOD |
| 24 | -------------------------------------------------- |
| 25 | Set the directory to look for the kernel source when building external |
| 26 | modules. |
| 27 | The directory can be specified in several ways: |
| 28 | 1) Use "M=..." on the command line |
| 29 | 2) Environmnet variable KBUILD_EXTMOD |
| 30 | 3) Environmnet variable SUBDIRS |
| 31 | The possibilities are listed in the order they take precedence. |
| 32 | Using "M=..." will always override the others. |
| 33 | |
| 34 | KBUILD_OUTPUT |
| 35 | -------------------------------------------------- |
| 36 | Specify the output directory when building the kernel. |
| 37 | The output directory can also be specificed using "O=...". |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 38 | Setting "O=..." takes precedence over KBUILD_OUTPUT. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 39 | |
| 40 | ARCH |
| 41 | -------------------------------------------------- |
| 42 | Set ARCH to the architecture to be built. |
| 43 | In most cases the name of the architecture is the same as the |
| 44 | directory name found in the arch/ directory. |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 45 | But some architectures such as x86 and sparc have aliases. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 46 | x86: i386 for 32 bit, x86_64 for 64 bit |
| 47 | sparc: sparc for 32 bit, sparc64 for 64 bit |
| 48 | |
| 49 | CROSS_COMPILE |
| 50 | -------------------------------------------------- |
| 51 | Specify an optional fixed part of the binutils filename. |
| 52 | CROSS_COMPILE can be a part of the filename or the full path. |
| 53 | |
| 54 | CROSS_COMPILE is also used for ccache is some setups. |
| 55 | |
| 56 | CF |
| 57 | -------------------------------------------------- |
| 58 | Additional options for sparse. |
| 59 | CF is often used on the command-line like this: |
| 60 | |
| 61 | make CF=-Wbitwise C=2 |
| 62 | |
| 63 | INSTALL_PATH |
| 64 | -------------------------------------------------- |
| 65 | INSTALL_PATH specifies where to place the updated kernel and system map |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 66 | images. Default is /boot, but you can set it to other values. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 67 | |
Sam Ravnborg | caa27b6 | 2009-07-20 21:37:11 +0200 | [diff] [blame] | 68 | INSTALLKERNEL |
| 69 | -------------------------------------------------- |
| 70 | Install script called when using "make install". |
| 71 | The default name is "installkernel". |
| 72 | |
| 73 | The script will be called with the following arguments: |
| 74 | $1 - kernel version |
| 75 | $2 - kernel image file |
| 76 | $3 - kernel map file |
| 77 | $4 - default install path (use root directory if blank) |
| 78 | |
| 79 | The implmentation of "make install" is architecture specific |
| 80 | and it may differ from the above. |
| 81 | |
| 82 | INSTALLKERNEL is provided to enable the possibility to |
| 83 | specify a custom installer when cross compiling a kernel. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 84 | |
| 85 | MODLIB |
| 86 | -------------------------------------------------- |
| 87 | Specify where to install modules. |
| 88 | The default value is: |
| 89 | |
| 90 | $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) |
| 91 | |
| 92 | The value can be overridden in which case the default value is ignored. |
| 93 | |
| 94 | INSTALL_MOD_PATH |
| 95 | -------------------------------------------------- |
| 96 | INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory |
| 97 | relocations required by build roots. This is not defined in the |
| 98 | makefile but the argument can be passed to make if needed. |
| 99 | |
| 100 | INSTALL_MOD_STRIP |
| 101 | -------------------------------------------------- |
| 102 | INSTALL_MOD_STRIP, if defined, will cause modules to be |
| 103 | stripped after they are installed. If INSTALL_MOD_STRIP is '1', then |
| 104 | the default option --strip-debug will be used. Otherwise, |
| 105 | INSTALL_MOD_STRIP will used as the options to the strip command. |
| 106 | |
| 107 | INSTALL_FW_PATH |
| 108 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 109 | INSTALL_FW_PATH specifies where to install the firmware blobs. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 110 | The default value is: |
| 111 | |
| 112 | $(INSTALL_MOD_PATH)/lib/firmware |
| 113 | |
| 114 | The value can be overridden in which case the default value is ignored. |
| 115 | |
| 116 | INSTALL_HDR_PATH |
| 117 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 118 | INSTALL_HDR_PATH specifies where to install user space headers when |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 119 | executing "make headers_*". |
| 120 | The default value is: |
| 121 | |
| 122 | $(objtree)/usr |
| 123 | |
| 124 | $(objtree) is the directory where output files are saved. |
| 125 | The output directory is often set using "O=..." on the commandline. |
| 126 | |
| 127 | The value can be overridden in which case the default value is ignored. |
| 128 | |
| 129 | KBUILD_MODPOST_WARN |
| 130 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 131 | KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined |
| 132 | symbols in the final module linking stage. It changes such errors |
| 133 | into warnings. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 134 | |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 135 | KBUILD_MODPOST_NOFINAL |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 136 | -------------------------------------------------- |
| 137 | KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 138 | This is solely useful to speed up test compiles. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 139 | |
| 140 | KBUILD_EXTRA_SYMBOLS |
| 141 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 142 | For modules that use symbols from other modules. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 143 | See more details in modules.txt. |
Jike Song | 4f62824 | 2009-01-05 14:57:03 +0800 | [diff] [blame] | 144 | |
| 145 | ALLSOURCE_ARCHS |
| 146 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 147 | For tags/TAGS/cscope targets, you can specify more than one arch |
| 148 | to be included in the databases, separated by blank space. E.g.: |
Jike Song | 4f62824 | 2009-01-05 14:57:03 +0800 | [diff] [blame] | 149 | |
| 150 | $ make ALLSOURCE_ARCHS="x86 mips arm" tags |