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