]> Git Repo - buildroot-mgba.git/blame - Makefile
Update atstk100x BSP
[buildroot-mgba.git] / Makefile
CommitLineData
2d523c23 1# Makefile for buildroot2
ffde94bd 2#
15b26aee 3# Copyright (C) 1999-2005 by Erik Andersen <[email protected]>
2671be4d 4# Copyright (C) 2006-2009 by the Buildroot developers <[email protected]>
ffde94bd 5#
08782ae7 6# This program is free software; you can redistribute it and/or modify
2d523c23
EA
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
ffde94bd 10#
2d523c23
EA
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
08782ae7 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2d523c23 14# General Public License for more details.
b30d673c 15#
2d523c23
EA
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3ad3d8a1 19#
02bf5816 20
2d523c23
EA
21#--------------------------------------------------------------
22# Just run 'make menuconfig', configure stuff, then run 'make'.
23# You shouldn't need to mess with anything beyond this point...
24#--------------------------------------------------------------
25TOPDIR=./
18d979c7
BRF
26CONFIG_CONFIG_IN=Config.in
27CONFIG_DEFCONFIG=.defconfig
28CONFIG=package/config
a8ee1240 29DATE:=$(shell date +%Y%m%d)
a0aef7c4 30
18d979c7 31noconfig_targets:=menuconfig config oldconfig randconfig \
6547bced 32 defconfig allyesconfig allnoconfig release tags \
e491fba2 33 source-check help
9e250356 34
cad58108 35
a1b0651a 36# Use shell variables, if defined
7521f373 37ifneq ($(BUILDROOT_LOCAL),)
efd8576c 38BR2_LOCAL:=$(BUILDROOT_LOCAL)
7521f373 39else
2ad346ab 40BR2_LOCAL:=$(TOPDIR)/local
a1b0651a
US
41endif
42
f85f2de1
PK
43# Variables for use in Make constructs
44comma:=,
45empty:=
46space:=$(empty) $(empty)
47
a1b0651a
US
48# $(shell find . -name *_defconfig |sed 's/.*\///')
49# Pull in the user's configuration file
50ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
51ifeq ($(BOARD),)
52# if "make BOARD=xyz" command
d45f355d 53-include .config
a1b0651a
US
54else
55# if "make" command
efd8576c 56-include $(BR2_LOCAL)/$(BOARD)/$(BOARD).config
a1b0651a 57endif
7521f373 58endif
9741a49e 59
efd8576c
US
60# Override BR2_DL_DIR if shell variable defined
61ifneq ($(BUILDROOT_DL_DIR),)
62BR2_DL_DIR:=$(BUILDROOT_DL_DIR)
63endif
64LOCAL:=$(BR2_LOCAL)
65
afc61c6e
BRF
66# To put more focus on warnings, be less verbose as default
67# Use 'make V=1' to see the full commands
68ifdef V
69 ifeq ("$(origin V)", "command line")
18d979c7 70 KBUILD_VERBOSE=$(V)
afc61c6e
BRF
71 endif
72endif
73ifndef KBUILD_VERBOSE
18d979c7 74 KBUILD_VERBOSE=0
afc61c6e
BRF
75endif
76
77ifeq ($(KBUILD_VERBOSE),1)
4df454e9 78 quiet=
18d979c7 79 Q=
1669b6ed
BRF
80ifndef VERBOSE
81 VERBOSE=1
82endif
afc61c6e
BRF
83else
84 quiet=quiet_
18d979c7 85 Q=@
afc61c6e
BRF
86endif
87
69f85924
PK
88# we want bash as shell
89SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
afc61c6e 90 else if [ -x /bin/bash ]; then echo /bin/bash; \
18d979c7 91 else echo sh; fi; fi)
afc61c6e 92
69f85924
PK
93# kconfig uses CONFIG_SHELL
94CONFIG_SHELL:=$(SHELL)
95
96export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
afc61c6e
BRF
97
98ifndef HOSTAR
99HOSTAR:=ar
100endif
101ifndef HOSTAS
102HOSTAS:=as
103endif
104ifndef HOSTCC
105HOSTCC:=gcc
106else
107endif
108ifndef HOSTCXX
109HOSTCXX:=g++
110endif
5f97580e
BRF
111ifndef HOSTFC
112HOSTFC:=gfortran
113endif
356133b4
US
114ifndef HOSTCPP
115HOSTCPP:=cpp
116endif
afc61c6e
BRF
117ifndef HOSTLD
118HOSTLD:=ld
119endif
0f9c5b11
US
120ifndef HOSTLN
121HOSTLN:=ln
122endif
356133b4
US
123ifndef HOSTNM
124HOSTNM:=nm
125endif
69f85924
PK
126HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
127HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
128HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
129HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
130HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
131HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
132HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
133HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
134HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
54e93328 135
afc61c6e 136ifndef CFLAGS_FOR_BUILD
f987b7a5 137CFLAGS_FOR_BUILD:=-g -O2
afc61c6e 138endif
5f97580e
BRF
139ifndef CXXFLAGS_FOR_BUILD
140CXXFLAGS_FOR_BUILD:=-g -O2
141endif
142ifndef FCFLAGS_FOR_BUILD
143FCFLAGS_FOR_BUILD:=-g -O2
144endif
145export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
afc61c6e
BRF
146
147
cfe511b2 148ifeq ($(BR2_HAVE_DOT_CONFIG),y)
54e098e4 149
99cf7293 150# cc-option
18d979c7 151# Usage: cflags-y+=$(call cc-option, -march=winchip-c6, -march=i586)
99cf7293
BRF
152# sets -march=winchip-c6 if supported else falls back to -march=i586
153# without checking the latter.
18d979c7 154cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
99cf7293
BRF
155 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
156
2c649045
PK
157#############################################################
158#
159# Hide troublesome environment variables from sub processes
160#
161#############################################################
162unexport CROSS_COMPILE
163unexport ARCH
27bc59d4 164
08782ae7
EA
165#############################################################
166#
c6e43c9d 167# Setup the proper filename extensions for the host
08782ae7 168#
7dcbbfbb
BRF
169##############################################################
170ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),)
c6e43c9d
BRF
171HOST_EXEEXT:=
172HOST_LIBEXT:=.a
173HOST_SHREXT:=.so
3096f34d 174endif
7dcbbfbb 175ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),)
c6e43c9d
BRF
176HOST_EXEEXT:=
177HOST_LIBEXT:=.a
178HOST_SHREXT:=.dylib
3096f34d 179endif
7dcbbfbb 180ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),)
c6e43c9d
BRF
181HOST_EXEEXT:=.exe
182HOST_LIBEXT:=.lib
183HOST_SHREXT:=.dll
2c279671
PK
184HOST_LOADLIBES="-lcurses -lintl"
185export HOST_LOADLIBES
3096f34d 186endif
7dcbbfbb 187ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),)
c6e43c9d
BRF
188HOST_EXEEXT:=.exe
189HOST_LIBEXT:=.lib
190HOST_SHREXT:=.dll
3096f34d 191endif
cb7d5b81 192
c6e43c9d 193# The preferred type of libs we build for the target
3096f34d 194ifeq ($(BR2_PREFER_STATIC_LIB),y)
c6e43c9d 195LIBTGTEXT=.a
8027784c 196#PREFERRED_LIB_FLAGS:=--disable-shared --enable-static
3096f34d 197else
c6e43c9d 198LIBTGTEXT=.so
8027784c 199#PREFERRED_LIB_FLAGS:=--disable-static --enable-shared
3096f34d 200endif
8027784c 201PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
ffde94bd 202
6ad07203 203##############################################################
7dcbbfbb
BRF
204#
205# The list of stuff to build for the target toolchain
206# along with the packages to build for the target.
207#
208##############################################################
4b0d5a80 209ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
3d8919a1 210BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
7dcbbfbb 211else
51f5f627 212BASE_TARGETS:=uclibc
7dcbbfbb 213endif
acc706b7
BRF
214TARGETS:=
215
cf7d9872 216# setup our paths
f958d897 217include project/Makefile.in
1dbe6e33
BRF
218
219BR2_DEPENDS_DIR=$(PROJECT_BUILD_DIR)/buildroot-config
220
7dcbbfbb
BRF
221include toolchain/Makefile.in
222include package/Makefile.in
223
224#############################################################
225#
226# You should probably leave this stuff alone unless you know
227# what you are doing.
228#
229#############################################################
230
6547bced 231all: world
ffde94bd 232
2d523c23
EA
233# In this section, we need .config
234include .config.cmd
235
f958d897
US
236include project/*.mk
237
d06645d8
EA
238# We also need the various per-package makefiles, which also add
239# each selected package to TARGETS if that package was selected
240# in the .config file.
4b0d5a80 241ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
acc706b7 242# avoid pulling in external toolchain which is broken for toplvl parallel builds
57310ec6
BRF
243# Explicit ordering:
244include toolchain/dependencies/dependencies.mk
245include toolchain/binutils/binutils.mk
246include toolchain/ccache/ccache.mk
247include toolchain/elf2flt/elf2flt.mk
248include toolchain/gcc/gcc-uclibc-3.x.mk
249include toolchain/gcc/gcc-uclibc-4.x.mk
250include toolchain/gdb/gdb.mk
251include toolchain/kernel-headers/kernel-headers.mk
252include toolchain/mklibs/mklibs.mk
253include toolchain/sstrip/sstrip.mk
254include toolchain/uClibc/uclibc.mk
acc706b7 255else
d06645d8 256include toolchain/*/*.mk
acc706b7
BRF
257endif
258
62b5ae4b
SH
259ifeq ($(BR2_PACKAGE_LINUX),y)
260TARGETS+=linux26-modules
261endif
acc706b7 262
d06645d8 263include package/*/*.mk
d06645d8 264
d45de0ca
JV
265TARGETS+=target-devfiles
266
79f5f1e8
EA
267# target stuff is last so it can override anything else
268include target/Makefile.in
269
02a623dd 270TARGETS+=erase-fakeroots
c2fc93bc 271
08782ae7 272TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
3b08e64d 273TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
08782ae7 274TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
b3efde23 275TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS))
acc706b7 276# all targets depend on the crosscompiler and it's prerequisites
b3efde23 277$(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
acc706b7 278
1dbe6e33
BRF
279$(BR2_DEPENDS_DIR): .config
280 rm -rf $@
b3efde23 281 mkdir -p $(@D)
1dbe6e33
BRF
282 cp -dpRf $(CONFIG)/buildroot-config $@
283
5ef9e52b 284dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
7167dede
HCE
285 $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \
286 $(PROJECT_BUILD_DIR)/autotools-stamps
f958d897 287
5ef9e52b 288$(BASE_TARGETS): dirs
f958d897 289
b3efde23 290world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL)
ffde94bd 291
5ef9e52b 292
f958d897 293.PHONY: all world dirs clean dirclean distclean source \
b3efde23 294 $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
747b16dd 295 $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
5ef9e52b 296 $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
7167dede
HCE
297 $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \
298 $(PROJECT_BUILD_DIR)/autotools-stamps
ffde94bd 299
08782ae7
EA
300#############################################################
301#
ef407d3d 302# staging and target directories do NOT list these as
d99c31c6 303# dependencies anywhere else
08782ae7
EA
304#
305#############################################################
7167dede
HCE
306$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(PROJECT_BUILD_DIR) \
307 $(PROJECT_BUILD_DIR)/autotools-stamps $(BINARIES_DIR):
8d583fc0 308 @mkdir -p $@
3ad3d8a1 309
08782ae7 310$(STAGING_DIR):
9c865d75 311 @mkdir -p $(STAGING_DIR)/bin
bf38723f 312 @mkdir -p $(STAGING_DIR)/lib
7e0c890c 313ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
8027784c
BRF
314 @mkdir -p $(STAGING_DIR)/usr/lib
315else
f5905dc9 316ifneq ($(BR2_TOOLCHAIN_EXTERNAL),y)
8027784c
BRF
317 @ln -snf . $(STAGING_DIR)/usr
318 @mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)
3da708e4 319 @ln -snf ../lib $(STAGING_DIR)/usr/lib
8027784c 320 @ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
f5905dc9 321endif
8027784c
BRF
322endif
323 @mkdir -p $(STAGING_DIR)/usr/include
ffde94bd 324
c6771dfb 325$(PROJECT_BUILD_DIR)/.root:
7547c7eb 326 mkdir -p $(TARGET_DIR)
f0ca4b82
BRF
327 if ! [ -d "$(TARGET_DIR)/bin" ]; then \
328 if [ -d "$(TARGET_SKELETON)" ]; then \
18d979c7 329 cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \
74cda1e4 330 fi; \
18d979c7 331 touch $(STAGING_DIR)/.fakeroot.00000; \
f0ca4b82 332 fi
e0137736 333 -find $(TARGET_DIR) -type d -name CVS -o -name .svn | xargs rm -rf
6a262b14 334 -find $(TARGET_DIR) -type f -name .empty | xargs rm -rf
7547c7eb 335 touch $@
08782ae7 336
1dbe6e33 337$(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
c6771dfb 338
c2fc93bc 339erase-fakeroots:
5d2be049 340 rm -f $(PROJECT_BUILD_DIR)/.fakeroot*
412ca2a4 341
bc67ca29 342target-devfiles:
d45de0ca
JV
343ifeq ($(BR2_HAVE_DEVFILES),y)
344 ( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
bc67ca29 345else
926646d9 346 rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig
02a623dd
PK
347 find $(TARGET_DIR)/usr/lib -name '*.a' -delete
348 find $(TARGET_DIR)/lib -name '*.a' -delete
349 find $(TARGET_DIR)/usr/lib -name '*.la' -delete
350 find $(TARGET_DIR)/lib -name '*.la' -delete
bc67ca29
JV
351endif
352
3b08e64d 353source: $(TARGETS_SOURCE) $(HOST_SOURCE)
08782ae7 354
6547bced 355_source-check:
e7c08c29 356 $(MAKE) SPIDER=--spider source
825ff341 357
155971e0 358external-deps:
2ad346ab 359 @$(MAKE) -Bs BR2_WGET=$(TOPDIR)/toolchain/wget-show-external-deps.sh \
bcad6288 360 SPIDER=--spider source
155971e0 361
08782ae7
EA
362#############################################################
363#
364# Cleanup and misc junk
365#
366#############################################################
367clean: $(TARGETS_CLEAN)
346844d0 368 rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps
08782ae7
EA
369
370dirclean: $(TARGETS_DIRCLEAN)
346844d0 371 rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps
08782ae7
EA
372
373distclean:
5bc1f0c3
MF
374ifeq ($(DL_DIR),$(BASE_DIR)/dl)
375 rm -rf $(DL_DIR)
376endif
6547bced 377 rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR) \
db8eecfc 378 $(LINUX_KERNEL) $(BASE_DIR)/include \
81df2264 379 .config.cmd
b5136193 380 $(MAKE) -C $(CONFIG) clean
08782ae7 381
3ad3d8a1 382sourceball:
6547bced 383 rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR)
08782ae7
EA
384 set -e; \
385 cd ..; \
386 rm -f buildroot.tar.bz2; \
387 tar -cvf buildroot.tar buildroot; \
388 bzip2 -9 buildroot.tar; \
2d523c23
EA
389
390
cfe511b2 391else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
2d523c23
EA
392
393all: menuconfig
394
395# configuration
396# ---------------------------------------------------------------------------
397
c0d7d4e0
BRF
398HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
399export HOSTCFLAGS
400
2d523c23 401$(CONFIG)/conf:
1dbe6e33 402 @mkdir -p $(CONFIG)/buildroot-config
fb2c8fec 403 $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf
18d979c7 404 -@if [ ! -f .config ]; then \
2d523c23
EA
405 cp $(CONFIG_DEFCONFIG) .config; \
406 fi
407$(CONFIG)/mconf:
1dbe6e33 408 @mkdir -p $(CONFIG)/buildroot-config
fb2c8fec 409 $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf mconf
18d979c7 410 -@if [ ! -f .config ]; then \
2d523c23
EA
411 cp $(CONFIG_DEFCONFIG) .config; \
412 fi
413
414menuconfig: $(CONFIG)/mconf
7b403ada 415 @mkdir -p $(CONFIG)/buildroot-config
153b1bea 416 @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
62b5ae4b 417 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
153b1bea
BRF
418 $(CONFIG)/mconf $(CONFIG_CONFIG_IN); then \
419 test -f .config.cmd || rm -f .config; \
420 fi
2d523c23
EA
421
422config: $(CONFIG)/conf
7b403ada 423 @mkdir -p $(CONFIG)/buildroot-config
62b5ae4b
SH
424 @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
425 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
f987b7a5 426 $(CONFIG)/conf $(CONFIG_CONFIG_IN)
2d523c23
EA
427
428oldconfig: $(CONFIG)/conf
7b403ada 429 @mkdir -p $(CONFIG)/buildroot-config
62b5ae4b
SH
430 @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
431 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
f987b7a5 432 $(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
2d523c23
EA
433
434randconfig: $(CONFIG)/conf
7b403ada 435 @mkdir -p $(CONFIG)/buildroot-config
62b5ae4b
SH
436 @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
437 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
f987b7a5 438 $(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
2d523c23
EA
439
440allyesconfig: $(CONFIG)/conf
f987b7a5 441 cat $(CONFIG_DEFCONFIG) > .config
7b403ada 442 @mkdir -p $(CONFIG)/buildroot-config
62b5ae4b
SH
443 @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
444 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
f987b7a5 445 $(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
2d523c23 446 #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config
2d523c23
EA
447
448allnoconfig: $(CONFIG)/conf
7b403ada 449 @mkdir -p $(CONFIG)/buildroot-config
62b5ae4b
SH
450 @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
451 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
f987b7a5 452 $(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
2d523c23
EA
453
454defconfig: $(CONFIG)/conf
7b403ada 455 @mkdir -p $(CONFIG)/buildroot-config
62b5ae4b
SH
456 @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
457 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
f987b7a5 458 $(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
2d523c23 459
6547bced 460# check if download URLs are outdated
825ff341
BRF
461source-check: allyesconfig
462 $(MAKE) _source-check
463
2d523c23
EA
464#############################################################
465#
466# Cleanup and misc junk
467#
468#############################################################
469clean:
84518dc8 470 rm -f .config .config.old .config.cmd .tmpconfig.h .lognr.*
18d979c7 471 -$(MAKE) -C $(CONFIG) clean
2d523c23
EA
472
473distclean: clean
474 rm -rf sources/*
475
13a85e3c
US
476flush:
477 rm -f $(PROJECT_BUILD_DIR)/tgt-config.cache
478
cfe511b2 479endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
2d523c23 480
ba2e7e02
BRF
481%_defconfig: $(CONFIG)/conf
482 cp $(shell find ./target/ -name $@) .config
8820d63a 483 -@$(MAKE) oldconfig
ba2e7e02 484
82c92e1e
US
485update:
486 cp .config $(BOARD_PATH)/$(BOARD_NAME)_defconfig
487
5459a9c5 488configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config
b8f28d65 489
126bb72f
US
490prepatch: gcc-patched binutils-patched gdb-patched uclibc-patched
491
84518dc8 492.lognr.$(PROJECT):
9220e90b 493 @echo "0" > .lognr.$(PROJECT)
def8b8d1 494
84518dc8 495log: .lognr.$(PROJECT)
9220e90b 496 @expr `cat .lognr.$(PROJECT)` + 1 > .lognr.$(PROJECT)
84518dc8 497 @echo Creating $(PROJECT)-`cat .lognr.$(PROJECT)`.log
02a623dd 498 @$(MAKE) > $(PROJECT)-`cat .lognr.$(PROJECT)`.log 2>&1
9220e90b 499
195df2e1 500
b8f28d65
US
501cross: $(BASE_TARGETS)
502
e491fba2
BRF
503help:
504 @echo 'Cleaning:'
505 @echo ' clean - delete temporary files created by build'
506 @echo ' distclean - delete all non-source files (including .config)'
507 @echo
508 @echo 'Build:'
509 @echo ' all - make world'
510 @echo
511 @echo 'Configuration:'
512 @echo ' menuconfig - interactive curses-based configurator'
513 @echo ' oldconfig - resolve any unresolved symbols in .config'
7b2ec610 514 @echo ' configured - make {uclibc/busybox/linux26}-config'
386b8139
HCE
515 @echo ' saveconfig - save current configuration under local/<project>'
516 @echo ' getconfig - restore saved configuration from local/<project>'
e491fba2
BRF
517 @echo
518 @echo 'Miscellaneous:'
519 @echo ' source - download all sources needed for offline-build'
03380402 520 @echo ' source-check - check all packages for valid download URLs'
155971e0 521 @echo ' external-deps - list external packages used'
13a85e3c 522 @echo ' flush - flush configuration cache'
e491fba2 523 @echo
232fa7ee 524 @echo 'See docs/README and docs/buildroot.html for further details'
663dee48 525 @echo
ba2e7e02 526
e62d2ecd
PK
527release: distclean
528 OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
529 rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
530 tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
531 rm -rf $$OUT
532
2d523c23 533.PHONY: dummy subdirs release distclean clean config oldconfig \
e491fba2 534 menuconfig tags check test depend defconfig help
50cbb4a1 535
This page took 0.237796 seconds and 4 git commands to generate.