blob: 4aebfa2d2edfd179299789bb00168fc94de3ed64 [file] [log] [blame]
Eric Andersen2d523c22004-10-09 01:06:03 +00001# Makefile for buildroot2
Eric Andersenffde94b2001-12-22 00:56:11 +00002#
Eric Andersen15b26ae2005-02-07 22:19:26 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Peter Korsgaard26b11df2013-05-31 22:24:52 +02004# Copyright (C) 2006-2013 by the Buildroot developers <buildroot@uclibc.org>
Eric Andersenffde94b2001-12-22 00:56:11 +00005#
Eric Andersen08782ae2002-04-26 11:45:55 +00006# This program is free software; you can redistribute it and/or modify
Eric Andersen2d523c22004-10-09 01:06:03 +00007# 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.
Eric Andersenffde94b2001-12-22 00:56:11 +000010#
Eric Andersen2d523c22004-10-09 01:06:03 +000011# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
Eric Andersen08782ae2002-04-26 11:45:55 +000013# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Eric Andersen2d523c22004-10-09 01:06:03 +000014# General Public License for more details.
Peter Korsgaardb30d6732009-01-26 19:42:47 +000015#
Eric Andersen2d523c22004-10-09 01:06:03 +000016# 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
19#
Eric Andersenffde94b2001-12-22 00:56:11 +000020
Eric Andersen2d523c22004-10-09 01:06:03 +000021#--------------------------------------------------------------
22# Just run 'make menuconfig', configure stuff, then run 'make'.
23# You shouldn't need to mess with anything beyond this point...
24#--------------------------------------------------------------
Yann E. MORIN2d239bb2010-10-31 17:35:09 +010025
Yann E. MORINe5e8fae2010-10-31 17:35:10 +010026# Set and export the version string
Peter Korsgaard7b48cee2013-08-31 23:32:02 +020027export BR2_VERSION:=2013.11-git
Yann E. MORINe5e8fae2010-10-31 17:35:10 +010028
Thomas De Schampheleire0edfb242012-02-08 17:22:17 +010029# Check for minimal make version (note: this check will break at make 10.x)
30MIN_MAKE_VERSION=3.81
Peter Korsgaard8139e212012-02-09 22:58:05 +010031ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
Thomas De Schampheleire0edfb242012-02-08 17:22:17 +010032$(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
33endif
34
Francois Perrad1d4104f2012-07-18 15:59:09 +020035export 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
Yann E. MORIN2d239bb2010-10-31 17:35:09 +010045# This top-level Makefile can *not* be executed in parallel
46.NOTPARALLEL:
47
Peter Korsgaard6b1dd452009-11-30 17:29:01 +010048# absolute path
49TOPDIR:=$(shell pwd)
Bernhard Reutner-Fischer18d979c2007-09-01 18:21:09 +000050CONFIG_CONFIG_IN=Config.in
Thomas Petazzoni56da3852011-08-31 23:35:05 +020051CONFIG=support/kconfig
Ulf Samuelssona8ee1242008-05-11 06:55:04 +000052DATE:=$(shell date +%Y%m%d)
Eric Andersen2d523c22004-10-09 01:06:03 +000053
Yann E. MORIN8258df22010-10-31 17:35:12 +010054# 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)
Thomas Petazzonif082c7c2011-08-31 23:35:02 +020056export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
Yann E. MORIN8258df22010-10-31 17:35:12 +010057
Thomas Petazzoni8b6585a2010-08-21 17:21:40 +020058noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
Arnout Vandecappelle (Essensium/Mind)1ed49962013-02-05 07:16:02 +000059 %_defconfig allyesconfig allnoconfig silentoldconfig release \
Peter Korsgaard66527702009-10-04 21:57:12 +020060 randpackageconfig allyespackageconfig allnopackageconfig \
Thomas Petazzoni9db3b472013-04-04 11:24:25 +000061 source-check print-version olddefconfig
Bernhard Reutner-Fischer9e250352006-12-02 19:01:10 +000062
Thomas Petazzoni580c6d92009-07-30 17:26:49 +020063# Strip quotes and then whitespaces
64qstrip=$(strip $(subst ",,$(1)))
65#"))
66
Peter Korsgaardf85f2de2009-01-25 20:19:01 +000067# Variables for use in Make constructs
68comma:=,
69empty:=
70space:=$(empty) $(empty)
71
Will Wagner39ca6d52010-01-11 12:28:50 +000072ifneq ("$(origin O)", "command line")
73O:=output
74CONFIG_DIR:=$(TOPDIR)
Yann E. MORINaefad532010-09-26 10:56:12 +020075NEED_WRAPPER=
Will Wagner39ca6d52010-01-11 12:28:50 +000076else
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)
Peter Korsgaardde846f62010-08-29 23:24:07 +020089# we need to pass O= everywhere we call back into the toplevel makefile
90EXTRAMAKEARGS = O=$(O)
Yann E. MORINaefad532010-09-26 10:56:12 +020091NEED_WRAPPER=y
Will Wagner39ca6d52010-01-11 12:28:50 +000092endif
93
Yann E. MORIN2b0f4552013-01-13 11:52:20 +000094BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
95
Ulf Samuelssona1b06512008-03-28 07:31:28 +000096# Pull in the user's configuration file
97ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
Yann E. MORINdcb79992013-01-13 11:52:21 +000098-include $(BUILDROOT_CONFIG)
Ulf Samuelsson7521f372007-09-12 04:34:16 +000099endif
Eric Andersen2d523c22004-10-09 01:06:03 +0000100
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000101# To put more focus on warnings, be less verbose as default
102# Use 'make V=1' to see the full commands
103ifdef V
104 ifeq ("$(origin V)", "command line")
Bernhard Reutner-Fischer18d979c2007-09-01 18:21:09 +0000105 KBUILD_VERBOSE=$(V)
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000106 endif
107endif
108ifndef KBUILD_VERBOSE
Bernhard Reutner-Fischer18d979c2007-09-01 18:21:09 +0000109 KBUILD_VERBOSE=0
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000110endif
111
112ifeq ($(KBUILD_VERBOSE),1)
Ulf Samuelsson4df454e2007-07-06 12:19:35 +0000113 quiet=
Bernhard Reutner-Fischer18d979c2007-09-01 18:21:09 +0000114 Q=
Bernhard Reutner-Fischer1669b6e2007-09-22 14:19:22 +0000115ifndef VERBOSE
116 VERBOSE=1
117endif
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000118else
119 quiet=quiet_
Bernhard Reutner-Fischer18d979c2007-09-01 18:21:09 +0000120 Q=@
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000121endif
122
Peter Korsgaard69f85922009-01-01 21:20:35 +0000123# we want bash as shell
124SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000125 else if [ -x /bin/bash ]; then echo /bin/bash; \
Bernhard Reutner-Fischer18d979c2007-09-01 18:21:09 +0000126 else echo sh; fi; fi)
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000127
Peter Korsgaard69f85922009-01-01 21:20:35 +0000128# kconfig uses CONFIG_SHELL
129CONFIG_SHELL:=$(SHELL)
130
131export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000132
133ifndef HOSTAR
134HOSTAR:=ar
135endif
136ifndef HOSTAS
137HOSTAS:=as
138endif
139ifndef HOSTCC
140HOSTCC:=gcc
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100141HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000142endif
Mike Frysinger0df02e12011-03-28 03:18:47 -0400143HOSTCC_NOCCACHE:=$(HOSTCC)
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000144ifndef HOSTCXX
145HOSTCXX:=g++
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100146HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000147endif
Mike Frysinger0df02e12011-03-28 03:18:47 -0400148HOSTCXX_NOCCACHE:=$(HOSTCXX)
Bernhard Reutner-Fischer5f975802007-09-28 20:10:22 +0000149ifndef HOSTFC
150HOSTFC:=gfortran
151endif
Ulf Samuelsson356133b2007-09-28 19:46:58 +0000152ifndef HOSTCPP
153HOSTCPP:=cpp
154endif
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000155ifndef HOSTLD
156HOSTLD:=ld
157endif
Ulf Samuelsson0f9c5b12007-07-15 21:54:11 +0000158ifndef HOSTLN
159HOSTLN:=ln
160endif
Ulf Samuelsson356133b2007-09-28 19:46:58 +0000161ifndef HOSTNM
162HOSTNM:=nm
163endif
Peter Korsgaard69f85922009-01-01 21:20:35 +0000164HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
165HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
Peter Korsgaard69f85922009-01-01 21:20:35 +0000166HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
167HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
168HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
169HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
170HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
Ulf Samuelsson54e93322008-07-06 07:34:41 +0000171
Bernhard Reutner-Fischer5f975802007-09-28 20:10:22 +0000172export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100173export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000174
Arnout Vandecappelle670cb302012-06-30 10:29:22 +0000175# Make sure pkg-config doesn't look outside the buildroot tree
176unexport PKG_CONFIG_PATH
Charles Manning4f607ed2012-12-02 11:13:04 +0000177unexport PKG_CONFIG_SYSROOT_DIR
Arnout Vandecappelle670cb302012-06-30 10:29:22 +0000178
Thomas Petazzoni91123a62012-07-02 04:21:14 +0000179# Having DESTDIR set in the environment confuses the installation
180# steps of some packages.
181unexport DESTDIR
182
Gustavo Zacariasbed61a72013-07-11 11:37:33 -0300183# Causes breakage with packages that needs host-ruby
184unexport RUBYOPT
185
Will Wagner39ca6d52010-01-11 12:28:50 +0000186# bash prints the name of the directory on 'cd <dir>' if CDPATH is
187# set, so unset it here to not cause problems. Notice that the export
188# line doesn't affect the environment of $(shell ..) calls, so
189# explictly throw away any output from 'cd' here.
190export CDPATH:=
191BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
192$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
193
194BUILD_DIR:=$(BASE_DIR)/build
195
Bernhard Reutner-Fischerafc61c62007-06-28 10:47:05 +0000196
Bernhard Reutner-Fischercfe511b2007-09-29 13:58:30 +0000197ifeq ($(BR2_HAVE_DOT_CONFIG),y)
Eric Andersenffde94b2001-12-22 00:56:11 +0000198
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200199################################################################################
Peter Korsgaard2c649042007-06-19 15:19:27 +0000200#
201# Hide troublesome environment variables from sub processes
202#
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200203################################################################################
Peter Korsgaard2c649042007-06-19 15:19:27 +0000204unexport CROSS_COMPILE
205unexport ARCH
Daniel Nyström2bf3c162010-12-26 00:29:42 +0100206unexport CC
207unexport CXX
208unexport CPP
209unexport CFLAGS
210unexport CXXFLAGS
211unexport GREP_OPTIONS
Peter Korsgaard12c9f7d2011-12-12 10:25:50 +0100212unexport CONFIG_SITE
Stephan Hoffmann32314b42012-08-17 13:54:16 +0200213unexport QMAKESPEC
Nathan Lynch20ca0082012-07-10 07:37:22 +0000214unexport TERMINFO
Bernhard Reutner-Fischer7dcbbfb2007-06-02 09:05:40 +0000215
Thomas Petazzoni102a93b2011-08-31 23:35:06 +0200216GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
Thomas Petazzoni60281cb2010-04-10 23:17:25 +0200217
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200218################################################################################
Eric Andersen08782ae2002-04-26 11:45:55 +0000219#
Eric Andersen2d523c22004-10-09 01:06:03 +0000220# The list of stuff to build for the target toolchain
221# along with the packages to build for the target.
Eric Andersen08782ae2002-04-26 11:45:55 +0000222#
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200223################################################################################
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100224
225ifeq ($(BR2_CCACHE),y)
226BASE_TARGETS += host-ccache
227endif
228
Thomas Petazzonibc994c52009-12-14 12:10:12 +0100229ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
Thomas Petazzonie236fe42013-06-30 21:29:03 +0200230BASE_TARGETS += toolchain-buildroot
Thomas Petazzonie57e4b92013-06-30 21:29:07 +0200231else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
232BASE_TARGETS += toolchain-external
233else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
234BASE_TARGETS += toolchain-crosstool-ng
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +0000235endif
Thomas Petazzonie57e4b92013-06-30 21:29:07 +0200236
Bernhard Reutner-Fischeracc706b2007-07-23 11:29:38 +0000237TARGETS:=
238
Peter Korsgaard89464a92009-09-30 17:39:44 +0200239# silent mode requested?
240QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)
241
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200242# Strip off the annoying quoting
243ARCH:=$(call qstrip,$(BR2_ARCH))
Thomas Petazzoni65e80a02010-04-28 23:40:57 +0200244
Peter Korsgaard891973f2010-10-17 23:32:37 +0200245KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
246 -e s/i.86/i386/ -e s/sun4u/sparc64/ \
Maxime Ripardf59aeca2013-05-06 00:14:55 +0000247 -e s/arcle/arc/ \
Peter Korsgaard8332ffa2013-06-10 14:04:03 +0200248 -e s/arceb/arc/ \
Peter Korsgaard891973f2010-10-17 23:32:37 +0200249 -e s/arm.*/arm/ -e s/sa110/arm/ \
Thomas Petazzonib90a1032012-10-28 17:40:35 +0100250 -e s/aarch64/arm64/ \
Mike Frysinger871db072011-02-07 00:49:11 -0500251 -e s/bfin/blackfin/ \
Peter Korsgaard891973f2010-10-17 23:32:37 +0200252 -e s/parisc64/parisc/ \
253 -e s/powerpc64/powerpc/ \
254 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
255 -e s/sh.*/sh/)
256
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200257ZCAT:=$(call qstrip,$(BR2_ZCAT))
258BZCAT:=$(call qstrip,$(BR2_BZCAT))
Allan W. Nielsen177b4b42011-05-10 08:17:05 +0200259XZCAT:=$(call qstrip,$(BR2_XZCAT))
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200260TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
Bernhard Reutner-Fischer1dbe6e32007-08-21 17:56:47 +0000261
Gustavo Zacariasa2b4f7f2011-02-02 10:05:56 -0300262# packages compiled for the host go here
263HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200264
Thomas Petazzoniaebf1992012-05-08 04:39:22 +0000265# locales to generate
266GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
267
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200268# stamp (dependency) files go here
Thomas Petazzoni3b2a8032009-07-31 10:31:39 +0200269STAMP_DIR:=$(BASE_DIR)/stamps
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200270
Thomas Petazzoni3b2a8032009-07-31 10:31:39 +0200271BINARIES_DIR:=$(BASE_DIR)/images
272TARGET_DIR:=$(BASE_DIR)/target
Thomas Petazzoni6c3e3ad2012-11-03 08:27:58 +0000273TARGET_SKELETON=$(TOPDIR)/system/skeleton
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200274
Luca Ceresoli7e76f902012-05-17 19:33:00 +0200275LEGAL_INFO_DIR=$(BASE_DIR)/legal-info
276REDIST_SOURCES_DIR=$(LEGAL_INFO_DIR)/sources
277LICENSE_FILES_DIR=$(LEGAL_INFO_DIR)/licenses
278LEGAL_MANIFEST_CSV=$(LEGAL_INFO_DIR)/manifest.csv
279LEGAL_LICENSES_TXT=$(LEGAL_INFO_DIR)/licenses.txt
280LEGAL_WARNINGS=$(LEGAL_INFO_DIR)/.warnings
281LEGAL_REPORT=$(LEGAL_INFO_DIR)/README
282
Thomas Petazzoni9226a992012-11-17 03:52:14 +0000283# Location of a file giving a big fat warning that output/target
284# should not be used as the root filesystem.
285TARGET_DIR_WARNING_FILE=$(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
286
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100287ifeq ($(BR2_CCACHE),y)
288CCACHE:=$(HOST_DIR)/usr/bin/ccache
Thomas De Schampheleire43329072012-05-16 21:39:28 +0200289BUILDROOT_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
290export BUILDROOT_CACHE_DIR
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100291HOSTCC := $(CCACHE) $(HOSTCC)
292HOSTCXX := $(CCACHE) $(HOSTCXX)
293endif
294
Yann E. MORIN2b0f4552013-01-13 11:52:20 +0000295# Scripts in support/ or post-build scripts may need to reference
296# these locations, so export them so it is easier to use
297export BUILDROOT_CONFIG
298export TARGET_DIR
299export STAGING_DIR
300export HOST_DIR
301export BINARIES_DIR
Peter Korsgaard1300cb52013-01-14 10:02:29 +0100302export BASE_DIR
Yann E. MORIN2b0f4552013-01-13 11:52:20 +0000303
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200304################################################################################
Eric Andersen08782ae2002-04-26 11:45:55 +0000305#
Eric Andersenef407d32004-01-29 23:21:00 +0000306# You should probably leave this stuff alone unless you know
Eric Andersen08782ae2002-04-26 11:45:55 +0000307# what you are doing.
308#
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200309################################################################################
Manuel Novoa III d632d422003-11-01 05:34:41 +0000310
Bernhard Reutner-Fischer6547bce2007-08-22 12:35:41 +0000311all: world
Eric Andersenffde94b2001-12-22 00:56:11 +0000312
Arnout Vandecappelle (Essensium/Mind)ebcfa982012-11-12 10:08:28 +0000313# Include legacy before the other things, because package .mk files
314# may rely on it.
315ifneq ($(BR2_DEPRECATED),y)
316include Makefile.legacy
317endif
318
Thomas Petazzoni486253d2012-04-17 16:45:23 +0200319include package/Makefile.in
Thomas De Schampheleirea7926682012-02-08 17:22:16 +0100320include support/dependencies/dependencies.mk
321
Eric Andersend06645d2005-02-10 03:06:39 +0000322# We also need the various per-package makefiles, which also add
323# each selected package to TARGETS if that package was selected
324# in the .config file.
Thomas Petazzonibc994c52009-12-14 12:10:12 +0100325ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
Yann E. MORINed020092010-07-28 00:08:15 +0200326include toolchain/toolchain-buildroot.mk
Yann E. MORIN26b44b22010-03-26 20:46:37 +0100327else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
Yann E. MORINed020092010-07-28 00:08:15 +0200328include toolchain/toolchain-external.mk
Yann E. MORIN10c1eec2010-09-19 21:54:09 +0200329else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
330include toolchain/toolchain-crosstool-ng.mk
Bernhard Reutner-Fischeracc706b2007-07-23 11:29:38 +0000331endif
332
Thomas Petazzoniee0246e2011-09-29 21:57:38 +0200333# Include the package override file if one has been provided in the
334# configuration.
335PACKAGE_OVERRIDE_FILE=$(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE))
336ifneq ($(PACKAGE_OVERRIDE_FILE),)
337-include $(PACKAGE_OVERRIDE_FILE)
338endif
339
Eric Andersend06645d2005-02-10 03:06:39 +0000340include package/*/*.mk
Eric Andersend06645d2005-02-10 03:06:39 +0000341
Peter Korsgaard64d8e9a2010-11-07 19:33:11 +0100342include boot/common.mk
Peter Korsgaard64d8e9a2010-11-07 19:33:11 +0100343include linux/linux.mk
Peter Korsgaardec100c72013-01-09 13:20:05 +0100344include system/system.mk
Peter Korsgaard64d8e9a2010-11-07 19:33:11 +0100345
Peter Korsgaard32faf352009-04-07 21:04:31 +0000346TARGETS+=target-finalize
John Voltzd45de0c2008-03-11 13:12:39 +0000347
Peter Korsgaardb87b4742009-04-06 09:21:26 +0000348ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
349TARGETS+=target-purgelocales
350endif
351
Thomas Petazzoni381616e2013-06-30 21:29:09 +0200352ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
Thomas Petazzoniaebf1992012-05-08 04:39:22 +0000353ifneq ($(GENERATE_LOCALE),)
354TARGETS+=target-generatelocales
355endif
356endif
357
Thomas Petazzoni217ef082013-01-13 04:52:13 +0000358ifeq ($(BR2_ECLIPSE_REGISTER),y)
359TARGETS+=toolchain-eclipse-register
360endif
361
Thomas Petazzoni649b5b92010-03-14 18:20:45 +0100362include fs/common.mk
Eric Andersen79f5f1e2005-02-17 03:00:29 +0000363
Thomas Petazzoni9fa32ba2013-02-07 11:58:43 +0000364TARGETS+=target-post-image
365
Eric Andersen08782ae2002-04-26 11:45:55 +0000366TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
Bernhard Reutner-Fischer3b08e642007-09-18 13:12:25 +0000367TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
Eric Andersen08782ae2002-04-26 11:45:55 +0000368TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
Bernhard Reutner-Fischerb3efde22007-09-01 17:10:55 +0000369TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS))
Peter Korsgaard22c2c6b2010-11-19 14:20:56 +0100370
371# host-* dependencies have to be handled specially, as those aren't
372# visible in Kconfig and hence not added to a variable like TARGETS.
373# instead, find all the host-* targets listed in each <PKG>_DEPENDENCIES
374# variable for each enabled target.
375# Notice: this only works for newstyle gentargets/autotargets packages
376TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\
377 $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS))),\
378 $($(dep)))))
379# Host packages can in turn have their own dependencies. Likewise find
380# all the package names listed in the HOST_<PKG>_DEPENDENCIES for each
381# host package found above. Ideally this should be done recursively until
382# no more packages are found, but that's hard to do in make, so limit to
383# 1 level for now.
384HOST_DEPS = $(sort $(foreach dep,\
385 $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS_HOST_DEPS))),\
386 $($(dep))))
387HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
388
Luca Ceresoli7e76f902012-05-17 19:33:00 +0200389TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\
390 $(TARGETS) $(BASE_TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))
391
Bernhard Reutner-Fischeracc706b2007-07-23 11:29:38 +0000392# all targets depend on the crosscompiler and it's prerequisites
Bernhard Reutner-Fischerb3efde22007-09-01 17:10:55 +0000393$(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
Bernhard Reutner-Fischeracc706b2007-07-23 11:29:38 +0000394
Thomas Petazzonid21a1762013-06-30 21:29:06 +0200395dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
Peter Korsgaardd0880f72012-01-15 20:59:37 +0100396 $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
Ulf Samuelssonf958d892007-08-14 07:45:01 +0000397
Peter Korsgaarded7791e2012-02-25 23:18:03 +0100398$(BASE_TARGETS): dirs $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
Ulf Samuelssonf958d892007-08-14 07:45:01 +0000399
Yann E. MORINdcb79992013-01-13 11:52:21 +0000400$(BUILD_DIR)/buildroot-config/auto.conf: $(BUILDROOT_CONFIG)
Thomas Petazzonic7298292011-04-02 18:44:36 +0200401 $(MAKE) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
Thomas Petazzoni0b368802010-08-22 07:27:09 +0200402
403prepare: $(BUILD_DIR)/buildroot-config/auto.conf
404
Fabio Porcedda2a786412013-01-14 22:02:00 +0000405toolchain: prepare dirs dependencies $(BASE_TARGETS)
Eric Andersenffde94b2001-12-22 00:56:11 +0000406
Fabio Porcedda2a786412013-01-14 22:02:00 +0000407world: toolchain $(TARGETS_ALL)
408
409.PHONY: all world toolchain dirs clean distclean source outputmakefile \
Émeric Vigier98b616d2013-05-29 00:41:11 +0200410 legal-info legal-info-prepare legal-info-clean printvars \
Bernhard Reutner-Fischerb3efde22007-09-01 17:10:55 +0000411 $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
Luca Ceresoli7e76f902012-05-17 19:33:00 +0200412 $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \
Thomas Petazzonid21a1762013-06-30 21:29:06 +0200413 $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
Peter Korsgaardd0880f72012-01-15 20:59:37 +0100414 $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
Jon Nelsonc79e9982002-01-05 20:26:15 +0000415
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200416################################################################################
Eric Andersen08782ae2002-04-26 11:45:55 +0000417#
Eric Andersenef407d32004-01-29 23:21:00 +0000418# staging and target directories do NOT list these as
Mike Frysingerd99c31c2006-05-26 01:18:09 +0000419# dependencies anywhere else
Eric Andersen08782ae2002-04-26 11:45:55 +0000420#
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200421################################################################################
Thomas Petazzonid21a1762013-06-30 21:29:06 +0200422$(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR):
Bernhard Reutner-Fischer8d583fc2007-01-30 00:58:18 +0000423 @mkdir -p $@
Manuel Novoa III 3ad3d8a2004-09-03 00:49:43 +0000424
Samuel Martin56287762013-08-23 00:59:35 +0200425# We make a symlink lib32->lib or lib64->lib as appropriate
426# MIPS64/n32 requires lib32 even though it's a 64-bit arch.
427ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y)
428LIB_SYMLINK = lib64
429else
430LIB_SYMLINK = lib32
431endif
432
Eric Andersen08782ae2002-04-26 11:45:55 +0000433$(STAGING_DIR):
"Steven J. Hill"9c865d72007-05-07 03:56:47 +0000434 @mkdir -p $(STAGING_DIR)/bin
Eric Andersenbf387232004-12-11 10:35:18 +0000435 @mkdir -p $(STAGING_DIR)/lib
Samuel Martin56287762013-08-23 00:59:35 +0200436 @ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
Bernhard Reutner-Fischer80277842007-06-20 11:26:36 +0000437 @mkdir -p $(STAGING_DIR)/usr/lib
Samuel Martin56287762013-08-23 00:59:35 +0200438 @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
Bernhard Reutner-Fischer80277842007-06-20 11:26:36 +0000439 @mkdir -p $(STAGING_DIR)/usr/include
Thomas Petazzonia05c3372010-02-09 22:44:15 +0100440 @mkdir -p $(STAGING_DIR)/usr/bin
Gustavo Zacarias5ad139e2010-12-31 08:39:05 -0300441 @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
Eric Andersen08782ae2002-04-26 11:45:55 +0000442
Dmytro Milinevskyy2b3a43f2010-06-16 23:25:56 +0300443ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
444TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
445endif
446
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200447$(BUILD_DIR)/.root:
Bernhard Reutner-Fischer7547c7e2007-08-21 10:53:39 +0000448 mkdir -p $(TARGET_DIR)
Danomi Manchegoe97376a2013-05-01 17:15:26 +0000449 rsync -a \
450 --exclude .empty --exclude .svn --exclude .git \
451 --exclude .hg --exclude=CVS --exclude '*~' \
Peter Korsgaard13c07c72013-03-26 08:33:18 +0100452 $(TARGET_SKELETON)/ $(TARGET_DIR)/
Thomas Petazzoni9226a992012-11-17 03:52:14 +0000453 cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
Samuel Martin56287762013-08-23 00:59:35 +0200454 @ln -s lib $(TARGET_DIR)/$(LIB_SYMLINK)
455 @mkdir -p $(TARGET_DIR)/usr
456 @ln -s lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
Bernhard Reutner-Fischer7547c7e2007-08-21 10:53:39 +0000457 touch $@
Eric Andersenffde94b2001-12-22 00:56:11 +0000458
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200459$(TARGET_DIR): $(BUILD_DIR)/.root
Ulf Samuelssonc6771df2007-08-16 05:44:55 +0000460
Thomas De Schampheleire2a970452012-06-21 19:34:50 +0000461STRIP_FIND_CMD = find $(TARGET_DIR)
462ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
463STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
464endif
Tzu-Jung Lee88418bd2013-06-19 17:24:50 +0800465STRIP_FIND_CMD += -type f -perm /111
Richard Braun6ae78862012-11-20 07:18:11 +0000466STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
Thomas De Schampheleire2a970452012-06-21 19:34:50 +0000467
Peter Korsgaard32faf352009-04-07 21:04:31 +0000468target-finalize:
Valentine Barshak94d3aa12012-10-02 08:52:15 +0000469 rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
Luca Ceresolidf99efb2013-03-06 07:14:26 +0000470 $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
471 $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
472 find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
Wade Berrier027aa1d2009-04-28 17:33:44 +0000473 find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
474 find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
Malte Starostike48a72e2010-07-24 21:29:56 +0200475ifneq ($(BR2_PACKAGE_GDB),y)
476 rm -rf $(TARGET_DIR)/usr/share/gdb
477endif
Thomas Petazzoni87b06372010-04-10 22:42:45 +0200478ifneq ($(BR2_HAVE_DOCUMENTATION),y)
Peter Korsgaard32faf352009-04-07 21:04:31 +0000479 rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
Peter Korsgaard32faf352009-04-07 21:04:31 +0000480 rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
Thomas Petazzoni87b06372010-04-10 22:42:45 +0200481 rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
Paulius Zaleckasd701a822010-05-05 13:09:36 +0300482 rm -rf $(TARGET_DIR)/usr/share/gtk-doc
Mike Frysinger68ad6d42010-11-18 16:25:58 -0500483 -rmdir $(TARGET_DIR)/usr/share 2>/dev/null
Peter Korsgaard32faf352009-04-07 21:04:31 +0000484endif
Thomas Petazzonib0c86bc2011-01-11 21:44:29 +0100485ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
486 find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -print0 | xargs -0 rm -f
487endif
488ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
489 find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
490endif
Thomas De Schampheleire2a970452012-06-21 19:34:50 +0000491 $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true
Peter Korsgaardf627ebe2013-08-26 00:34:45 +0200492 if test -d $(TARGET_DIR)/lib/modules; then \
Thomas Petazzonifde26052013-08-20 13:03:02 +0200493 find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
Peter Korsgaardf627ebe2013-08-26 00:34:45 +0200494 xargs -r $(KSTRIPCMD); fi
Mike Frysinger8101c9a2010-11-17 18:55:43 -0500495
Richard Braun6ae78862012-11-20 07:18:11 +0000496# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads
497# besides the one in which crash occurred; or SIGTRAP kills my program when
498# I set a breakpoint"
499ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
500 find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \
501 xargs $(STRIPCMD) $(STRIP_STRIP_DEBUG) || true
502endif
503
Thomas Petazzoni4ccde7f2010-08-30 22:52:18 +0200504 mkdir -p $(TARGET_DIR)/etc
505 # Mandatory configuration file and auxilliary cache directory
506 # for recent versions of ldconfig
507 touch $(TARGET_DIR)/etc/ld.so.conf
508 mkdir -p $(TARGET_DIR)/var/cache/ldconfig
Peter Korsgaarde49e2fe2010-07-26 23:53:37 +0200509 if [ -x "$(TARGET_CROSS)ldconfig" ]; \
510 then \
Thomas Petazzoni4ccde7f2010-08-30 22:52:18 +0200511 $(TARGET_CROSS)ldconfig -r $(TARGET_DIR); \
Peter Korsgaarde49e2fe2010-07-26 23:53:37 +0200512 else \
Thomas Petazzoni4ccde7f2010-08-30 22:52:18 +0200513 /sbin/ldconfig -r $(TARGET_DIR); \
Peter Korsgaarde49e2fe2010-07-26 23:53:37 +0200514 fi
Peter Korsgaard451a8872012-02-14 12:58:25 +0100515 ( \
516 echo "NAME=Buildroot"; \
517 echo "VERSION=$(BR2_VERSION_FULL)"; \
518 echo "ID=buildroot"; \
519 echo "VERSION_ID=$(BR2_VERSION)"; \
520 echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
521 ) > $(TARGET_DIR)/etc/os-release
Peter Korsgaard912ea812009-09-30 17:40:24 +0200522
Luca Ceresolie9b77122013-04-08 06:50:16 +0000523 @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
524 $(call MESSAGE,"Copying overlay $(d)"); \
Arnout Vandecappelle (Essensium/Mind)7f860892013-02-05 07:16:00 +0000525 rsync -a \
Arnout Vandecappelle (Essensium/Mind)afea3032013-02-07 11:58:10 +0000526 --exclude .empty --exclude .svn --exclude .git \
Danomi Manchegoe97376a2013-05-01 17:15:26 +0000527 --exclude .hg --exclude=CVS --exclude '*~' \
Luca Ceresolie9b77122013-04-08 06:50:16 +0000528 $(d)/ $(TARGET_DIR)$(sep))
Arnout Vandecappelle (Essensium/Mind)7f860892013-02-05 07:16:00 +0000529
Philippe Reynesdbf49782012-11-17 13:01:22 +0100530 @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
Luca Ceresoli1b9b1682013-04-08 06:50:14 +0000531 $(call MESSAGE,"Executing post-build script $(s)"); \
Yann E. MORINf1f97b32013-07-10 00:00:31 +0200532 $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
Daniel Mackeed7d872009-07-08 22:46:58 +0200533
Peter Korsgaardb87b4742009-04-06 09:21:26 +0000534ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
Thomas Petazzoni397fe5c2009-09-05 15:49:30 +0200535LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
Thomas Petazzoni6cdf2482009-07-30 17:28:20 +0200536LOCALE_NOPURGE=$(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
Peter Korsgaardb87b4742009-04-06 09:21:26 +0000537
538target-purgelocales:
539 rm -f $(LOCALE_WHITELIST)
540 for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done
541
542 for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man)); \
543 do \
544 for lang in $$(cd $$dir; ls .|grep -v man); \
545 do \
546 grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \
547 done; \
548 done
549endif
550
Thomas Petazzoniaebf1992012-05-08 04:39:22 +0000551ifneq ($(GENERATE_LOCALE),)
552# Generate locale data. Basically, we call the localedef program
553# (built by the host-localedef package) for each locale. The input
554# data comes preferably from the toolchain, or if the toolchain does
555# not have them (Linaro toolchains), we use the ones available on the
556# host machine.
557target-generatelocales: host-localedef
558 $(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
559 $(Q)for locale in $(GENERATE_LOCALE) ; do \
Arnout Vandecappelle8e2696e2013-08-22 07:43:58 +0200560 inputfile=`echo $${locale} | cut -f1 -d'.' -s` ; \
561 charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
Thomas Petazzoniaebf1992012-05-08 04:39:22 +0000562 if test -z "$${charmap}" ; then \
563 charmap="UTF-8" ; \
564 fi ; \
565 echo "Generating locale $${inputfile}.$${charmap}" ; \
566 I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
567 $(HOST_DIR)/usr/bin/localedef \
568 --prefix=$(TARGET_DIR) \
569 --`echo $(BR2_ENDIAN) | tr [A-Z] [a-z]`-endian \
570 -i $${inputfile} -f $${charmap} \
571 $${locale} ; \
572 done
573endif
574
Thomas Petazzoni9fa32ba2013-02-07 11:58:43 +0000575target-post-image:
Thomas Petazzoni9fa32ba2013-02-07 11:58:43 +0000576 @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
Luca Ceresoli6d90a692013-04-08 06:50:15 +0000577 $(call MESSAGE,"Executing post-image script $(s)"); \
Yann E. MORINf1f97b32013-07-10 00:00:31 +0200578 $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
Thomas Petazzoni9fa32ba2013-02-07 11:58:43 +0000579
Thomas Petazzoni217ef082013-01-13 04:52:13 +0000580toolchain-eclipse-register:
581 ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
582
Thomas De Schampheleire4eb982c2011-07-27 11:34:51 +0200583source: dirs $(TARGETS_SOURCE) $(HOST_SOURCE)
Eric Andersenffde94b2001-12-22 00:56:11 +0000584
Peter Korsgaard155971e2008-03-04 12:19:16 +0000585external-deps:
Peter Korsgaard22c2c6b2010-11-19 14:20:56 +0100586 @$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u
Peter Korsgaard155971e2008-03-04 12:19:16 +0000587
Luca Ceresoli7e76f902012-05-17 19:33:00 +0200588legal-info-clean:
589 @rm -fr $(LEGAL_INFO_DIR)
590
591legal-info-prepare: $(LEGAL_INFO_DIR)
592 @$(call MESSAGE,"Collecting legal info")
593 @$(call legal-license-file,buildroot,COPYING,COPYING)
594 @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE)
595 @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved)
596 @$(call legal-warning,the Buildroot source code has not been saved)
597 @$(call legal-warning,the toolchain has not been saved)
Yann E. MORINdcb79992013-01-13 11:52:21 +0000598 @cp $(BUILDROOT_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
Luca Ceresoli7e76f902012-05-17 19:33:00 +0200599
600legal-info: dirs legal-info-clean legal-info-prepare $(REDIST_SOURCES_DIR) \
601 $(TARGETS_LEGAL_INFO)
602 @cat support/legal-info/README.header >>$(LEGAL_REPORT)
603 @if [ -r $(LEGAL_WARNINGS) ]; then \
604 cat support/legal-info/README.warnings-header \
605 $(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \
606 cat $(LEGAL_WARNINGS); fi
607 @echo "Legal info produced in $(LEGAL_INFO_DIR)"
608 @rm -f $(LEGAL_WARNINGS)
609
Thomas Petazzonib7d6c8a2010-05-13 19:20:33 +0200610show-targets:
611 @echo $(TARGETS)
612
Bernhard Reutner-Fischercfe511b2007-09-29 13:58:30 +0000613else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
Eric Andersen2d523c22004-10-09 01:06:03 +0000614
615all: menuconfig
616
Arnout Vandecappelle (Essensium/Mind)1ed49962013-02-05 07:16:02 +0000617endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
618
Eric Andersen2d523c22004-10-09 01:06:03 +0000619# configuration
620# ---------------------------------------------------------------------------
621
Bernhard Reutner-Fischerc0d7d4e2007-07-09 18:23:20 +0000622HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
623export HOSTCFLAGS
624
Peter Korsgaard2cc210c2010-06-20 23:05:32 +0200625$(BUILD_DIR)/buildroot-config/%onf:
626 mkdir -p $(@D)/lxdialog
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100627 $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
Alper Yildirimb0df9df2009-07-20 19:17:10 +0200628
Arnout Vandecappelle (Essensium/Mind)1ed49962013-02-05 07:16:02 +0000629DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG))
630
631# We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will
632# recognize that if it's still at its default $(CONFIG_DIR)/defconfig
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200633COMMON_CONFIG_ENV = \
Arnout Vandecappelle (Essensium/Mind)1ed49962013-02-05 07:16:02 +0000634 BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200635 KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
636 KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
Thomas Petazzoni0b368802010-08-22 07:27:09 +0200637 KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
Yann E. MORINdcb79992013-01-13 11:52:21 +0000638 BUILDROOT_CONFIG=$(BUILDROOT_CONFIG)
Alper Yildirimb0df9df2009-07-20 19:17:10 +0200639
Yann E. MORINaefad532010-09-26 10:56:12 +0200640xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000641 @mkdir -p $(BUILD_DIR)/buildroot-config
Peter Korsgaard610255e2010-11-24 15:30:54 +0100642 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
Alper Yildirimb0df9df2009-07-20 19:17:10 +0200643
Yann E. MORINaefad532010-09-26 10:56:12 +0200644gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000645 @mkdir -p $(BUILD_DIR)/buildroot-config
Peter Korsgaard610255e2010-11-24 15:30:54 +0100646 @$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN)
Peter Korsgaard2b42aae2010-06-05 21:09:05 +0200647
Yann E. MORINaefad532010-09-26 10:56:12 +0200648menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000649 @mkdir -p $(BUILD_DIR)/buildroot-config
Peter Korsgaard610255e2010-11-24 15:30:54 +0100650 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000651
Yann E. MORINaefad532010-09-26 10:56:12 +0200652nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
Thomas Petazzoni8b6585a2010-08-21 17:21:40 +0200653 @mkdir -p $(BUILD_DIR)/buildroot-config
Peter Korsgaard610255e2010-11-24 15:30:54 +0100654 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000655
Yann E. MORINaefad532010-09-26 10:56:12 +0200656config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000657 @mkdir -p $(BUILD_DIR)/buildroot-config
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200658 @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000659
Yann E. MORINaefad532010-09-26 10:56:12 +0200660oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000661 mkdir -p $(BUILD_DIR)/buildroot-config
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200662 @$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000663
Yann E. MORINaefad532010-09-26 10:56:12 +0200664randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000665 @mkdir -p $(BUILD_DIR)/buildroot-config
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200666 @$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000667
Yann E. MORINaefad532010-09-26 10:56:12 +0200668allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000669 @mkdir -p $(BUILD_DIR)/buildroot-config
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200670 @$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000671
Yann E. MORINaefad532010-09-26 10:56:12 +0200672allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000673 @mkdir -p $(BUILD_DIR)/buildroot-config
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200674 @$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000675
Yann E. MORINaefad532010-09-26 10:56:12 +0200676randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000677 @mkdir -p $(BUILD_DIR)/buildroot-config
Yann E. MORINdcb79992013-01-13 11:52:21 +0000678 @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
Peter Korsgaard8a46d4b2012-12-01 18:10:46 -0800679 @grep '^config BR2_PACKAGE_' Config.in.legacy | \
680 while read config pkg; do \
681 echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200682 @$(COMMON_CONFIG_ENV) \
Will Wagner39ca6d52010-01-11 12:28:50 +0000683 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200684 $< --randconfig $(CONFIG_CONFIG_IN)
Will Wagner39ca6d52010-01-11 12:28:50 +0000685 @rm -f $(CONFIG_DIR)/.config.nopkg
Peter Korsgaard66527702009-10-04 21:57:12 +0200686
Yann E. MORINaefad532010-09-26 10:56:12 +0200687allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000688 @mkdir -p $(BUILD_DIR)/buildroot-config
Yann E. MORINdcb79992013-01-13 11:52:21 +0000689 @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
Peter Korsgaard8a46d4b2012-12-01 18:10:46 -0800690 @grep '^config BR2_PACKAGE_' Config.in.legacy | \
691 while read config pkg; do \
692 echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200693 @$(COMMON_CONFIG_ENV) \
Will Wagner39ca6d52010-01-11 12:28:50 +0000694 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200695 $< --allyesconfig $(CONFIG_CONFIG_IN)
Will Wagner39ca6d52010-01-11 12:28:50 +0000696 @rm -f $(CONFIG_DIR)/.config.nopkg
Peter Korsgaard66527702009-10-04 21:57:12 +0200697
Yann E. MORINaefad532010-09-26 10:56:12 +0200698allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000699 @mkdir -p $(BUILD_DIR)/buildroot-config
Yann E. MORINdcb79992013-01-13 11:52:21 +0000700 @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200701 @$(COMMON_CONFIG_ENV) \
Will Wagner39ca6d52010-01-11 12:28:50 +0000702 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200703 $< --allnoconfig $(CONFIG_CONFIG_IN)
Will Wagner39ca6d52010-01-11 12:28:50 +0000704 @rm -f $(CONFIG_DIR)/.config.nopkg
Peter Korsgaard66527702009-10-04 21:57:12 +0200705
Yann E. MORINaefad532010-09-26 10:56:12 +0200706silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Thomas Petazzoni0b368802010-08-22 07:27:09 +0200707 @mkdir -p $(BUILD_DIR)/buildroot-config
708 $(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
709
Thomas Petazzoni9db3b472013-04-04 11:24:25 +0000710olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
711 @mkdir -p $(BUILD_DIR)/buildroot-config
712 $(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN)
713
Yann E. MORINaefad532010-09-26 10:56:12 +0200714defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Will Wagner39ca6d52010-01-11 12:28:50 +0000715 @mkdir -p $(BUILD_DIR)/buildroot-config
Arnout Vandecappelle (Essensium/Mind)1ed49962013-02-05 07:16:02 +0000716 @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000717
Yann E. MORINaefad532010-09-26 10:56:12 +0200718%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
Thomas Petazzoni6f381192010-08-11 20:01:23 +0200719 @mkdir -p $(BUILD_DIR)/buildroot-config
Thomas Petazzoni1039eb72010-08-21 18:29:27 +0200720 @$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
Thomas Petazzoni6f381192010-08-11 20:01:23 +0200721
Yann E. MORINaefad532010-09-26 10:56:12 +0200722savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
Thomas Petazzonie1b1a182010-08-21 18:50:44 +0200723 @mkdir -p $(BUILD_DIR)/buildroot-config
Arnout Vandecappelle (Essensium/Mind)1ed49962013-02-05 07:16:02 +0000724 @$(COMMON_CONFIG_ENV) $< \
725 --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
726 $(CONFIG_CONFIG_IN)
Eric Andersen2d523c22004-10-09 01:06:03 +0000727
Bernhard Reutner-Fischer6547bce2007-08-22 12:35:41 +0000728# check if download URLs are outdated
Thomas De Schampheleire07bae752012-06-21 19:38:42 +0000729source-check:
Yann E. MORIN7c297452011-07-14 13:02:33 +0200730 $(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
Bernhard Reutner-Fischer825ff342007-06-07 12:57:03 +0000731
Arnout Vandecappelle (Essensium/Mind)1ed49962013-02-05 07:16:02 +0000732.PHONY: defconfig savedefconfig
Peter Korsgaard406053d2009-11-20 14:05:48 +0100733
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200734################################################################################
Eric Andersen2d523c22004-10-09 01:06:03 +0000735#
736# Cleanup and misc junk
737#
Alexandre Belloni95442bb2013-06-07 12:13:46 +0200738################################################################################
Yann E. MORINaefad532010-09-26 10:56:12 +0200739
740# outputmakefile generates a Makefile in the output directory, if using a
741# separate output directory. This allows convenient use of make in the
742# output directory.
743outputmakefile:
744ifeq ($(NEED_WRAPPER),y)
Thomas Petazzonif082c7c2011-08-31 23:35:02 +0200745 $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
Yann E. MORINaefad532010-09-26 10:56:12 +0200746endif
747
Émeric Vigier98b616d2013-05-29 00:41:11 +0200748# printvars prints all the variables currently defined in our Makefiles
749printvars:
750 @$(foreach V, \
751 $(sort $(.VARIABLES)), \
752 $(if $(filter-out environment% default automatic, \
753 $(origin $V)), \
754 $(info $V=$($V) ($(value $V)))))
755
Eric Andersen2d523c22004-10-09 01:06:03 +0000756clean:
Peter Korsgaard406053d2009-11-20 14:05:48 +0100757 rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
Thomas Petazzonid21a1762013-06-30 21:29:06 +0200758 $(STAMP_DIR) $(BUILD_DIR) $(BASE_DIR)/staging \
Luca Ceresoli7e76f902012-05-17 19:33:00 +0200759 $(LEGAL_INFO_DIR)
Eric Andersen2d523c22004-10-09 01:06:03 +0000760
761distclean: clean
Peter Korsgaard406053d2009-11-20 14:05:48 +0100762ifeq ($(DL_DIR),$(TOPDIR)/dl)
763 rm -rf $(DL_DIR)
764endif
765ifeq ($(O),output)
766 rm -rf $(O)
767endif
Yann E. MORINdcb79992013-01-13 11:52:21 +0000768 rm -rf $(BUILDROOT_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps
Eric Andersen2d523c22004-10-09 01:06:03 +0000769
Bernhard Reutner-Fischere491fba2007-07-08 12:20:58 +0000770help:
771 @echo 'Cleaning:'
Peter Korsgaard406053d2009-11-20 14:05:48 +0100772 @echo ' clean - delete all files created by build'
Bernhard Reutner-Fischere491fba2007-07-08 12:20:58 +0000773 @echo ' distclean - delete all non-source files (including .config)'
774 @echo
775 @echo 'Build:'
776 @echo ' all - make world'
Fabio Porcedda2a786412013-01-14 22:02:00 +0000777 @echo ' toolchain - build toolchain'
Stephan Hoffmann040f6a32012-04-06 18:44:22 +0200778 @echo ' <package>-rebuild - force recompile <package>'
779 @echo ' <package>-reconfigure - force reconfigure <package>'
Bernhard Reutner-Fischere491fba2007-07-08 12:20:58 +0000780 @echo
781 @echo 'Configuration:'
782 @echo ' menuconfig - interactive curses-based configurator'
Peter Korsgaard15f5bef2011-02-01 08:41:01 +0100783 @echo ' nconfig - interactive ncurses-based configurator'
Peter Korsgaardc48bbb82009-10-04 21:42:54 +0200784 @echo ' xconfig - interactive Qt-based configurator'
Peter Korsgaard2b42aae2010-06-05 21:09:05 +0200785 @echo ' gconfig - interactive GTK-based configurator'
Bernhard Reutner-Fischere491fba2007-07-08 12:20:58 +0000786 @echo ' oldconfig - resolve any unresolved symbols in .config'
Thomas Petazzoni9db3b472013-04-04 11:24:25 +0000787 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
788 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
Peter Korsgaardc48bbb82009-10-04 21:42:54 +0200789 @echo ' randconfig - New config with random answer to all options'
790 @echo ' defconfig - New config with default answer to all options'
Arnout Vandecappelle33f454b2012-04-28 07:14:50 +0000791 @echo ' BR2_DEFCONFIG, if set, is used as input'
Peter Korsgaardd7051da2010-12-07 12:16:44 +0100792 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
Peter Korsgaardc48bbb82009-10-04 21:42:54 +0200793 @echo ' allyesconfig - New config where all options are accepted with yes'
794 @echo ' allnoconfig - New config where all options are answered with no'
Peter Korsgaard66527702009-10-04 21:57:12 +0200795 @echo ' randpackageconfig - New config with random answer to package options'
796 @echo ' allyespackageconfig - New config where pkg options are accepted with yes'
797 @echo ' allnopackageconfig - New config where package options are answered with no'
Peter Korsgaard4bb33dc2011-04-25 00:10:45 +0200798ifeq ($(BR2_PACKAGE_BUSYBOX),y)
799 @echo ' busybox-menuconfig - Run BusyBox menuconfig'
800endif
801ifeq ($(BR2_LINUX_KERNEL),y)
802 @echo ' linux-menuconfig - Run Linux kernel menuconfig'
Jean-Christophe PLAGNIOL-VILLARDf5777ce2011-08-22 21:28:47 +0200803 @echo ' linux-savedefconfig - Run Linux kernel savedefconfig'
Peter Korsgaard4bb33dc2011-04-25 00:10:45 +0200804endif
805ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
806 @echo ' uclibc-menuconfig - Run uClibc menuconfig'
807endif
808ifeq ($(BR2_TOOLCHAIN_CTNG),y)
809 @echo ' ctng-menuconfig - Run crosstool-NG menuconfig'
810endif
Jean-Christophe PLAGNIOL-VILLARD83f1bf92011-08-22 21:28:48 +0200811ifeq ($(BR2_TARGET_BAREBOX),y)
812 @echo ' barebox-menuconfig - Run barebox menuconfig'
813 @echo ' barebox-savedefconfig - Run barebox savedefconfig'
814endif
Bernhard Reutner-Fischere491fba2007-07-08 12:20:58 +0000815 @echo
Thomas Petazzoni8792cf92011-10-10 10:46:40 +0200816 @echo 'Documentation:'
817 @echo ' manual - build manual in HTML, split HTML, PDF and txt'
818 @echo ' manual-html - build manual in HTML'
819 @echo ' manual-split-html - build manual in split HTML'
820 @echo ' manual-pdf - build manual in PDF'
821 @echo ' manual-txt - build manual in txt'
822 @echo ' manual-epub - build manual in ePub'
823 @echo
Bernhard Reutner-Fischere491fba2007-07-08 12:20:58 +0000824 @echo 'Miscellaneous:'
825 @echo ' source - download all sources needed for offline-build'
Thomas De Schampheleire07bae752012-06-21 19:38:42 +0000826 @echo ' source-check - check selected packages for valid download URLs'
Peter Korsgaard155971e2008-03-04 12:19:16 +0000827 @echo ' external-deps - list external packages used'
Luca Ceresoli7e76f902012-05-17 19:33:00 +0200828 @echo ' legal-info - generate info about license compliance'
Bernhard Reutner-Fischere491fba2007-07-08 12:20:58 +0000829 @echo
Peter Korsgaard15f5bef2011-02-01 08:41:01 +0100830 @echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build'
831 @echo ' make O=dir - Locate all output files in "dir", including .config'
832 @echo
Danomi Mocelopolisb9796192011-07-17 22:17:08 +0200833 @$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \
Peter Korsgaard58fd7792009-10-04 22:09:25 +0200834 printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
835 @echo
Thomas Petazzoni8792cf92011-10-10 10:46:40 +0200836 @echo 'See docs/README, or generate the Buildroot manual for further details'
Bernhard Reutner-Fischer663dee42007-08-27 21:40:42 +0000837 @echo
Bernhard Reutner-Fischerba2e7e02007-06-25 10:56:13 +0000838
Yann E. MORINe5e8fae2010-10-31 17:35:10 +0100839release: OUT=buildroot-$(BR2_VERSION)
Peter Korsgaard0dca7062010-11-04 00:00:00 +0100840
Peter Korsgaard134ab1c2012-02-03 22:03:29 +0100841# Create release tarballs. We need to fiddle a bit to add the generated
842# documentation to the git output
Peter Korsgaard0dca7062010-11-04 00:00:00 +0100843release:
Peter Korsgaard134ab1c2012-02-03 22:03:29 +0100844 git archive --format=tar --prefix=$(OUT)/ master > $(OUT).tar
845 $(MAKE) O=$(OUT) manual-html manual-txt manual-pdf
846 tar rf $(OUT).tar $(OUT)
847 gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
848 bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
849 rm -rf $(OUT) $(OUT).tar
Peter Korsgaarde62d2ec2009-01-15 19:36:06 +0000850
Arnout Vandecappelle (Essensium/Mind)2b91ab72012-03-11 12:16:39 +0100851print-version:
852 @echo $(BR2_VERSION_FULL)
853
Thomas Petazzonib7285d02012-04-17 16:45:22 +0200854include docs/manual/manual.mk
Thomas Petazzoni8792cf92011-10-10 10:46:40 +0200855
Peter Korsgaard66527702009-10-04 21:57:12 +0200856.PHONY: $(noconfig_targets)