Commit | Line | Data |
---|---|---|
2d523c23 | 1 | # Makefile for buildroot2 |
ffde94bd | 2 | # |
15b26aee | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
ffde94bd | 4 | # |
08782ae7 | 5 | # This program is free software; you can redistribute it and/or modify |
2d523c23 EA |
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. | |
ffde94bd | 9 | # |
2d523c23 EA |
10 | # This program is distributed in the hope that it will be useful, |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
08782ae7 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2d523c23 | 13 | # General Public License for more details. |
ffde94bd | 14 | # |
2d523c23 EA |
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 | |
3ad3d8a1 | 18 | # |
02bf5816 | 19 | |
2d523c23 EA |
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=./ | |
18d979c7 BRF |
25 | CONFIG_CONFIG_IN=Config.in |
26 | CONFIG_DEFCONFIG=.defconfig | |
27 | CONFIG=package/config | |
7def5559 | 28 | DATE:=$(shell date -u +%Y%m%d) |
a0aef7c4 | 29 | |
18d979c7 | 30 | noconfig_targets:=menuconfig config oldconfig randconfig \ |
6547bced | 31 | defconfig allyesconfig allnoconfig release tags \ |
e491fba2 | 32 | source-check help |
9e250356 | 33 | |
6547bced | 34 | # $(shell find . -name *_defconfig |sed 's/.*\///') |
cad58108 | 35 | |
2d523c23 EA |
36 | # Pull in the user's configuration file |
37 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) | |
7521f373 | 38 | ifeq ($(BOARD),) |
2d523c23 | 39 | -include $(TOPDIR).config |
7521f373 US |
40 | else |
41 | -include $(TOPDIR)/local/$(BOARD)/$(BOARD).config | |
42 | endif | |
2d523c23 | 43 | endif |
adbc5a18 | 44 | ifneq ($(BUILDROOT_DL_DIR),) |
3c567e64 US |
45 | BR2_DL_DIR:=$(BUILDROOT_DL_DIR) |
46 | endif | |
7521f373 US |
47 | ifneq ($(BUILDROOT_LOCAL),) |
48 | LOCAL:=$(BUILDROOT_LOCAL) | |
49 | else | |
50 | LOCAL:=local | |
51 | endif | |
9741a49e | 52 | |
afc61c6e BRF |
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") | |
18d979c7 | 57 | KBUILD_VERBOSE=$(V) |
afc61c6e BRF |
58 | endif |
59 | endif | |
60 | ifndef KBUILD_VERBOSE | |
18d979c7 | 61 | KBUILD_VERBOSE=0 |
afc61c6e BRF |
62 | endif |
63 | ||
64 | ifeq ($(KBUILD_VERBOSE),1) | |
4df454e9 | 65 | quiet= |
18d979c7 | 66 | Q= |
1669b6ed BRF |
67 | ifndef VERBOSE |
68 | VERBOSE=1 | |
69 | endif | |
afc61c6e BRF |
70 | else |
71 | quiet=quiet_ | |
18d979c7 | 72 | Q=@ |
afc61c6e BRF |
73 | endif |
74 | ||
18d979c7 | 75 | CONFIG_SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
afc61c6e | 76 | else if [ -x /bin/bash ]; then echo /bin/bash; \ |
18d979c7 | 77 | else echo sh; fi; fi) |
afc61c6e | 78 | |
1669b6ed | 79 | export CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE |
afc61c6e BRF |
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 | |
356133b4 US |
94 | ifndef HOSTCPP |
95 | HOSTCPP:=cpp | |
96 | endif | |
afc61c6e BRF |
97 | ifndef HOSTLD |
98 | HOSTLD:=ld | |
99 | endif | |
0f9c5b11 US |
100 | ifndef HOSTLN |
101 | HOSTLN:=ln | |
102 | endif | |
356133b4 US |
103 | ifndef HOSTNM |
104 | HOSTNM:=nm | |
105 | endif | |
18d979c7 BRF |
106 | HOSTAR:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAR)" || type -p $(HOSTAR) || echo ar) |
107 | HOSTAS:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAS)" || type -p $(HOSTAS) || echo as) | |
108 | HOSTCC:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCC)" || type -p $(HOSTCC) || echo gcc) | |
83832cda | 109 | HOSTCXX:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCXX)" || type -p $(HOSTCXX) || echo g++) |
356133b4 | 110 | HOSTCPP:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCPP)" || type -p $(HOSTCPP) || echo cpp) |
18d979c7 BRF |
111 | HOSTLD:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo ld) |
112 | HOSTLN:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLN)" || type -p $(HOSTLN) || echo ln) | |
356133b4 | 113 | HOSTNM:=$(shell $(CONFIG_SHELL) -c "which $(HOSTNM)" || type -p $(HOSTNM) || echo nm) |
afc61c6e | 114 | ifndef CFLAGS_FOR_BUILD |
f987b7a5 | 115 | CFLAGS_FOR_BUILD:=-g -O2 |
afc61c6e BRF |
116 | endif |
117 | export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD | |
118 | ||
119 | ||
2d523c23 | 120 | ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) |
54e098e4 | 121 | |
99cf7293 | 122 | # cc-option |
18d979c7 | 123 | # Usage: cflags-y+=$(call cc-option, -march=winchip-c6, -march=i586) |
99cf7293 BRF |
124 | # sets -march=winchip-c6 if supported else falls back to -march=i586 |
125 | # without checking the latter. | |
18d979c7 | 126 | cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ |
99cf7293 BRF |
127 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) |
128 | ||
2c649045 PK |
129 | ############################################################# |
130 | # | |
131 | # Hide troublesome environment variables from sub processes | |
132 | # | |
133 | ############################################################# | |
134 | unexport CROSS_COMPILE | |
135 | unexport ARCH | |
27bc59d4 | 136 | |
08782ae7 EA |
137 | ############################################################# |
138 | # | |
c6e43c9d | 139 | # Setup the proper filename extensions for the host |
08782ae7 | 140 | # |
7dcbbfbb BRF |
141 | ############################################################## |
142 | ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),) | |
c6e43c9d BRF |
143 | HOST_EXEEXT:= |
144 | HOST_LIBEXT:=.a | |
145 | HOST_SHREXT:=.so | |
3096f34d | 146 | endif |
7dcbbfbb | 147 | ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),) |
c6e43c9d BRF |
148 | HOST_EXEEXT:= |
149 | HOST_LIBEXT:=.a | |
150 | HOST_SHREXT:=.dylib | |
3096f34d | 151 | endif |
7dcbbfbb | 152 | ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),) |
c6e43c9d BRF |
153 | HOST_EXEEXT:=.exe |
154 | HOST_LIBEXT:=.lib | |
155 | HOST_SHREXT:=.dll | |
3096f34d | 156 | endif |
7dcbbfbb | 157 | ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),) |
c6e43c9d BRF |
158 | HOST_EXEEXT:=.exe |
159 | HOST_LIBEXT:=.lib | |
160 | HOST_SHREXT:=.dll | |
3096f34d | 161 | endif |
cb7d5b81 | 162 | |
c6e43c9d | 163 | # The preferred type of libs we build for the target |
3096f34d | 164 | ifeq ($(BR2_PREFER_STATIC_LIB),y) |
c6e43c9d | 165 | LIBTGTEXT=.a |
8027784c | 166 | #PREFERRED_LIB_FLAGS:=--disable-shared --enable-static |
3096f34d | 167 | else |
c6e43c9d | 168 | LIBTGTEXT=.so |
8027784c | 169 | #PREFERRED_LIB_FLAGS:=--disable-static --enable-shared |
3096f34d | 170 | endif |
8027784c | 171 | PREFERRED_LIB_FLAGS:=--enable-static --enable-shared |
ffde94bd | 172 | |
6ad07203 | 173 | ############################################################## |
7dcbbfbb BRF |
174 | # |
175 | # The list of stuff to build for the target toolchain | |
176 | # along with the packages to build for the target. | |
177 | # | |
178 | ############################################################## | |
4b0d5a80 | 179 | ifeq ($(BR2_TOOLCHAIN_SOURCE),y) |
4909da41 | 180 | BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils |
7dcbbfbb | 181 | else |
acc706b7 | 182 | BASE_TARGETS:=uclibc |
7dcbbfbb | 183 | endif |
acc706b7 BRF |
184 | TARGETS:= |
185 | ||
18d979c7 | 186 | # setup our pathes |
f958d897 | 187 | include project/Makefile.in |
1dbe6e33 BRF |
188 | |
189 | BR2_DEPENDS_DIR=$(PROJECT_BUILD_DIR)/buildroot-config | |
190 | ||
7dcbbfbb BRF |
191 | include toolchain/Makefile.in |
192 | include package/Makefile.in | |
193 | ||
194 | ############################################################# | |
195 | # | |
196 | # You should probably leave this stuff alone unless you know | |
197 | # what you are doing. | |
198 | # | |
199 | ############################################################# | |
200 | ||
6547bced | 201 | all: world |
ffde94bd | 202 | |
2d523c23 EA |
203 | # In this section, we need .config |
204 | include .config.cmd | |
205 | ||
f958d897 US |
206 | include project/*.mk |
207 | ||
d06645d8 EA |
208 | # We also need the various per-package makefiles, which also add |
209 | # each selected package to TARGETS if that package was selected | |
210 | # in the .config file. | |
4b0d5a80 | 211 | ifeq ($(BR2_TOOLCHAIN_SOURCE),y) |
acc706b7 | 212 | # avoid pulling in external toolchain which is broken for toplvl parallel builds |
57310ec6 BRF |
213 | # Explicit ordering: |
214 | include toolchain/dependencies/dependencies.mk | |
215 | include toolchain/binutils/binutils.mk | |
216 | include toolchain/ccache/ccache.mk | |
217 | include toolchain/elf2flt/elf2flt.mk | |
218 | include toolchain/gcc/gcc-uclibc-3.x.mk | |
219 | include toolchain/gcc/gcc-uclibc-4.x.mk | |
220 | include toolchain/gdb/gdb.mk | |
221 | include toolchain/kernel-headers/kernel-headers.mk | |
222 | include toolchain/mklibs/mklibs.mk | |
223 | include toolchain/sstrip/sstrip.mk | |
224 | include toolchain/uClibc/uclibc.mk | |
acc706b7 | 225 | else |
d06645d8 | 226 | include toolchain/*/*.mk |
acc706b7 BRF |
227 | endif |
228 | ||
62b5ae4b SH |
229 | ifeq ($(BR2_PACKAGE_LINUX),y) |
230 | TARGETS+=linux26-modules | |
231 | endif | |
acc706b7 | 232 | |
d06645d8 | 233 | include package/*/*.mk |
d06645d8 | 234 | |
79f5f1e8 EA |
235 | # target stuff is last so it can override anything else |
236 | include target/Makefile.in | |
237 | ||
c2fc93bc US |
238 | TARGETS+=erase-fakeroots |
239 | ||
08782ae7 | 240 | TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) |
3b08e64d | 241 | TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) |
08782ae7 | 242 | TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS)) |
b3efde23 | 243 | TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS)) |
acc706b7 | 244 | # all targets depend on the crosscompiler and it's prerequisites |
b3efde23 | 245 | $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) % |
acc706b7 | 246 | |
1dbe6e33 BRF |
247 | $(BR2_DEPENDS_DIR): .config |
248 | rm -rf $@ | |
b3efde23 | 249 | mkdir -p $(@D) |
1dbe6e33 BRF |
250 | cp -dpRf $(CONFIG)/buildroot-config $@ |
251 | ||
5ef9e52b | 252 | dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ |
1dbe6e33 | 253 | $(BR2_DEPENDS_DIR) \ |
5ef9e52b | 254 | $(BINARIES_DIR) $(PROJECT_BUILD_DIR) |
f958d897 | 255 | |
5ef9e52b | 256 | $(BASE_TARGETS): dirs |
f958d897 | 257 | |
b3efde23 | 258 | world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL) |
ffde94bd | 259 | |
5ef9e52b | 260 | |
f958d897 | 261 | .PHONY: all world dirs clean dirclean distclean source \ |
b3efde23 | 262 | $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \ |
747b16dd | 263 | $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \ |
5ef9e52b | 264 | $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ |
1dbe6e33 | 265 | $(BR2_DEPENDS_DIR) \ |
5ef9e52b | 266 | $(BINARIES_DIR) $(PROJECT_BUILD_DIR) |
ffde94bd | 267 | |
08782ae7 EA |
268 | ############################################################# |
269 | # | |
ef407d3d | 270 | # staging and target directories do NOT list these as |
d99c31c6 | 271 | # dependencies anywhere else |
08782ae7 EA |
272 | # |
273 | ############################################################# | |
5ef9e52b | 274 | $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) \ |
c6771dfb | 275 | $(PROJECT_BUILD_DIR) $(BINARIES_DIR): |
8d583fc0 | 276 | @mkdir -p $@ |
3ad3d8a1 | 277 | |
08782ae7 | 278 | $(STAGING_DIR): |
9c865d75 | 279 | @mkdir -p $(STAGING_DIR)/bin |
bf38723f | 280 | @mkdir -p $(STAGING_DIR)/lib |
7e0c890c | 281 | ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) |
8027784c BRF |
282 | @mkdir -p $(STAGING_DIR)/usr/lib |
283 | else | |
284 | @ln -snf . $(STAGING_DIR)/usr | |
285 | @mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME) | |
3da708e4 | 286 | @ln -snf ../lib $(STAGING_DIR)/usr/lib |
8027784c BRF |
287 | @ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib |
288 | endif | |
289 | @mkdir -p $(STAGING_DIR)/usr/include | |
ffde94bd | 290 | |
c6771dfb | 291 | $(PROJECT_BUILD_DIR)/.root: |
7547c7eb | 292 | mkdir -p $(TARGET_DIR) |
f0ca4b82 BRF |
293 | if ! [ -d "$(TARGET_DIR)/bin" ]; then \ |
294 | if [ -d "$(TARGET_SKELETON)" ]; then \ | |
18d979c7 | 295 | cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \ |
74cda1e4 | 296 | fi; \ |
18d979c7 | 297 | touch $(STAGING_DIR)/.fakeroot.00000; \ |
f0ca4b82 BRF |
298 | fi |
299 | -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf | |
300 | -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf | |
7547c7eb | 301 | touch $@ |
08782ae7 | 302 | |
1dbe6e33 | 303 | $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root |
c6771dfb | 304 | |
c2fc93bc | 305 | erase-fakeroots: |
5d2be049 | 306 | rm -f $(PROJECT_BUILD_DIR)/.fakeroot* |
412ca2a4 | 307 | |
3b08e64d | 308 | source: $(TARGETS_SOURCE) $(HOST_SOURCE) |
08782ae7 | 309 | |
6547bced | 310 | _source-check: |
e7c08c29 | 311 | $(MAKE) SPIDER=--spider source |
825ff341 | 312 | |
08782ae7 EA |
313 | ############################################################# |
314 | # | |
315 | # Cleanup and misc junk | |
316 | # | |
317 | ############################################################# | |
318 | clean: $(TARGETS_CLEAN) | |
3ad3d8a1 | 319 | rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) |
08782ae7 EA |
320 | |
321 | dirclean: $(TARGETS_DIRCLEAN) | |
3ad3d8a1 | 322 | rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) |
08782ae7 EA |
323 | |
324 | distclean: | |
5bc1f0c3 MF |
325 | ifeq ($(DL_DIR),$(BASE_DIR)/dl) |
326 | rm -rf $(DL_DIR) | |
327 | endif | |
6547bced | 328 | rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR) \ |
412ca2a4 | 329 | $(LINUX_KERNEL) $(IMAGE) $(BASE_DIR)/include \ |
81df2264 | 330 | .config.cmd |
b5136193 | 331 | $(MAKE) -C $(CONFIG) clean |
08782ae7 | 332 | |
3ad3d8a1 | 333 | sourceball: |
6547bced | 334 | rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR) |
08782ae7 EA |
335 | set -e; \ |
336 | cd ..; \ | |
337 | rm -f buildroot.tar.bz2; \ | |
338 | tar -cvf buildroot.tar buildroot; \ | |
339 | bzip2 -9 buildroot.tar; \ | |
2d523c23 EA |
340 | |
341 | ||
342 | else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) | |
343 | ||
344 | all: menuconfig | |
345 | ||
346 | # configuration | |
347 | # --------------------------------------------------------------------------- | |
348 | ||
c0d7d4e0 BRF |
349 | HOSTCFLAGS=$(CFLAGS_FOR_BUILD) |
350 | export HOSTCFLAGS | |
351 | ||
2d523c23 | 352 | $(CONFIG)/conf: |
1dbe6e33 | 353 | @mkdir -p $(CONFIG)/buildroot-config |
fb2c8fec | 354 | $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf |
18d979c7 | 355 | -@if [ ! -f .config ]; then \ |
2d523c23 EA |
356 | cp $(CONFIG_DEFCONFIG) .config; \ |
357 | fi | |
358 | $(CONFIG)/mconf: | |
1dbe6e33 | 359 | @mkdir -p $(CONFIG)/buildroot-config |
fb2c8fec | 360 | $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf mconf |
18d979c7 | 361 | -@if [ ! -f .config ]; then \ |
2d523c23 EA |
362 | cp $(CONFIG_DEFCONFIG) .config; \ |
363 | fi | |
364 | ||
365 | menuconfig: $(CONFIG)/mconf | |
7b403ada | 366 | @mkdir -p $(CONFIG)/buildroot-config |
153b1bea | 367 | @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
62b5ae4b | 368 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ |
153b1bea BRF |
369 | $(CONFIG)/mconf $(CONFIG_CONFIG_IN); then \ |
370 | test -f .config.cmd || rm -f .config; \ | |
371 | fi | |
2d523c23 EA |
372 | |
373 | config: $(CONFIG)/conf | |
7b403ada | 374 | @mkdir -p $(CONFIG)/buildroot-config |
62b5ae4b SH |
375 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
376 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ | |
f987b7a5 | 377 | $(CONFIG)/conf $(CONFIG_CONFIG_IN) |
2d523c23 EA |
378 | |
379 | oldconfig: $(CONFIG)/conf | |
7b403ada | 380 | @mkdir -p $(CONFIG)/buildroot-config |
62b5ae4b SH |
381 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
382 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ | |
f987b7a5 | 383 | $(CONFIG)/conf -o $(CONFIG_CONFIG_IN) |
2d523c23 EA |
384 | |
385 | randconfig: $(CONFIG)/conf | |
7b403ada | 386 | @mkdir -p $(CONFIG)/buildroot-config |
62b5ae4b SH |
387 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
388 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ | |
f987b7a5 | 389 | $(CONFIG)/conf -r $(CONFIG_CONFIG_IN) |
2d523c23 EA |
390 | |
391 | allyesconfig: $(CONFIG)/conf | |
f987b7a5 | 392 | cat $(CONFIG_DEFCONFIG) > .config |
7b403ada | 393 | @mkdir -p $(CONFIG)/buildroot-config |
62b5ae4b SH |
394 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
395 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ | |
f987b7a5 | 396 | $(CONFIG)/conf -y $(CONFIG_CONFIG_IN) |
2d523c23 | 397 | #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config |
2d523c23 EA |
398 | |
399 | allnoconfig: $(CONFIG)/conf | |
7b403ada | 400 | @mkdir -p $(CONFIG)/buildroot-config |
62b5ae4b SH |
401 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
402 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ | |
f987b7a5 | 403 | $(CONFIG)/conf -n $(CONFIG_CONFIG_IN) |
2d523c23 EA |
404 | |
405 | defconfig: $(CONFIG)/conf | |
7b403ada | 406 | @mkdir -p $(CONFIG)/buildroot-config |
62b5ae4b SH |
407 | @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ |
408 | KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ | |
f987b7a5 | 409 | $(CONFIG)/conf -d $(CONFIG_CONFIG_IN) |
2d523c23 | 410 | |
6547bced | 411 | # check if download URLs are outdated |
825ff341 BRF |
412 | source-check: allyesconfig |
413 | $(MAKE) _source-check | |
414 | ||
2d523c23 EA |
415 | ############################################################# |
416 | # | |
417 | # Cleanup and misc junk | |
418 | # | |
419 | ############################################################# | |
420 | clean: | |
421 | rm -f .config .config.old .config.cmd .tmpconfig.h | |
18d979c7 | 422 | -$(MAKE) -C $(CONFIG) clean |
2d523c23 EA |
423 | |
424 | distclean: clean | |
425 | rm -rf sources/* | |
426 | ||
427 | endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) | |
428 | ||
ba2e7e02 BRF |
429 | %_defconfig: $(CONFIG)/conf |
430 | cp $(shell find ./target/ -name $@) .config | |
8820d63a | 431 | -@$(MAKE) oldconfig |
ba2e7e02 | 432 | |
5459a9c5 | 433 | configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config |
b8f28d65 US |
434 | |
435 | cross: $(BASE_TARGETS) | |
436 | ||
e491fba2 BRF |
437 | help: |
438 | @echo 'Cleaning:' | |
439 | @echo ' clean - delete temporary files created by build' | |
440 | @echo ' distclean - delete all non-source files (including .config)' | |
441 | @echo | |
442 | @echo 'Build:' | |
443 | @echo ' all - make world' | |
444 | @echo | |
445 | @echo 'Configuration:' | |
446 | @echo ' menuconfig - interactive curses-based configurator' | |
447 | @echo ' oldconfig - resolve any unresolved symbols in .config' | |
448 | @echo | |
449 | @echo 'Miscellaneous:' | |
450 | @echo ' source - download all sources needed for offline-build' | |
03380402 | 451 | @echo ' source-check - check all packages for valid download URLs' |
e491fba2 | 452 | @echo |
232fa7ee | 453 | @echo 'See docs/README and docs/buildroot.html for further details' |
663dee48 | 454 | @echo |
ba2e7e02 | 455 | |
2d523c23 | 456 | .PHONY: dummy subdirs release distclean clean config oldconfig \ |
e491fba2 | 457 | menuconfig tags check test depend defconfig help |
633c8cbf | 458 |