Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 1 | # Makefile for buildroot2 |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 2 | # |
Eric Andersen | 15b26ae | 2005-02-07 22:19:26 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 4 | # |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 5 | # This program is free software; you can redistribute it and/or modify |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 2 of the License, or |
| 8 | # (at your option) any later version. |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 9 | # |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 13 | # General Public License for more details. |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 14 | # |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with this program; if not, write to the Free Software |
| 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | # |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 19 | |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 20 | #-------------------------------------------------------------- |
| 21 | # Just run 'make menuconfig', configure stuff, then run 'make'. |
| 22 | # You shouldn't need to mess with anything beyond this point... |
| 23 | #-------------------------------------------------------------- |
| 24 | TOPDIR=./ |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 25 | CONFIG_CONFIG_IN=Config.in |
| 26 | CONFIG_DEFCONFIG=.defconfig |
| 27 | CONFIG=package/config |
Ulf Samuelsson | 7def555 | 2007-07-11 15:01:42 +0000 | [diff] [blame] | 28 | DATE:=$(shell date -u +%Y%m%d) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 29 | |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 30 | noconfig_targets:=menuconfig config oldconfig randconfig \ |
Bernhard Reutner-Fischer | 6547bce | 2007-08-22 12:35:41 +0000 | [diff] [blame] | 31 | defconfig allyesconfig allnoconfig release tags \ |
Bernhard Reutner-Fischer | e491fba | 2007-07-08 12:20:58 +0000 | [diff] [blame] | 32 | source-check help |
Bernhard Reutner-Fischer | 9e25035 | 2006-12-02 19:01:10 +0000 | [diff] [blame] | 33 | |
Bernhard Reutner-Fischer | 6547bce | 2007-08-22 12:35:41 +0000 | [diff] [blame] | 34 | # $(shell find . -name *_defconfig |sed 's/.*\///') |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 35 | |
| 36 | # Pull in the user's configuration file |
| 37 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) |
Ulf Samuelsson | 7521f37 | 2007-09-12 04:34:16 +0000 | [diff] [blame] | 38 | ifeq ($(BOARD),) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 39 | -include $(TOPDIR).config |
Ulf Samuelsson | 7521f37 | 2007-09-12 04:34:16 +0000 | [diff] [blame] | 40 | else |
| 41 | -include $(TOPDIR)/local/$(BOARD)/$(BOARD).config |
| 42 | endif |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 43 | endif |
Ulf Samuelsson | adbc5a1 | 2007-08-20 15:47:42 +0000 | [diff] [blame] | 44 | ifneq ($(BUILDROOT_DL_DIR),) |
Ulf Samuelsson | 3c567e6 | 2007-08-19 23:32:33 +0000 | [diff] [blame] | 45 | BR2_DL_DIR:=$(BUILDROOT_DL_DIR) |
| 46 | endif |
Ulf Samuelsson | 7521f37 | 2007-09-12 04:34:16 +0000 | [diff] [blame] | 47 | ifneq ($(BUILDROOT_LOCAL),) |
| 48 | LOCAL:=$(BUILDROOT_LOCAL) |
| 49 | else |
| 50 | LOCAL:=local |
| 51 | endif |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 52 | |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 53 | # To put more focus on warnings, be less verbose as default |
| 54 | # Use 'make V=1' to see the full commands |
| 55 | ifdef V |
| 56 | ifeq ("$(origin V)", "command line") |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 57 | KBUILD_VERBOSE=$(V) |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 58 | endif |
| 59 | endif |
| 60 | ifndef KBUILD_VERBOSE |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 61 | KBUILD_VERBOSE=0 |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 62 | endif |
| 63 | |
| 64 | ifeq ($(KBUILD_VERBOSE),1) |
Ulf Samuelsson | 4df454e | 2007-07-06 12:19:35 +0000 | [diff] [blame] | 65 | quiet= |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 66 | Q= |
Bernhard Reutner-Fischer | 1669b6e | 2007-09-22 14:19:22 +0000 | [diff] [blame] | 67 | ifndef VERBOSE |
| 68 | VERBOSE=1 |
| 69 | endif |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 70 | else |
| 71 | quiet=quiet_ |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 72 | Q=@ |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 73 | endif |
| 74 | |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 75 | CONFIG_SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 76 | else if [ -x /bin/bash ]; then echo /bin/bash; \ |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 77 | else echo sh; fi; fi) |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 78 | |
Bernhard Reutner-Fischer | 1669b6e | 2007-09-22 14:19:22 +0000 | [diff] [blame] | 79 | export CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 80 | |
| 81 | ifndef HOSTAR |
| 82 | HOSTAR:=ar |
| 83 | endif |
| 84 | ifndef HOSTAS |
| 85 | HOSTAS:=as |
| 86 | endif |
| 87 | ifndef HOSTCC |
| 88 | HOSTCC:=gcc |
| 89 | else |
| 90 | endif |
| 91 | ifndef HOSTCXX |
| 92 | HOSTCXX:=g++ |
| 93 | endif |
Bernhard Reutner-Fischer | 5f97580 | 2007-09-28 20:10:22 +0000 | [diff] [blame] | 94 | ifndef HOSTFC |
| 95 | HOSTFC:=gfortran |
| 96 | endif |
Ulf Samuelsson | 356133b | 2007-09-28 19:46:58 +0000 | [diff] [blame] | 97 | ifndef HOSTCPP |
| 98 | HOSTCPP:=cpp |
| 99 | endif |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 100 | ifndef HOSTLD |
| 101 | HOSTLD:=ld |
| 102 | endif |
Ulf Samuelsson | 0f9c5b1 | 2007-07-15 21:54:11 +0000 | [diff] [blame] | 103 | ifndef HOSTLN |
| 104 | HOSTLN:=ln |
| 105 | endif |
Ulf Samuelsson | 356133b | 2007-09-28 19:46:58 +0000 | [diff] [blame] | 106 | ifndef HOSTNM |
| 107 | HOSTNM:=nm |
| 108 | endif |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 109 | HOSTAR:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAR)" || type -p $(HOSTAR) || echo ar) |
| 110 | HOSTAS:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAS)" || type -p $(HOSTAS) || echo as) |
| 111 | HOSTCC:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCC)" || type -p $(HOSTCC) || echo gcc) |
Ulf Samuelsson | 83832cd | 2007-07-09 04:26:49 +0000 | [diff] [blame] | 112 | HOSTCXX:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCXX)" || type -p $(HOSTCXX) || echo g++) |
Bernhard Reutner-Fischer | 5f97580 | 2007-09-28 20:10:22 +0000 | [diff] [blame] | 113 | HOSTFC:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran) |
Ulf Samuelsson | 356133b | 2007-09-28 19:46:58 +0000 | [diff] [blame] | 114 | HOSTCPP:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCPP)" || type -p $(HOSTCPP) || echo cpp) |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 115 | HOSTLD:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo ld) |
| 116 | HOSTLN:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLN)" || type -p $(HOSTLN) || echo ln) |
Ulf Samuelsson | 356133b | 2007-09-28 19:46:58 +0000 | [diff] [blame] | 117 | HOSTNM:=$(shell $(CONFIG_SHELL) -c "which $(HOSTNM)" || type -p $(HOSTNM) || echo nm) |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 118 | ifndef CFLAGS_FOR_BUILD |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 119 | CFLAGS_FOR_BUILD:=-g -O2 |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 120 | endif |
Bernhard Reutner-Fischer | 5f97580 | 2007-09-28 20:10:22 +0000 | [diff] [blame] | 121 | ifndef CXXFLAGS_FOR_BUILD |
| 122 | CXXFLAGS_FOR_BUILD:=-g -O2 |
| 123 | endif |
| 124 | ifndef FCFLAGS_FOR_BUILD |
| 125 | FCFLAGS_FOR_BUILD:=-g -O2 |
| 126 | endif |
| 127 | export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD |
Bernhard Reutner-Fischer | afc61c6 | 2007-06-28 10:47:05 +0000 | [diff] [blame] | 128 | |
| 129 | |
Bernhard Reutner-Fischer | cfe511b | 2007-09-29 13:58:30 +0000 | [diff] [blame] | 130 | ifeq ($(BR2_HAVE_DOT_CONFIG),y) |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 131 | |
Bernhard Reutner-Fischer | 99cf729 | 2007-02-12 13:38:06 +0000 | [diff] [blame] | 132 | # cc-option |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 133 | # Usage: cflags-y+=$(call cc-option, -march=winchip-c6, -march=i586) |
Bernhard Reutner-Fischer | 99cf729 | 2007-02-12 13:38:06 +0000 | [diff] [blame] | 134 | # sets -march=winchip-c6 if supported else falls back to -march=i586 |
| 135 | # without checking the latter. |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 136 | cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ |
Bernhard Reutner-Fischer | 99cf729 | 2007-02-12 13:38:06 +0000 | [diff] [blame] | 137 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) |
| 138 | |
Peter Korsgaard | 2c64904 | 2007-06-19 15:19:27 +0000 | [diff] [blame] | 139 | ############################################################# |
| 140 | # |
| 141 | # Hide troublesome environment variables from sub processes |
| 142 | # |
| 143 | ############################################################# |
| 144 | unexport CROSS_COMPILE |
| 145 | unexport ARCH |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 146 | |
| 147 | ############################################################# |
| 148 | # |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 149 | # Setup the proper filename extensions for the host |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 150 | # |
| 151 | ############################################################## |
| 152 | ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),) |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 153 | HOST_EXEEXT:= |
| 154 | HOST_LIBEXT:=.a |
| 155 | HOST_SHREXT:=.so |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 156 | endif |
| 157 | ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),) |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 158 | HOST_EXEEXT:= |
| 159 | HOST_LIBEXT:=.a |
| 160 | HOST_SHREXT:=.dylib |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 161 | endif |
| 162 | ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),) |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 163 | HOST_EXEEXT:=.exe |
| 164 | HOST_LIBEXT:=.lib |
| 165 | HOST_SHREXT:=.dll |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 166 | endif |
| 167 | ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),) |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 168 | HOST_EXEEXT:=.exe |
| 169 | HOST_LIBEXT:=.lib |
| 170 | HOST_SHREXT:=.dll |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 171 | endif |
| 172 | |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 173 | # The preferred type of libs we build for the target |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 174 | ifeq ($(BR2_PREFER_STATIC_LIB),y) |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 175 | LIBTGTEXT=.a |
Bernhard Reutner-Fischer | 8027784 | 2007-06-20 11:26:36 +0000 | [diff] [blame] | 176 | #PREFERRED_LIB_FLAGS:=--disable-shared --enable-static |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 177 | else |
Bernhard Reutner-Fischer | c6e43c9 | 2007-06-02 11:22:17 +0000 | [diff] [blame] | 178 | LIBTGTEXT=.so |
Bernhard Reutner-Fischer | 8027784 | 2007-06-20 11:26:36 +0000 | [diff] [blame] | 179 | #PREFERRED_LIB_FLAGS:=--disable-static --enable-shared |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 180 | endif |
Bernhard Reutner-Fischer | 8027784 | 2007-06-20 11:26:36 +0000 | [diff] [blame] | 181 | PREFERRED_LIB_FLAGS:=--enable-static --enable-shared |
Bernhard Reutner-Fischer | 7dcbbfb | 2007-06-02 09:05:40 +0000 | [diff] [blame] | 182 | |
Bernhard Reutner-Fischer | 6ad0720 | 2007-07-31 15:02:06 +0000 | [diff] [blame] | 183 | ############################################################## |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 184 | # |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 185 | # The list of stuff to build for the target toolchain |
| 186 | # along with the packages to build for the target. |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 187 | # |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 188 | ############################################################## |
Bernhard Reutner-Fischer | 4b0d5a8 | 2007-09-26 21:12:38 +0000 | [diff] [blame] | 189 | ifeq ($(BR2_TOOLCHAIN_SOURCE),y) |
Bernhard Reutner-Fischer | 4909da4 | 2007-09-22 21:38:15 +0000 | [diff] [blame] | 190 | BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils |
"Steven J. Hill" | 02f71aa | 2007-02-06 18:19:38 +0000 | [diff] [blame] | 191 | else |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 192 | BASE_TARGETS:=uclibc |
"Steven J. Hill" | 02f71aa | 2007-02-06 18:19:38 +0000 | [diff] [blame] | 193 | endif |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 194 | TARGETS:= |
| 195 | |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 196 | # setup our pathes |
Ulf Samuelsson | f958d89 | 2007-08-14 07:45:01 +0000 | [diff] [blame] | 197 | include project/Makefile.in |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 198 | |
| 199 | BR2_DEPENDS_DIR=$(PROJECT_BUILD_DIR)/buildroot-config |
| 200 | |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 201 | include toolchain/Makefile.in |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 202 | include package/Makefile.in |
Eric Andersen | 27bc59d | 2003-01-17 04:31:36 +0000 | [diff] [blame] | 203 | |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 204 | ############################################################# |
| 205 | # |
Eric Andersen | ef407d3 | 2004-01-29 23:21:00 +0000 | [diff] [blame] | 206 | # You should probably leave this stuff alone unless you know |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 207 | # what you are doing. |
| 208 | # |
| 209 | ############################################################# |
Manuel Novoa III | d632d42 | 2003-11-01 05:34:41 +0000 | [diff] [blame] | 210 | |
Bernhard Reutner-Fischer | 6547bce | 2007-08-22 12:35:41 +0000 | [diff] [blame] | 211 | all: world |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 212 | |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 213 | # In this section, we need .config |
| 214 | include .config.cmd |
| 215 | |
Ulf Samuelsson | f958d89 | 2007-08-14 07:45:01 +0000 | [diff] [blame] | 216 | include project/*.mk |
| 217 | |
Eric Andersen | d06645d | 2005-02-10 03:06:39 +0000 | [diff] [blame] | 218 | # We also need the various per-package makefiles, which also add |
| 219 | # each selected package to TARGETS if that package was selected |
| 220 | # in the .config file. |
Bernhard Reutner-Fischer | 4b0d5a8 | 2007-09-26 21:12:38 +0000 | [diff] [blame] | 221 | ifeq ($(BR2_TOOLCHAIN_SOURCE),y) |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 222 | # avoid pulling in external toolchain which is broken for toplvl parallel builds |
Bernhard Reutner-Fischer | 57310ec | 2007-09-27 21:24:15 +0000 | [diff] [blame] | 223 | # Explicit ordering: |
| 224 | include toolchain/dependencies/dependencies.mk |
| 225 | include toolchain/binutils/binutils.mk |
| 226 | include toolchain/ccache/ccache.mk |
| 227 | include toolchain/elf2flt/elf2flt.mk |
| 228 | include toolchain/gcc/gcc-uclibc-3.x.mk |
| 229 | include toolchain/gcc/gcc-uclibc-4.x.mk |
| 230 | include toolchain/gdb/gdb.mk |
| 231 | include toolchain/kernel-headers/kernel-headers.mk |
| 232 | include toolchain/mklibs/mklibs.mk |
| 233 | include toolchain/sstrip/sstrip.mk |
| 234 | include toolchain/uClibc/uclibc.mk |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 235 | else |
Eric Andersen | d06645d | 2005-02-10 03:06:39 +0000 | [diff] [blame] | 236 | include toolchain/*/*.mk |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 237 | endif |
| 238 | |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 239 | ifeq ($(BR2_PACKAGE_LINUX),y) |
| 240 | TARGETS+=linux26-modules |
| 241 | endif |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 242 | |
Eric Andersen | d06645d | 2005-02-10 03:06:39 +0000 | [diff] [blame] | 243 | include package/*/*.mk |
Eric Andersen | d06645d | 2005-02-10 03:06:39 +0000 | [diff] [blame] | 244 | |
Eric Andersen | 79f5f1e | 2005-02-17 03:00:29 +0000 | [diff] [blame] | 245 | # target stuff is last so it can override anything else |
| 246 | include target/Makefile.in |
| 247 | |
Ulf Samuelsson | c2fc93b | 2007-08-15 09:47:49 +0000 | [diff] [blame] | 248 | TARGETS+=erase-fakeroots |
| 249 | |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 250 | TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) |
Bernhard Reutner-Fischer | 3b08e64 | 2007-09-18 13:12:25 +0000 | [diff] [blame] | 251 | TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 252 | TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS)) |
Bernhard Reutner-Fischer | b3efde2 | 2007-09-01 17:10:55 +0000 | [diff] [blame] | 253 | TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS)) |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 254 | # all targets depend on the crosscompiler and it's prerequisites |
Bernhard Reutner-Fischer | b3efde2 | 2007-09-01 17:10:55 +0000 | [diff] [blame] | 255 | $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) % |
Bernhard Reutner-Fischer | acc706b | 2007-07-23 11:29:38 +0000 | [diff] [blame] | 256 | |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 257 | $(BR2_DEPENDS_DIR): .config |
| 258 | rm -rf $@ |
Bernhard Reutner-Fischer | b3efde2 | 2007-09-01 17:10:55 +0000 | [diff] [blame] | 259 | mkdir -p $(@D) |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 260 | cp -dpRf $(CONFIG)/buildroot-config $@ |
| 261 | |
Bernhard Reutner-Fischer | 5ef9e52 | 2007-07-27 14:57:34 +0000 | [diff] [blame] | 262 | dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 263 | $(BR2_DEPENDS_DIR) \ |
Bernhard Reutner-Fischer | 5ef9e52 | 2007-07-27 14:57:34 +0000 | [diff] [blame] | 264 | $(BINARIES_DIR) $(PROJECT_BUILD_DIR) |
Ulf Samuelsson | f958d89 | 2007-08-14 07:45:01 +0000 | [diff] [blame] | 265 | |
Bernhard Reutner-Fischer | 5ef9e52 | 2007-07-27 14:57:34 +0000 | [diff] [blame] | 266 | $(BASE_TARGETS): dirs |
Ulf Samuelsson | f958d89 | 2007-08-14 07:45:01 +0000 | [diff] [blame] | 267 | |
Bernhard Reutner-Fischer | b3efde2 | 2007-09-01 17:10:55 +0000 | [diff] [blame] | 268 | world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL) |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 269 | |
Bernhard Reutner-Fischer | 5ef9e52 | 2007-07-27 14:57:34 +0000 | [diff] [blame] | 270 | |
Ulf Samuelsson | f958d89 | 2007-08-14 07:45:01 +0000 | [diff] [blame] | 271 | .PHONY: all world dirs clean dirclean distclean source \ |
Bernhard Reutner-Fischer | b3efde2 | 2007-09-01 17:10:55 +0000 | [diff] [blame] | 272 | $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \ |
Eric Andersen | 747b16d | 2004-12-11 10:33:19 +0000 | [diff] [blame] | 273 | $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \ |
Bernhard Reutner-Fischer | 5ef9e52 | 2007-07-27 14:57:34 +0000 | [diff] [blame] | 274 | $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 275 | $(BR2_DEPENDS_DIR) \ |
Bernhard Reutner-Fischer | 5ef9e52 | 2007-07-27 14:57:34 +0000 | [diff] [blame] | 276 | $(BINARIES_DIR) $(PROJECT_BUILD_DIR) |
Jon Nelson | c79e998 | 2002-01-05 20:26:15 +0000 | [diff] [blame] | 277 | |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 278 | ############################################################# |
| 279 | # |
Eric Andersen | ef407d3 | 2004-01-29 23:21:00 +0000 | [diff] [blame] | 280 | # staging and target directories do NOT list these as |
Mike Frysinger | d99c31c | 2006-05-26 01:18:09 +0000 | [diff] [blame] | 281 | # dependencies anywhere else |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 282 | # |
| 283 | ############################################################# |
Bernhard Reutner-Fischer | 5ef9e52 | 2007-07-27 14:57:34 +0000 | [diff] [blame] | 284 | $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) \ |
Ulf Samuelsson | c6771df | 2007-08-16 05:44:55 +0000 | [diff] [blame] | 285 | $(PROJECT_BUILD_DIR) $(BINARIES_DIR): |
Bernhard Reutner-Fischer | 8d583fc | 2007-01-30 00:58:18 +0000 | [diff] [blame] | 286 | @mkdir -p $@ |
Manuel Novoa III | 3ad3d8a | 2004-09-03 00:49:43 +0000 | [diff] [blame] | 287 | |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 288 | $(STAGING_DIR): |
"Steven J. Hill" | 9c865d7 | 2007-05-07 03:56:47 +0000 | [diff] [blame] | 289 | @mkdir -p $(STAGING_DIR)/bin |
Eric Andersen | bf38723 | 2004-12-11 10:35:18 +0000 | [diff] [blame] | 290 | @mkdir -p $(STAGING_DIR)/lib |
Bernhard Reutner-Fischer | 7e0c890 | 2007-06-24 12:27:08 +0000 | [diff] [blame] | 291 | ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) |
Bernhard Reutner-Fischer | 8027784 | 2007-06-20 11:26:36 +0000 | [diff] [blame] | 292 | @mkdir -p $(STAGING_DIR)/usr/lib |
| 293 | else |
Ulf Samuelsson | f5905dc | 2007-10-07 18:23:43 +0000 | [diff] [blame^] | 294 | ifneq ($(BR2_TOOLCHAIN_EXTERNAL),y) |
Bernhard Reutner-Fischer | 8027784 | 2007-06-20 11:26:36 +0000 | [diff] [blame] | 295 | @ln -snf . $(STAGING_DIR)/usr |
| 296 | @mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME) |
Eric Andersen | 3da708e | 2007-01-10 06:55:27 +0000 | [diff] [blame] | 297 | @ln -snf ../lib $(STAGING_DIR)/usr/lib |
Bernhard Reutner-Fischer | 8027784 | 2007-06-20 11:26:36 +0000 | [diff] [blame] | 298 | @ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib |
| 299 | endif |
Ulf Samuelsson | f5905dc | 2007-10-07 18:23:43 +0000 | [diff] [blame^] | 300 | endif |
Bernhard Reutner-Fischer | 8027784 | 2007-06-20 11:26:36 +0000 | [diff] [blame] | 301 | @mkdir -p $(STAGING_DIR)/usr/include |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 302 | |
Ulf Samuelsson | c6771df | 2007-08-16 05:44:55 +0000 | [diff] [blame] | 303 | $(PROJECT_BUILD_DIR)/.root: |
Bernhard Reutner-Fischer | 7547c7e | 2007-08-21 10:53:39 +0000 | [diff] [blame] | 304 | mkdir -p $(TARGET_DIR) |
Bernhard Reutner-Fischer | f0ca4b8 | 2007-08-21 10:56:38 +0000 | [diff] [blame] | 305 | if ! [ -d "$(TARGET_DIR)/bin" ]; then \ |
| 306 | if [ -d "$(TARGET_SKELETON)" ]; then \ |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 307 | cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \ |
Ulf Samuelsson | 74cda1e | 2007-08-14 07:24:45 +0000 | [diff] [blame] | 308 | fi; \ |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 309 | touch $(STAGING_DIR)/.fakeroot.00000; \ |
Bernhard Reutner-Fischer | f0ca4b8 | 2007-08-21 10:56:38 +0000 | [diff] [blame] | 310 | fi |
| 311 | -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf |
| 312 | -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf |
Bernhard Reutner-Fischer | 7547c7e | 2007-08-21 10:53:39 +0000 | [diff] [blame] | 313 | touch $@ |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 314 | |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 315 | $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root |
Ulf Samuelsson | c6771df | 2007-08-16 05:44:55 +0000 | [diff] [blame] | 316 | |
Ulf Samuelsson | c2fc93b | 2007-08-15 09:47:49 +0000 | [diff] [blame] | 317 | erase-fakeroots: |
Ulf Samuelsson | 5d2be04 | 2007-08-16 18:19:42 +0000 | [diff] [blame] | 318 | rm -f $(PROJECT_BUILD_DIR)/.fakeroot* |
Ulf Samuelsson | 412ca2a | 2007-07-12 13:11:03 +0000 | [diff] [blame] | 319 | |
Bernhard Reutner-Fischer | 3b08e64 | 2007-09-18 13:12:25 +0000 | [diff] [blame] | 320 | source: $(TARGETS_SOURCE) $(HOST_SOURCE) |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 321 | |
Bernhard Reutner-Fischer | 6547bce | 2007-08-22 12:35:41 +0000 | [diff] [blame] | 322 | _source-check: |
Ulf Samuelsson | e7c08c2 | 2007-07-20 07:34:28 +0000 | [diff] [blame] | 323 | $(MAKE) SPIDER=--spider source |
Bernhard Reutner-Fischer | 825ff34 | 2007-06-07 12:57:03 +0000 | [diff] [blame] | 324 | |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 325 | ############################################################# |
| 326 | # |
| 327 | # Cleanup and misc junk |
| 328 | # |
| 329 | ############################################################# |
| 330 | clean: $(TARGETS_CLEAN) |
Manuel Novoa III | 3ad3d8a | 2004-09-03 00:49:43 +0000 | [diff] [blame] | 331 | rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 332 | |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 333 | dirclean: $(TARGETS_DIRCLEAN) |
Manuel Novoa III | 3ad3d8a | 2004-09-03 00:49:43 +0000 | [diff] [blame] | 334 | rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 335 | |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 336 | distclean: |
Mike Frysinger | 5bc1f0c | 2005-09-09 02:49:10 +0000 | [diff] [blame] | 337 | ifeq ($(DL_DIR),$(BASE_DIR)/dl) |
| 338 | rm -rf $(DL_DIR) |
| 339 | endif |
Bernhard Reutner-Fischer | 6547bce | 2007-08-22 12:35:41 +0000 | [diff] [blame] | 340 | rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR) \ |
Ulf Samuelsson | 412ca2a | 2007-07-12 13:11:03 +0000 | [diff] [blame] | 341 | $(LINUX_KERNEL) $(IMAGE) $(BASE_DIR)/include \ |
Bernhard Reutner-Fischer | 81df226 | 2007-07-09 08:06:27 +0000 | [diff] [blame] | 342 | .config.cmd |
Bernhard Reutner-Fischer | b513619 | 2007-01-19 18:00:49 +0000 | [diff] [blame] | 343 | $(MAKE) -C $(CONFIG) clean |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 344 | |
Manuel Novoa III | 3ad3d8a | 2004-09-03 00:49:43 +0000 | [diff] [blame] | 345 | sourceball: |
Bernhard Reutner-Fischer | 6547bce | 2007-08-22 12:35:41 +0000 | [diff] [blame] | 346 | rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR) |
Eric Andersen | 08782ae | 2002-04-26 11:45:55 +0000 | [diff] [blame] | 347 | set -e; \ |
| 348 | cd ..; \ |
| 349 | rm -f buildroot.tar.bz2; \ |
| 350 | tar -cvf buildroot.tar buildroot; \ |
| 351 | bzip2 -9 buildroot.tar; \ |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 352 | |
| 353 | |
Bernhard Reutner-Fischer | cfe511b | 2007-09-29 13:58:30 +0000 | [diff] [blame] | 354 | else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 355 | |
| 356 | all: menuconfig |
| 357 | |
| 358 | # configuration |
| 359 | # --------------------------------------------------------------------------- |
| 360 | |
Bernhard Reutner-Fischer | c0d7d4e | 2007-07-09 18:23:20 +0000 | [diff] [blame] | 361 | HOSTCFLAGS=$(CFLAGS_FOR_BUILD) |
| 362 | export HOSTCFLAGS |
| 363 | |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 364 | $(CONFIG)/conf: |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 365 | @mkdir -p $(CONFIG)/buildroot-config |
Bernhard Reutner-Fischer | fb2c8fe | 2007-07-27 14:16:00 +0000 | [diff] [blame] | 366 | $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 367 | -@if [ ! -f .config ]; then \ |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 368 | cp $(CONFIG_DEFCONFIG) .config; \ |
| 369 | fi |
| 370 | $(CONFIG)/mconf: |
Bernhard Reutner-Fischer | 1dbe6e3 | 2007-08-21 17:56:47 +0000 | [diff] [blame] | 371 | @mkdir -p $(CONFIG)/buildroot-config |
Bernhard Reutner-Fischer | fb2c8fe | 2007-07-27 14:16:00 +0000 | [diff] [blame] | 372 | $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf mconf |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 373 | -@if [ ! -f .config ]; then \ |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 374 | cp $(CONFIG_DEFCONFIG) .config; \ |
| 375 | fi |
| 376 | |
| 377 | menuconfig: $(CONFIG)/mconf |
Bernhard Reutner-Fischer | 7b403ad | 2007-08-21 11:25:30 +0000 | [diff] [blame] | 378 | @mkdir -p $(CONFIG)/buildroot-config |
Bernhard Reutner-Fischer | 153b1be | 2007-07-27 12:37:30 +0000 | [diff] [blame] | 379 | @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 380 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
Bernhard Reutner-Fischer | 153b1be | 2007-07-27 12:37:30 +0000 | [diff] [blame] | 381 | $(CONFIG)/mconf $(CONFIG_CONFIG_IN); then \ |
| 382 | test -f .config.cmd || rm -f .config; \ |
| 383 | fi |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 384 | |
| 385 | config: $(CONFIG)/conf |
Bernhard Reutner-Fischer | 7b403ad | 2007-08-21 11:25:30 +0000 | [diff] [blame] | 386 | @mkdir -p $(CONFIG)/buildroot-config |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 387 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
| 388 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 389 | $(CONFIG)/conf $(CONFIG_CONFIG_IN) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 390 | |
| 391 | oldconfig: $(CONFIG)/conf |
Bernhard Reutner-Fischer | 7b403ad | 2007-08-21 11:25:30 +0000 | [diff] [blame] | 392 | @mkdir -p $(CONFIG)/buildroot-config |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 393 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
| 394 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 395 | $(CONFIG)/conf -o $(CONFIG_CONFIG_IN) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 396 | |
| 397 | randconfig: $(CONFIG)/conf |
Bernhard Reutner-Fischer | 7b403ad | 2007-08-21 11:25:30 +0000 | [diff] [blame] | 398 | @mkdir -p $(CONFIG)/buildroot-config |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 399 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
| 400 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 401 | $(CONFIG)/conf -r $(CONFIG_CONFIG_IN) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 402 | |
| 403 | allyesconfig: $(CONFIG)/conf |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 404 | cat $(CONFIG_DEFCONFIG) > .config |
Bernhard Reutner-Fischer | 7b403ad | 2007-08-21 11:25:30 +0000 | [diff] [blame] | 405 | @mkdir -p $(CONFIG)/buildroot-config |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 406 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
| 407 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 408 | $(CONFIG)/conf -y $(CONFIG_CONFIG_IN) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 409 | #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 410 | |
| 411 | allnoconfig: $(CONFIG)/conf |
Bernhard Reutner-Fischer | 7b403ad | 2007-08-21 11:25:30 +0000 | [diff] [blame] | 412 | @mkdir -p $(CONFIG)/buildroot-config |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 413 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
| 414 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 415 | $(CONFIG)/conf -n $(CONFIG_CONFIG_IN) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 416 | |
| 417 | defconfig: $(CONFIG)/conf |
Bernhard Reutner-Fischer | 7b403ad | 2007-08-21 11:25:30 +0000 | [diff] [blame] | 418 | @mkdir -p $(CONFIG)/buildroot-config |
"Steven J. Hill" | 62b5ae4 | 2007-07-18 18:07:19 +0000 | [diff] [blame] | 419 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
| 420 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
Bernhard Reutner-Fischer | f987b7a | 2007-07-08 00:00:17 +0000 | [diff] [blame] | 421 | $(CONFIG)/conf -d $(CONFIG_CONFIG_IN) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 422 | |
Bernhard Reutner-Fischer | 6547bce | 2007-08-22 12:35:41 +0000 | [diff] [blame] | 423 | # check if download URLs are outdated |
Bernhard Reutner-Fischer | 825ff34 | 2007-06-07 12:57:03 +0000 | [diff] [blame] | 424 | source-check: allyesconfig |
| 425 | $(MAKE) _source-check |
| 426 | |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 427 | ############################################################# |
| 428 | # |
| 429 | # Cleanup and misc junk |
| 430 | # |
| 431 | ############################################################# |
| 432 | clean: |
| 433 | rm -f .config .config.old .config.cmd .tmpconfig.h |
Bernhard Reutner-Fischer | 18d979c | 2007-09-01 18:21:09 +0000 | [diff] [blame] | 434 | -$(MAKE) -C $(CONFIG) clean |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 435 | |
| 436 | distclean: clean |
| 437 | rm -rf sources/* |
| 438 | |
Bernhard Reutner-Fischer | cfe511b | 2007-09-29 13:58:30 +0000 | [diff] [blame] | 439 | endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y) |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 440 | |
Bernhard Reutner-Fischer | ba2e7e0 | 2007-06-25 10:56:13 +0000 | [diff] [blame] | 441 | %_defconfig: $(CONFIG)/conf |
| 442 | cp $(shell find ./target/ -name $@) .config |
Ulf Samuelsson | 8820d63 | 2007-09-23 14:36:04 +0000 | [diff] [blame] | 443 | -@$(MAKE) oldconfig |
Bernhard Reutner-Fischer | ba2e7e0 | 2007-06-25 10:56:13 +0000 | [diff] [blame] | 444 | |
Ulf Samuelsson | 5459a9c | 2007-09-28 19:43:26 +0000 | [diff] [blame] | 445 | configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config |
Ulf Samuelsson | b8f28d6 | 2007-09-28 16:18:16 +0000 | [diff] [blame] | 446 | |
| 447 | cross: $(BASE_TARGETS) |
| 448 | |
Bernhard Reutner-Fischer | e491fba | 2007-07-08 12:20:58 +0000 | [diff] [blame] | 449 | help: |
| 450 | @echo 'Cleaning:' |
| 451 | @echo ' clean - delete temporary files created by build' |
| 452 | @echo ' distclean - delete all non-source files (including .config)' |
| 453 | @echo |
| 454 | @echo 'Build:' |
| 455 | @echo ' all - make world' |
| 456 | @echo |
| 457 | @echo 'Configuration:' |
| 458 | @echo ' menuconfig - interactive curses-based configurator' |
| 459 | @echo ' oldconfig - resolve any unresolved symbols in .config' |
| 460 | @echo |
| 461 | @echo 'Miscellaneous:' |
| 462 | @echo ' source - download all sources needed for offline-build' |
Bernhard Reutner-Fischer | 0338040 | 2007-08-21 10:42:05 +0000 | [diff] [blame] | 463 | @echo ' source-check - check all packages for valid download URLs' |
Bernhard Reutner-Fischer | e491fba | 2007-07-08 12:20:58 +0000 | [diff] [blame] | 464 | @echo |
Bernhard Reutner-Fischer | 232fa7e | 2007-08-27 21:51:27 +0000 | [diff] [blame] | 465 | @echo 'See docs/README and docs/buildroot.html for further details' |
Bernhard Reutner-Fischer | 663dee4 | 2007-08-27 21:40:42 +0000 | [diff] [blame] | 466 | @echo |
Bernhard Reutner-Fischer | ba2e7e0 | 2007-06-25 10:56:13 +0000 | [diff] [blame] | 467 | |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 468 | .PHONY: dummy subdirs release distclean clean config oldconfig \ |
Bernhard Reutner-Fischer | e491fba | 2007-07-08 12:20:58 +0000 | [diff] [blame] | 469 | menuconfig tags check test depend defconfig help |
Ulf Samuelsson | 633c8cb | 2007-09-17 12:49:46 +0000 | [diff] [blame] | 470 | |