]> Git Repo - buildroot-mgba.git/blame - Makefile
oprofile: fix install for avr32
[buildroot-mgba.git] / Makefile
CommitLineData
6cbdfb64 1# Makefile for buildroot
ffde94bd 2#
15b26aee 3# Copyright (C) 1999-2005 by Erik Andersen <[email protected]>
26b11df7 4# Copyright (C) 2006-2013 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#--------------------------------------------------------------
2d239bbe 25
e5e8fae8 26# Set and export the version string
d1476d0e 27export BR2_VERSION:=2014.02-git
e5e8fae8 28
0edfb24c
TDS
29# Check for minimal make version (note: this check will break at make 10.x)
30MIN_MAKE_VERSION=3.81
8139e21c 31ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
0edfb24c
TDS
32$(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
33endif
34
1d4104f0
FP
35export HOSTARCH := $(shell uname -m | \
36 sed -e s/i.86/x86/ \
37 -e s/sun4u/sparc64/ \
38 -e s/arm.*/arm/ \
39 -e s/sa110/arm/ \
40 -e s/ppc64/powerpc/ \
41 -e s/ppc/powerpc/ \
42 -e s/macppc/powerpc/\
43 -e s/sh.*/sh/)
44
2d239bbe
YM
45# This top-level Makefile can *not* be executed in parallel
46.NOTPARALLEL:
47
6b1dd45b
PK
48# absolute path
49TOPDIR:=$(shell pwd)
18d979c7 50CONFIG_CONFIG_IN=Config.in
56da3859 51CONFIG=support/kconfig
a8ee1240 52DATE:=$(shell date +%Y%m%d)
a0aef7c4 53
8258df27
YM
54# Compute the full local version string so packages can use it as-is
55# Need to export it, so it can be got from environment in children (eg. mconf)
f082c7c5 56export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
8258df27 57
8b6585a9 58noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
1ed49963 59 %_defconfig allyesconfig allnoconfig silentoldconfig release \
6652770f 60 randpackageconfig allyespackageconfig allnopackageconfig \
9db3b47e 61 source-check print-version olddefconfig
9e250356 62
580c6d9b
TP
63# Strip quotes and then whitespaces
64qstrip=$(strip $(subst ",,$(1)))
65#"))
66
f85f2de1
PK
67# Variables for use in Make constructs
68comma:=,
69empty:=
70space:=$(empty) $(empty)
71
39ca6d50
WW
72ifneq ("$(origin O)", "command line")
73O:=output
74CONFIG_DIR:=$(TOPDIR)
aefad531 75NEED_WRAPPER=
39ca6d50
WW
76else
77# other packages might also support Linux-style out of tree builds
78# with the O=<dir> syntax (E.G. Busybox does). As make automatically
79# forwards command line variable definitions those packages get very
80# confused. Fix this by telling make to not do so
81MAKEOVERRIDES =
82# strangely enough O is still passed to submakes with MAKEOVERRIDES
83# (with make 3.81 atleast), the only thing that changes is the output
84# of the origin function (command line -> environment).
85# Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
86# To really make O go away, we have to override it.
87override O:=$(O)
88CONFIG_DIR:=$(O)
de846f6e
PK
89# we need to pass O= everywhere we call back into the toplevel makefile
90EXTRAMAKEARGS = O=$(O)
aefad531 91NEED_WRAPPER=y
39ca6d50
WW
92endif
93
bb335175
TDS
94# bash prints the name of the directory on 'cd <dir>' if CDPATH is
95# set, so unset it here to not cause problems. Notice that the export
96# line doesn't affect the environment of $(shell ..) calls, so
97# explictly throw away any output from 'cd' here.
98export CDPATH:=
99BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
100$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
101
a4239f7f
TP
102
103# Handling of BR2_EXTERNAL.
104#
105# The value of BR2_EXTERNAL is stored in .br-external in the output directory.
106# On subsequent invocations of make, it is read in. It can still be overridden
107# on the command line, therefore the file is re-created every time make is run.
108#
109# When BR2_EXTERNAL is not set, the .br-external file is removed and we point
110# to support/dummy-external. This makes sure we can unconditionally include the
111# Config.in and external.mk from the BR2_EXTERNAL directory. In this case,
112# override is necessary so the user can clear BR2_EXTERNAL from the command
113# line, but the dummy path is still used internally.
114
115BR2_EXTERNAL_FILE = $(BASE_DIR)/.br-external
116-include $(BR2_EXTERNAL_FILE)
117ifeq ($(BR2_EXTERNAL),)
118 override BR2_EXTERNAL = support/dummy-external
119 $(shell rm -f $(BR2_EXTERNAL_FILE))
120else
121 $(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE))
122endif
123
124
bb335175
TDS
125BUILD_DIR:=$(BASE_DIR)/build
126STAMP_DIR:=$(BASE_DIR)/stamps
127BINARIES_DIR:=$(BASE_DIR)/images
128TARGET_DIR:=$(BASE_DIR)/target
129# initial definition so that 'make clean' works for most users, even without
130# .config. HOST_DIR will be overwritten later when .config is included.
131HOST_DIR:=$(BASE_DIR)/host
132
133LEGAL_INFO_DIR=$(BASE_DIR)/legal-info
858334c2
TDS
134REDIST_SOURCES_DIR_TARGET=$(LEGAL_INFO_DIR)/sources
135REDIST_SOURCES_DIR_HOST=$(LEGAL_INFO_DIR)/host-sources
366f17f7
TDS
136LICENSE_FILES_DIR_TARGET=$(LEGAL_INFO_DIR)/licenses
137LICENSE_FILES_DIR_HOST=$(LEGAL_INFO_DIR)/host-licenses
cc4f34dd
TDS
138LEGAL_MANIFEST_CSV_TARGET=$(LEGAL_INFO_DIR)/manifest.csv
139LEGAL_MANIFEST_CSV_HOST=$(LEGAL_INFO_DIR)/host-manifest.csv
366f17f7
TDS
140LEGAL_LICENSES_TXT_TARGET=$(LEGAL_INFO_DIR)/licenses.txt
141LEGAL_LICENSES_TXT_HOST=$(LEGAL_INFO_DIR)/host-licenses.txt
bb335175
TDS
142LEGAL_WARNINGS=$(LEGAL_INFO_DIR)/.warnings
143LEGAL_REPORT=$(LEGAL_INFO_DIR)/README
144
2b0f4552
YM
145BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
146
a1b0651a
US
147# Pull in the user's configuration file
148ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
dcb79995 149-include $(BUILDROOT_CONFIG)
7521f373 150endif
9741a49e 151
afc61c6e
BRF
152# To put more focus on warnings, be less verbose as default
153# Use 'make V=1' to see the full commands
154ifdef V
155 ifeq ("$(origin V)", "command line")
18d979c7 156 KBUILD_VERBOSE=$(V)
afc61c6e
BRF
157 endif
158endif
159ifndef KBUILD_VERBOSE
18d979c7 160 KBUILD_VERBOSE=0
afc61c6e
BRF
161endif
162
163ifeq ($(KBUILD_VERBOSE),1)
4df454e9 164 quiet=
18d979c7 165 Q=
1669b6ed
BRF
166ifndef VERBOSE
167 VERBOSE=1
168endif
afc61c6e
BRF
169else
170 quiet=quiet_
18d979c7 171 Q=@
afc61c6e
BRF
172endif
173
69f85924
PK
174# we want bash as shell
175SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
afc61c6e 176 else if [ -x /bin/bash ]; then echo /bin/bash; \
18d979c7 177 else echo sh; fi; fi)
afc61c6e 178
69f85924
PK
179# kconfig uses CONFIG_SHELL
180CONFIG_SHELL:=$(SHELL)
181
182export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
afc61c6e
BRF
183
184ifndef HOSTAR
185HOSTAR:=ar
186endif
187ifndef HOSTAS
188HOSTAS:=as
189endif
190ifndef HOSTCC
191HOSTCC:=gcc
17b66aff 192HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
afc61c6e 193endif
0df02e12 194HOSTCC_NOCCACHE:=$(HOSTCC)
afc61c6e
BRF
195ifndef HOSTCXX
196HOSTCXX:=g++
17b66aff 197HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
afc61c6e 198endif
0df02e12 199HOSTCXX_NOCCACHE:=$(HOSTCXX)
5f97580e
BRF
200ifndef HOSTFC
201HOSTFC:=gfortran
202endif
356133b4
US
203ifndef HOSTCPP
204HOSTCPP:=cpp
205endif
afc61c6e
BRF
206ifndef HOSTLD
207HOSTLD:=ld
208endif
0f9c5b11
US
209ifndef HOSTLN
210HOSTLN:=ln
211endif
356133b4
US
212ifndef HOSTNM
213HOSTNM:=nm
214endif
f1f4451a
TP
215ifndef HOSTOBJCOPY
216HOSTOBJCOPY:=objcopy
217endif
218ifndef HOSTRANLIB
219HOSTRANLIB:=ranlib
220endif
69f85924
PK
221HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
222HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
69f85924
PK
223HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
224HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
225HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
226HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
227HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
f1f4451a
TP
228HOSTOBJCOPY:=$(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
229HOSTRANLIB:=$(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
54e93328 230
5f97580e 231export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
17b66aff 232export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
afc61c6e 233
670cb306
AV
234# Make sure pkg-config doesn't look outside the buildroot tree
235unexport PKG_CONFIG_PATH
4f607edf 236unexport PKG_CONFIG_SYSROOT_DIR
bdf472d5 237unexport PKG_CONFIG_LIBDIR
670cb306 238
91123a6f
TP
239# Having DESTDIR set in the environment confuses the installation
240# steps of some packages.
241unexport DESTDIR
242
bed61a7b
GZ
243# Causes breakage with packages that needs host-ruby
244unexport RUBYOPT
245
cfe511b2 246ifeq ($(BR2_HAVE_DOT_CONFIG),y)
54e098e4 247
95442bb3 248################################################################################
2c649045
PK
249#
250# Hide troublesome environment variables from sub processes
251#
95442bb3 252################################################################################
2c649045
PK
253unexport CROSS_COMPILE
254unexport ARCH
2bf3c166
DN
255unexport CC
256unexport CXX
257unexport CPP
258unexport CFLAGS
259unexport CXXFLAGS
260unexport GREP_OPTIONS
12c9f7dd 261unexport CONFIG_SITE
32314b44 262unexport QMAKESPEC
20ca008d 263unexport TERMINFO
27bc59d4 264
102a93bd 265GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
60281cbf 266
95442bb3 267################################################################################
7dcbbfbb
BRF
268#
269# The list of stuff to build for the target toolchain
270# along with the packages to build for the target.
271#
95442bb3 272################################################################################
17b66aff 273
8b0905bf 274BASE_TARGETS = toolchain
e57e4b96 275
acc706b7
BRF
276TARGETS:=
277
89464a96
PK
278# silent mode requested?
279QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)
280
397fe5cc
TP
281# Strip off the annoying quoting
282ARCH:=$(call qstrip,$(BR2_ARCH))
65e80a0b 283
891973f5
PK
284KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
285 -e s/i.86/i386/ -e s/sun4u/sparc64/ \
f59aeca6 286 -e s/arcle/arc/ \
8332ffab 287 -e s/arceb/arc/ \
891973f5 288 -e s/arm.*/arm/ -e s/sa110/arm/ \
b90a1030 289 -e s/aarch64/arm64/ \
871db074 290 -e s/bfin/blackfin/ \
891973f5
PK
291 -e s/parisc64/parisc/ \
292 -e s/powerpc64/powerpc/ \
293 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
294 -e s/sh.*/sh/)
295
397fe5cc
TP
296ZCAT:=$(call qstrip,$(BR2_ZCAT))
297BZCAT:=$(call qstrip,$(BR2_BZCAT))
177b4b4a 298XZCAT:=$(call qstrip,$(BR2_XZCAT))
397fe5cc
TP
299TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
300
a2b4f7fb
GZ
301# packages compiled for the host go here
302HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
397fe5cc 303
aebf199f
TP
304# locales to generate
305GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
306
6c3e3ad4 307TARGET_SKELETON=$(TOPDIR)/system/skeleton
397fe5cc 308
9226a990
TP
309# Location of a file giving a big fat warning that output/target
310# should not be used as the root filesystem.
311TARGET_DIR_WARNING_FILE=$(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
312
17b66aff
TP
313ifeq ($(BR2_CCACHE),y)
314CCACHE:=$(HOST_DIR)/usr/bin/ccache
43329076
TDS
315BUILDROOT_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
316export BUILDROOT_CACHE_DIR
17b66aff
TP
317HOSTCC := $(CCACHE) $(HOSTCC)
318HOSTCXX := $(CCACHE) $(HOSTCXX)
319endif
320
2b0f4552
YM
321# Scripts in support/ or post-build scripts may need to reference
322# these locations, so export them so it is easier to use
323export BUILDROOT_CONFIG
324export TARGET_DIR
325export STAGING_DIR
326export HOST_DIR
327export BINARIES_DIR
1300cb55 328export BASE_DIR
2b0f4552 329
95442bb3 330################################################################################
7dcbbfbb
BRF
331#
332# You should probably leave this stuff alone unless you know
333# what you are doing.
334#
95442bb3 335################################################################################
7dcbbfbb 336
6547bced 337all: world
ffde94bd 338
ebcfa987
AVEM
339# Include legacy before the other things, because package .mk files
340# may rely on it.
341ifneq ($(BR2_DEPRECATED),y)
342include Makefile.legacy
343endif
344
486253db 345include package/Makefile.in
a792668b
TDS
346include support/dependencies/dependencies.mk
347
d06645d8
EA
348# We also need the various per-package makefiles, which also add
349# each selected package to TARGETS if that package was selected
350# in the .config file.
8b0905bf
TP
351include toolchain/helpers.mk
352include toolchain/*/*.mk
acc706b7 353
ee0246e1
TP
354# Include the package override file if one has been provided in the
355# configuration.
356PACKAGE_OVERRIDE_FILE=$(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE))
357ifneq ($(PACKAGE_OVERRIDE_FILE),)
358-include $(PACKAGE_OVERRIDE_FILE)
359endif
360
741cbccb 361include $(sort $(wildcard package/*/*.mk))
d06645d8 362
64d8e9a0 363include boot/common.mk
64d8e9a0 364include linux/linux.mk
ec100c7e 365include system/system.mk
64d8e9a0 366
8eb8aaf9
TP
367include $(BR2_EXTERNAL)/external.mk
368
32faf351 369TARGETS+=target-finalize
d45de0ca 370
b87b4742
PK
371ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
372TARGETS+=target-purgelocales
373endif
374
381616e7 375ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
aebf199f
TP
376ifneq ($(GENERATE_LOCALE),)
377TARGETS+=target-generatelocales
378endif
379endif
380
217ef08a
TP
381ifeq ($(BR2_ECLIPSE_REGISTER),y)
382TARGETS+=toolchain-eclipse-register
383endif
384
649b5b92 385include fs/common.mk
79f5f1e8 386
9fa32ba0
TP
387TARGETS+=target-post-image
388
3b08e64d 389TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
08782ae7 390TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
b3efde23 391TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS))
22c2c6b5
PK
392
393# host-* dependencies have to be handled specially, as those aren't
394# visible in Kconfig and hence not added to a variable like TARGETS.
395# instead, find all the host-* targets listed in each <PKG>_DEPENDENCIES
396# variable for each enabled target.
397# Notice: this only works for newstyle gentargets/autotargets packages
398TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\
399 $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS))),\
400 $($(dep)))))
401# Host packages can in turn have their own dependencies. Likewise find
402# all the package names listed in the HOST_<PKG>_DEPENDENCIES for each
403# host package found above. Ideally this should be done recursively until
404# no more packages are found, but that's hard to do in make, so limit to
405# 1 level for now.
406HOST_DEPS = $(sort $(foreach dep,\
407 $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS_HOST_DEPS))),\
408 $($(dep))))
409HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
410
7e76f904
LC
411TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\
412 $(TARGETS) $(BASE_TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))
413
acc706b7 414# all targets depend on the crosscompiler and it's prerequisites
b3efde23 415$(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
acc706b7 416
d21a176b 417dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
d0880f70 418 $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
f958d897 419
dcb79995 420$(BUILD_DIR)/buildroot-config/auto.conf: $(BUILDROOT_CONFIG)
c729829c 421 $(MAKE) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
0b368800
TP
422
423prepare: $(BUILD_DIR)/buildroot-config/auto.conf
424
8b0905bf 425world: $(BASE_TARGETS) $(TARGETS_ALL)
2a786415
FP
426
427.PHONY: all world toolchain dirs clean distclean source outputmakefile \
98b616d7 428 legal-info legal-info-prepare legal-info-clean printvars \
b3efde23 429 $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
47e82829 430 $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \
d21a176b 431 $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
d0880f70 432 $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
ffde94bd 433
95442bb3 434################################################################################
08782ae7 435#
ef407d3d 436# staging and target directories do NOT list these as
d99c31c6 437# dependencies anywhere else
08782ae7 438#
95442bb3 439################################################################################
858334c2 440$(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
8d583fc0 441 @mkdir -p $@
3ad3d8a1 442
5628776c
SM
443# We make a symlink lib32->lib or lib64->lib as appropriate
444# MIPS64/n32 requires lib32 even though it's a 64-bit arch.
445ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y)
446LIB_SYMLINK = lib64
447else
448LIB_SYMLINK = lib32
449endif
450
08782ae7 451$(STAGING_DIR):
9c865d75 452 @mkdir -p $(STAGING_DIR)/bin
bf38723f 453 @mkdir -p $(STAGING_DIR)/lib
5628776c 454 @ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
8027784c 455 @mkdir -p $(STAGING_DIR)/usr/lib
5628776c 456 @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
8027784c 457 @mkdir -p $(STAGING_DIR)/usr/include
a05c337d 458 @mkdir -p $(STAGING_DIR)/usr/bin
5ad139eb 459 @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
ffde94bd 460
2b3a43f4
DM
461ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
462TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
463endif
464
7ad28656
TDS
465RSYNC_VCS_EXCLUSIONS = \
466 --exclude .svn --exclude .git --exclude .hg --exclude .bzr \
467 --exclude CVS
468
397fe5cc 469$(BUILD_DIR)/.root:
7547c7eb 470 mkdir -p $(TARGET_DIR)
7ad28656
TDS
471 rsync -a $(RSYNC_VCS_EXCLUSIONS) \
472 --exclude .empty --exclude '*~' \
13c07c79 473 $(TARGET_SKELETON)/ $(TARGET_DIR)/
9226a990 474 cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
6f1882de 475 @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
5628776c 476 @mkdir -p $(TARGET_DIR)/usr
6f1882de 477 @ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
7547c7eb 478 touch $@
08782ae7 479
397fe5cc 480$(TARGET_DIR): $(BUILD_DIR)/.root
c6771dfb 481
2a97045d
TDS
482STRIP_FIND_CMD = find $(TARGET_DIR)
483ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
484STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
485endif
88418bd2 486STRIP_FIND_CMD += -type f -perm /111
6ae7886f 487STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
2a97045d 488
32faf351 489target-finalize:
94d3aa17 490 rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
df99efb3
LC
491 $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
492 $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
493 find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
027aa1d2
WB
494 find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
495 find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
e48a72e5
MS
496ifneq ($(BR2_PACKAGE_GDB),y)
497 rm -rf $(TARGET_DIR)/usr/share/gdb
498endif
87b0637b 499ifneq ($(BR2_HAVE_DOCUMENTATION),y)
32faf351 500 rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
32faf351 501 rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
87b0637b 502 rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
d701a823 503 rm -rf $(TARGET_DIR)/usr/share/gtk-doc
68ad6d4e 504 -rmdir $(TARGET_DIR)/usr/share 2>/dev/null
b0c86bcc
TP
505endif
506ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
507 find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -print0 | xargs -0 rm -f
508endif
509ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
510 find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
32faf351 511endif
2a97045d 512 $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true
f627ebeb 513 if test -d $(TARGET_DIR)/lib/modules; then \
fde26057 514 find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
f627ebeb 515 xargs -r $(KSTRIPCMD); fi
8101c9a3 516
6ae7886f
RB
517# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads
518# besides the one in which crash occurred; or SIGTRAP kills my program when
519# I set a breakpoint"
520ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
521 find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \
52e7073a 522 xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG)
6ae7886f
RB
523endif
524
4ccde7fa
TP
525 mkdir -p $(TARGET_DIR)/etc
526 # Mandatory configuration file and auxilliary cache directory
527 # for recent versions of ldconfig
528 touch $(TARGET_DIR)/etc/ld.so.conf
529 mkdir -p $(TARGET_DIR)/var/cache/ldconfig
e49e2fed
PK
530 if [ -x "$(TARGET_CROSS)ldconfig" ]; \
531 then \
4ccde7fa 532 $(TARGET_CROSS)ldconfig -r $(TARGET_DIR); \
e49e2fed 533 else \
4ccde7fa 534 /sbin/ldconfig -r $(TARGET_DIR); \
e49e2fed 535 fi
451a8878
PK
536 ( \
537 echo "NAME=Buildroot"; \
538 echo "VERSION=$(BR2_VERSION_FULL)"; \
539 echo "ID=buildroot"; \
540 echo "VERSION_ID=$(BR2_VERSION)"; \
541 echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
542 ) > $(TARGET_DIR)/etc/os-release
912ea81a 543
e9b77128
LC
544 @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
545 $(call MESSAGE,"Copying overlay $(d)"); \
7ad28656
TDS
546 rsync -a $(RSYNC_VCS_EXCLUSIONS) \
547 --exclude .empty --exclude '*~' \
e9b77128 548 $(d)/ $(TARGET_DIR)$(sep))
7f860892 549
dbf4978e 550 @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
1b9b1685 551 $(call MESSAGE,"Executing post-build script $(s)"); \
cfd497d4 552 $(USER_HOOKS_EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
eed7d873 553
b87b4742 554ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
397fe5cc 555LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
6cdf2481 556LOCALE_NOPURGE=$(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
b87b4742
PK
557
558target-purgelocales:
559 rm -f $(LOCALE_WHITELIST)
560 for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done
561
562 for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man)); \
563 do \
564 for lang in $$(cd $$dir; ls .|grep -v man); \
565 do \
566 grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \
567 done; \
568 done
569endif
570
aebf199f
TP
571ifneq ($(GENERATE_LOCALE),)
572# Generate locale data. Basically, we call the localedef program
573# (built by the host-localedef package) for each locale. The input
574# data comes preferably from the toolchain, or if the toolchain does
575# not have them (Linaro toolchains), we use the ones available on the
576# host machine.
577target-generatelocales: host-localedef
578 $(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
579 $(Q)for locale in $(GENERATE_LOCALE) ; do \
ea27d6e9 580 inputfile=`echo $${locale} | cut -f1 -d'.'` ; \
8e2696ea 581 charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
aebf199f
TP
582 if test -z "$${charmap}" ; then \
583 charmap="UTF-8" ; \
584 fi ; \
585 echo "Generating locale $${inputfile}.$${charmap}" ; \
586 I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
587 $(HOST_DIR)/usr/bin/localedef \
588 --prefix=$(TARGET_DIR) \
6fb546ca 589 --$(call LOWERCASE,$(BR2_ENDIAN))-endian \
aebf199f
TP
590 -i $${inputfile} -f $${charmap} \
591 $${locale} ; \
592 done
593endif
594
9fa32ba0 595target-post-image:
9fa32ba0 596 @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
6d90a69f 597 $(call MESSAGE,"Executing post-image script $(s)"); \
cfd497d4 598 $(USER_HOOKS_EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
9fa32ba0 599
217ef08a
TP
600toolchain-eclipse-register:
601 ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
602
4eb982cf 603source: dirs $(TARGETS_SOURCE) $(HOST_SOURCE)
08782ae7 604
155971e0 605external-deps:
22c2c6b5 606 @$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u
155971e0 607
7e76f904
LC
608legal-info-clean:
609 @rm -fr $(LEGAL_INFO_DIR)
610
611legal-info-prepare: $(LEGAL_INFO_DIR)
612 @$(call MESSAGE,"Collecting legal info")
366f17f7 613 @$(call legal-license-file,buildroot,COPYING,COPYING,HOST)
cc4f34dd
TDS
614 @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,TARGET)
615 @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,HOST)
616 @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,HOST)
7e76f904
LC
617 @$(call legal-warning,the Buildroot source code has not been saved)
618 @$(call legal-warning,the toolchain has not been saved)
dcb79995 619 @cp $(BUILDROOT_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
7e76f904 620
858334c2
TDS
621legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
622 $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
7e76f904
LC
623 @cat support/legal-info/README.header >>$(LEGAL_REPORT)
624 @if [ -r $(LEGAL_WARNINGS) ]; then \
625 cat support/legal-info/README.warnings-header \
626 $(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \
627 cat $(LEGAL_WARNINGS); fi
628 @echo "Legal info produced in $(LEGAL_INFO_DIR)"
629 @rm -f $(LEGAL_WARNINGS)
630
b7d6c8ad
TP
631show-targets:
632 @echo $(TARGETS)
633
cfe511b2 634else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
2d523c23
EA
635
636all: menuconfig
637
1ed49963
AVEM
638endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
639
2d523c23
EA
640# configuration
641# ---------------------------------------------------------------------------
642
c0d7d4e0
BRF
643HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
644export HOSTCFLAGS
645
2cc210c9
PK
646$(BUILD_DIR)/buildroot-config/%onf:
647 mkdir -p $(@D)/lxdialog
17b66aff 648 $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
2d523c23 649
1ed49963
AVEM
650DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG))
651
652# We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will
653# recognize that if it's still at its default $(CONFIG_DIR)/defconfig
1039eb74 654COMMON_CONFIG_ENV = \
1ed49963 655 BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \
1039eb74
TP
656 KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
657 KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
0b368800 658 KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
a4239f7f
TP
659 BUILDROOT_CONFIG=$(BUILDROOT_CONFIG) \
660 BR2_EXTERNAL=$(BR2_EXTERNAL)
2d523c23 661
aefad531 662xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
39ca6d50 663 @mkdir -p $(BUILD_DIR)/buildroot-config
610255e7 664 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
b0df9df3 665
aefad531 666gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
39ca6d50 667 @mkdir -p $(BUILD_DIR)/buildroot-config
610255e7 668 @$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN)
2b42aae7 669
aefad531 670menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
39ca6d50 671 @mkdir -p $(BUILD_DIR)/buildroot-config
610255e7 672 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
2d523c23 673
aefad531 674nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
8b6585a9 675 @mkdir -p $(BUILD_DIR)/buildroot-config
610255e7 676 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
2d523c23 677
aefad531 678config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 679 @mkdir -p $(BUILD_DIR)/buildroot-config
1039eb74 680 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
2d523c23 681
aefad531 682oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 683 mkdir -p $(BUILD_DIR)/buildroot-config
1039eb74 684 @$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
2d523c23 685
aefad531 686randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 687 @mkdir -p $(BUILD_DIR)/buildroot-config
1039eb74 688 @$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
2d523c23 689
aefad531 690allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 691 @mkdir -p $(BUILD_DIR)/buildroot-config
1039eb74 692 @$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
2d523c23 693
aefad531 694allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 695 @mkdir -p $(BUILD_DIR)/buildroot-config
1039eb74 696 @$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
2d523c23 697
aefad531 698randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 699 @mkdir -p $(BUILD_DIR)/buildroot-config
dcb79995 700 @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
8a46d4bf
PK
701 @grep '^config BR2_PACKAGE_' Config.in.legacy | \
702 while read config pkg; do \
703 echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
1039eb74 704 @$(COMMON_CONFIG_ENV) \
39ca6d50 705 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
1039eb74 706 $< --randconfig $(CONFIG_CONFIG_IN)
39ca6d50 707 @rm -f $(CONFIG_DIR)/.config.nopkg
6652770f 708
aefad531 709allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 710 @mkdir -p $(BUILD_DIR)/buildroot-config
dcb79995 711 @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
8a46d4bf
PK
712 @grep '^config BR2_PACKAGE_' Config.in.legacy | \
713 while read config pkg; do \
714 echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
1039eb74 715 @$(COMMON_CONFIG_ENV) \
39ca6d50 716 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
1039eb74 717 $< --allyesconfig $(CONFIG_CONFIG_IN)
39ca6d50 718 @rm -f $(CONFIG_DIR)/.config.nopkg
6652770f 719
aefad531 720allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 721 @mkdir -p $(BUILD_DIR)/buildroot-config
dcb79995 722 @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
1039eb74 723 @$(COMMON_CONFIG_ENV) \
39ca6d50 724 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
1039eb74 725 $< --allnoconfig $(CONFIG_CONFIG_IN)
39ca6d50 726 @rm -f $(CONFIG_DIR)/.config.nopkg
6652770f 727
aefad531 728silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
0b368800
TP
729 @mkdir -p $(BUILD_DIR)/buildroot-config
730 $(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
731
9db3b47e
TP
732olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
733 @mkdir -p $(BUILD_DIR)/buildroot-config
734 $(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN)
735
aefad531 736defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
39ca6d50 737 @mkdir -p $(BUILD_DIR)/buildroot-config
1ed49963 738 @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
2d523c23 739
aefad531 740%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
6f38119c 741 @mkdir -p $(BUILD_DIR)/buildroot-config
1039eb74 742 @$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
6f38119c 743
ff9d6e30
TP
744%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
745 @mkdir -p $(BUILD_DIR)/buildroot-config
746 @$(COMMON_CONFIG_ENV) $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
747
aefad531 748savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
e1b1a18a 749 @mkdir -p $(BUILD_DIR)/buildroot-config
1ed49963
AVEM
750 @$(COMMON_CONFIG_ENV) $< \
751 --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
752 $(CONFIG_CONFIG_IN)
2d523c23 753
6547bced 754# check if download URLs are outdated
07bae756 755source-check:
7c297459 756 $(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
825ff341 757
1ed49963 758.PHONY: defconfig savedefconfig
406053d5 759
95442bb3 760################################################################################
2d523c23
EA
761#
762# Cleanup and misc junk
763#
95442bb3 764################################################################################
aefad531
YM
765
766# outputmakefile generates a Makefile in the output directory, if using a
767# separate output directory. This allows convenient use of make in the
768# output directory.
769outputmakefile:
770ifeq ($(NEED_WRAPPER),y)
f082c7c5 771 $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
aefad531
YM
772endif
773
98b616d7
ÉV
774# printvars prints all the variables currently defined in our Makefiles
775printvars:
776 @$(foreach V, \
777 $(sort $(.VARIABLES)), \
778 $(if $(filter-out environment% default automatic, \
779 $(origin $V)), \
780 $(info $V=$($V) ($(value $V)))))
781
2d523c23 782clean:
300eb6b7 783 rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
d21a176b 784 $(STAMP_DIR) $(BUILD_DIR) $(BASE_DIR)/staging \
7e76f904 785 $(LEGAL_INFO_DIR)
2d523c23
EA
786
787distclean: clean
406053d5
PK
788ifeq ($(DL_DIR),$(TOPDIR)/dl)
789 rm -rf $(DL_DIR)
790endif
791ifeq ($(O),output)
792 rm -rf $(O)
793endif
dcb79995 794 rm -rf $(BUILDROOT_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps
2d523c23 795
e491fba2
BRF
796help:
797 @echo 'Cleaning:'
406053d5 798 @echo ' clean - delete all files created by build'
e491fba2
BRF
799 @echo ' distclean - delete all non-source files (including .config)'
800 @echo
801 @echo 'Build:'
802 @echo ' all - make world'
2a786415 803 @echo ' toolchain - build toolchain'
040f6a32
SH
804 @echo ' <package>-rebuild - force recompile <package>'
805 @echo ' <package>-reconfigure - force reconfigure <package>'
e491fba2
BRF
806 @echo
807 @echo 'Configuration:'
808 @echo ' menuconfig - interactive curses-based configurator'
15f5bef0 809 @echo ' nconfig - interactive ncurses-based configurator'
c48bbb8c 810 @echo ' xconfig - interactive Qt-based configurator'
2b42aae7 811 @echo ' gconfig - interactive GTK-based configurator'
e491fba2 812 @echo ' oldconfig - resolve any unresolved symbols in .config'
9db3b47e
TP
813 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
814 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
c48bbb8c
PK
815 @echo ' randconfig - New config with random answer to all options'
816 @echo ' defconfig - New config with default answer to all options'
33f454bb 817 @echo ' BR2_DEFCONFIG, if set, is used as input'
d7051da8 818 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
c48bbb8c
PK
819 @echo ' allyesconfig - New config where all options are accepted with yes'
820 @echo ' allnoconfig - New config where all options are answered with no'
6652770f
PK
821 @echo ' randpackageconfig - New config with random answer to package options'
822 @echo ' allyespackageconfig - New config where pkg options are accepted with yes'
823 @echo ' allnopackageconfig - New config where package options are answered with no'
4bb33dce
PK
824ifeq ($(BR2_PACKAGE_BUSYBOX),y)
825 @echo ' busybox-menuconfig - Run BusyBox menuconfig'
826endif
827ifeq ($(BR2_LINUX_KERNEL),y)
828 @echo ' linux-menuconfig - Run Linux kernel menuconfig'
f5777ce8 829 @echo ' linux-savedefconfig - Run Linux kernel savedefconfig'
4bb33dce
PK
830endif
831ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
832 @echo ' uclibc-menuconfig - Run uClibc menuconfig'
833endif
83f1bf9e
JCPV
834ifeq ($(BR2_TARGET_BAREBOX),y)
835 @echo ' barebox-menuconfig - Run barebox menuconfig'
836 @echo ' barebox-savedefconfig - Run barebox savedefconfig'
4bb33dce 837endif
8792cf9e
TP
838 @echo
839 @echo 'Documentation:'
55ecab1b 840 @echo ' manual - build manual in all formats'
8792cf9e
TP
841 @echo ' manual-html - build manual in HTML'
842 @echo ' manual-split-html - build manual in split HTML'
843 @echo ' manual-pdf - build manual in PDF'
462e9915 844 @echo ' manual-text - build manual in text'
8792cf9e 845 @echo ' manual-epub - build manual in ePub'
e491fba2
BRF
846 @echo
847 @echo 'Miscellaneous:'
848 @echo ' source - download all sources needed for offline-build'
07bae756 849 @echo ' source-check - check selected packages for valid download URLs'
155971e0 850 @echo ' external-deps - list external packages used'
7e76f904 851 @echo ' legal-info - generate info about license compliance'
e491fba2 852 @echo
15f5bef0
PK
853 @echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build'
854 @echo ' make O=dir - Locate all output files in "dir", including .config'
855 @echo
ff9d6e30 856 @echo 'Built-in configs:'
b9796199 857 @$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \
58fd779a 858 printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
ff9d6e30
TP
859ifneq ($(wildcard $(BR2_EXTERNAL)/configs/*_defconfig),)
860 @echo
861 @echo 'User-provided configs:'
862 @$(foreach b, $(sort $(notdir $(wildcard $(BR2_EXTERNAL)/configs/*_defconfig))), \
863 printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
864endif
58fd779a 865 @echo
8792cf9e 866 @echo 'See docs/README, or generate the Buildroot manual for further details'
663dee48 867 @echo
ba2e7e02 868
e5e8fae8 869release: OUT=buildroot-$(BR2_VERSION)
0dca7065 870
134ab1ce
PK
871# Create release tarballs. We need to fiddle a bit to add the generated
872# documentation to the git output
0dca7065 873release:
c6715b69 874 git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
462e9915 875 $(MAKE) O=$(OUT) manual-html manual-text manual-pdf
134ab1ce
PK
876 tar rf $(OUT).tar $(OUT)
877 gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
878 bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
879 rm -rf $(OUT) $(OUT).tar
e62d2ecd 880
2b91ab7a
AVEM
881print-version:
882 @echo $(BR2_VERSION_FULL)
883
b7285d00 884include docs/manual/manual.mk
8792cf9e 885
6652770f 886.PHONY: $(noconfig_targets)
This page took 0.40681 seconds and 4 git commands to generate.