# Makefile for buildroot2
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+# This top-level Makefile can *not* be executed in parallel
+.NOTPARALLEL:
+
#--------------------------------------------------------------
# Just run 'make menuconfig', configure stuff, then run 'make'.
# You shouldn't need to mess with anything beyond this point...
# absolute path
TOPDIR:=$(shell pwd)
CONFIG_CONFIG_IN=Config.in
-CONFIG_DEFCONFIG=.defconfig
CONFIG=package/config
DATE:=$(shell date +%Y%m%d)
-noconfig_targets:=menuconfig xconfig config oldconfig randconfig \
- defconfig allyesconfig allnoconfig release \
+noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
+ defconfig %_defconfig savedefconfig allyesconfig allnoconfig silentoldconfig release \
randpackageconfig allyespackageconfig allnopackageconfig \
source-check help
empty:=
space:=$(empty) $(empty)
+ifneq ("$(origin O)", "command line")
+O:=output
+CONFIG_DIR:=$(TOPDIR)
+NEED_WRAPPER=
+else
+# other packages might also support Linux-style out of tree builds
+# with the O=<dir> syntax (E.G. Busybox does). As make automatically
+# forwards command line variable definitions those packages get very
+# confused. Fix this by telling make to not do so
+MAKEOVERRIDES =
+# strangely enough O is still passed to submakes with MAKEOVERRIDES
+# (with make 3.81 atleast), the only thing that changes is the output
+# of the origin function (command line -> environment).
+# Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
+# To really make O go away, we have to override it.
+override O:=$(O)
+CONFIG_DIR:=$(O)
+# we need to pass O= everywhere we call back into the toplevel makefile
+EXTRAMAKEARGS = O=$(O)
+NEED_WRAPPER=y
+endif
+
# $(shell find . -name *_defconfig |sed 's/.*\///')
# Pull in the user's configuration file
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
--include .config
+-include $(CONFIG_DIR)/.config
endif
# Override BR2_DL_DIR if shell variable defined
endif
export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
+# bash prints the name of the directory on 'cd <dir>' if CDPATH is
+# set, so unset it here to not cause problems. Notice that the export
+# line doesn't affect the environment of $(shell ..) calls, so
+# explictly throw away any output from 'cd' here.
+export CDPATH:=
+BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
+$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
+
+BUILD_DIR:=$(BASE_DIR)/build
+
ifeq ($(BR2_HAVE_DOT_CONFIG),y)
unexport CROSS_COMPILE
unexport ARCH
+GNU_HOST_NAME:=$(shell package/gnuconfig/config.guess)
+
#############################################################
#
# Setup the proper filename extensions for the host
#
##############################################################
-ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring linux,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=
HOST_LIBEXT:=.a
HOST_SHREXT:=.so
endif
-ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring apple,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=
HOST_LIBEXT:=.a
HOST_SHREXT:=.dylib
endif
-ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring cygwin,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=.exe
HOST_LIBEXT:=.lib
HOST_SHREXT:=.dll
HOST_LOADLIBES="-lcurses -lintl"
export HOST_LOADLIBES
endif
-ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring mingw,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=.exe
HOST_LIBEXT:=.lib
HOST_SHREXT:=.dll
ifeq ($(ARCH),xtensa)
ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
endif
-WGET:=$(call qstrip,$(BR2_WGET)) $(SPIDER) $(QUIET)
-SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
-SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
-BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
-BZR_UP:=$(call qstrip,$(BR2_BZR_UP)) $(QUIET)
-GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
+
+KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
+ -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/ \
+ -e s/parisc64/parisc/ \
+ -e s/powerpc64/powerpc/ \
+ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+ -e s/sh.*/sh/)
+
ZCAT:=$(call qstrip,$(BR2_ZCAT))
BZCAT:=$(call qstrip,$(BR2_BZCAT))
TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
-ifneq ("$(origin O)", "command line")
-O:=output
-else
-# other packages might also support Linux-style out of tree builds
-# with the O=<dir> syntax (E.G. Busybox does). As make automatically
-# forwards command line variable definitions those packages get very
-# confused. Fix this by telling make to not do so
-MAKEOVERRIDES =
-endif
-
-# bash prints the name of the directory on 'cd <dir>' if CDPATH is
-# set, so unset it here to not cause problems. Notice that the export
-# line doesn't affect the environment of $(shell ..) calls, so
-# explictly throw away any output from 'cd' here.
-export CDPATH:=
-BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
-$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
-
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(TOPDIR)/dl
-endif
-
-BUILD_DIR:=$(BASE_DIR)/build
-
GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
BINARIES_DIR:=$(BASE_DIR)/images
TARGET_DIR:=$(BASE_DIR)/target
-
-# define values for prepatched source trees for toolchains
-VENDOR_SITE:=$(call qstrip,$(BR2_VENDOR_SITE))
-VENDOR_BINUTILS_RELEASE:=$(call qstrip,$(BR2_VENDOR_BINUTILS_RELEASE))
-VENDOR_GCC_RELEASE:=$(call qstrip,$(BR2_VENDOR_GCC_RELEASE))
-VENDOR_UCLIBC_RELEASE:=$(call qstrip,$(BR2_VENDOR_UCLIBC_RELEASE))
-VENDOR_PATCH_DIR:=$(call qstrip,$(BR2_VENDOR_PATCH_DIR))
+TOOLCHAIN_DIR=$(BASE_DIR)/toolchain
+TARGET_SKELETON=$(TOPDIR)/fs/skeleton
BR2_DEPENDS_DIR=$(BUILD_DIR)/buildroot-config
all: world
# In this section, we need .config
-include .config.cmd
+-include $(CONFIG_DIR)/.config.cmd
# We also need the various per-package makefiles, which also add
# each selected package to TARGETS if that package was selected
# in the .config file.
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-# avoid pulling in external toolchain which is broken for toplvl parallel builds
-# Explicit ordering:
-include toolchain/dependencies/dependencies.mk
-include toolchain/binutils/binutils.mk
-include toolchain/ccache/ccache.mk
-include toolchain/elf2flt/elf2flt.mk
-include toolchain/gcc/gcc-uclibc-3.x.mk
-include toolchain/gcc/gcc-uclibc-4.x.mk
-include toolchain/gdb/gdb.mk
-include toolchain/kernel-headers/kernel-headers.mk
-include toolchain/mklibs/mklibs.mk
-include toolchain/sstrip/sstrip.mk
-include toolchain/uClibc/uclibc.mk
-else
-include toolchain/*/*.mk
-endif
-
-ifeq ($(BR2_PACKAGE_LINUX),y)
-TARGETS+=linux26-modules
+include toolchain/toolchain-buildroot.mk
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
+include toolchain/toolchain-external.mk
+else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
+include toolchain/toolchain-crosstool-ng.mk
endif
include package/*/*.mk
TARGETS+=target-purgelocales
endif
-# target stuff is last so it can override anything else
+include boot/common.mk
include target/Makefile.in
+include linux/linux.mk
+include fs/common.mk
TARGETS+=erase-fakeroots
# all targets depend on the crosscompiler and it's prerequisites
$(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
-$(BR2_DEPENDS_DIR): .config
- rm -rf $@
- mkdir -p $(@D)
- cp -dpRf $(CONFIG)/buildroot-config $@
-
dirs: $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR)
$(BASE_TARGETS): dirs
-world: dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
+$(BUILD_DIR)/buildroot-config/auto.conf: $(CONFIG_DIR)/.config
+ $(MAKE) $(EXTRAMAKEARGS) silentoldconfig
+
+prepare: $(BUILD_DIR)/buildroot-config/auto.conf
+world: prepare dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
-.PHONY: all world dirs clean distclean source \
+
+.PHONY: all world dirs clean distclean source outputmakefile \
$(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
$(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(STAGING_DIR):
@mkdir -p $(STAGING_DIR)/bin
@mkdir -p $(STAGING_DIR)/lib
-ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
@mkdir -p $(STAGING_DIR)/usr/lib
-else
-ifneq ($(BR2_TOOLCHAIN_EXTERNAL),y)
- @ln -snf . $(STAGING_DIR)/usr
- @mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)
- @ln -snf ../lib $(STAGING_DIR)/usr/lib
- @ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
-endif
-endif
@mkdir -p $(STAGING_DIR)/usr/include
+ @mkdir -p $(STAGING_DIR)/usr/bin
+
+ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
+TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
+endif
$(BUILD_DIR)/.root:
mkdir -p $(TARGET_DIR)
ifeq ($(BR2_HAVE_DEVFILES),y)
( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
else
- rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig
+ rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/aclocal
find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
endif
-ifneq ($(BR2_HAVE_MANPAGES),y)
- rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
+ifneq ($(BR2_PACKAGE_GDB),y)
+ rm -rf $(TARGET_DIR)/usr/share/gdb
endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
+ifneq ($(BR2_HAVE_DOCUMENTATION),y)
+ rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
+ rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
+ rm -rf $(TARGET_DIR)/usr/share/gtk-doc
endif
find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
- $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null
-
mkdir -p $(TARGET_DIR)/etc
+ # Mandatory configuration file and auxilliary cache directory
+ # for recent versions of ldconfig
+ touch $(TARGET_DIR)/etc/ld.so.conf
+ mkdir -p $(TARGET_DIR)/var/cache/ldconfig
+ if [ -x "$(TARGET_CROSS)ldconfig" ]; \
+ then \
+ $(TARGET_CROSS)ldconfig -r $(TARGET_DIR); \
+ else \
+ /sbin/ldconfig -r $(TARGET_DIR); \
+ fi
echo $(BR2_VERSION)$(shell $(TOPDIR)/scripts/setlocalversion) > \
$(TARGET_DIR)/etc/br-version
source: $(TARGETS_SOURCE) $(HOST_SOURCE)
_source-check:
- $(MAKE) SPIDER=--spider source
+ $(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
external-deps:
- @$(MAKE) -Bs BR2_WGET=$(TOPDIR)/toolchain/wget-show-external-deps.sh \
- SPIDER=--spider source
+ @$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source
+
+show-targets:
+ @echo $(TARGETS)
ifeq ($(BR2_CONFIG_CACHE),y)
-# drop configure cache if configuration is changed
-$(BUILD_DIR)/tgt-config.cache: .config
+# drop configure caches if configuration is changed
+$(BUILD_DIR)/tgt-config.cache $(BUILD_DIR)/host-config.cache: $(CONFIG_DIR)/.config
rm -f $@
touch $@
-$(BASE_TARGETS): | $(BUILD_DIR)/tgt-config.cache
+$(BASE_TARGETS): | $(BUILD_DIR)/tgt-config.cache $(BUILD_DIR)/host-config.cache
endif
else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
export HOSTCFLAGS
-$(CONFIG)/conf:
- @mkdir -p $(CONFIG)/buildroot-config
- $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf
- -@if [ ! -f .config ]; then \
- cp $(CONFIG_DEFCONFIG) .config; \
- fi
+$(BUILD_DIR)/buildroot-config/%onf:
+ mkdir -p $(@D)/lxdialog
+ $(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
+
+COMMON_CONFIG_ENV = \
+ KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
+ KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+ KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
+ BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
-$(CONFIG)/mconf:
- @mkdir -p $(CONFIG)/buildroot-config
- $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) mconf
- -@if [ ! -f .config ]; then \
- cp $(CONFIG_DEFCONFIG) .config; \
+xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
+ test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
fi
-$(CONFIG)/qconf:
- @mkdir -p $(CONFIG)/buildroot-config
- $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) qconf
- -@if [ ! -f .config ]; then \
- cp $(CONFIG_DEFCONFIG) .config; \
+gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @if ! $(COMMON_CONFIG_ENV) srctree=$(TOPDIR) \
+ $< $(CONFIG_CONFIG_IN); then \
+ test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
fi
-xconfig: $(CONFIG)/qconf
- @mkdir -p $(CONFIG)/buildroot-config
- @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/qconf $(CONFIG_CONFIG_IN); then \
- test -f .config.cmd || rm -f .config; \
+menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
+ test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
fi
-menuconfig: $(CONFIG)/mconf
- @mkdir -p $(CONFIG)/buildroot-config
- @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/mconf $(CONFIG_CONFIG_IN); then \
- test -f .config.cmd || rm -f .config; \
+nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
+ test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
fi
-config: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/conf $(CONFIG_CONFIG_IN)
-
-oldconfig: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
-
-randconfig: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
-
-allyesconfig: $(CONFIG)/conf
- cat $(CONFIG_DEFCONFIG) > .config
- @mkdir -p $(CONFIG)/buildroot-config
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
-
-allnoconfig: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
-
-randpackageconfig: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @grep -v BR2_PACKAGE_ .config > .config.nopkg
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- KCONFIG_ALLCONFIG=.config.nopkg \
- $(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
- @rm -f .config.nopkg
-
-allyespackageconfig: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @grep -v BR2_PACKAGE_ .config > .config.nopkg
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- KCONFIG_ALLCONFIG=.config.nopkg \
- $(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
- @rm -f .config.nopkg
-
-allnopackageconfig: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @grep -v BR2_PACKAGE_ .config > .config.nopkg
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- KCONFIG_ALLCONFIG=.config.nopkg \
- $(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
- @rm -f .config.nopkg
-
-defconfig: $(CONFIG)/conf
- @mkdir -p $(CONFIG)/buildroot-config
- @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
- KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
- $(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
+config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
+
+oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
+
+randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
+
+allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
+
+allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
+
+randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
+ @$(COMMON_CONFIG_ENV) \
+ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
+ $< --randconfig $(CONFIG_CONFIG_IN)
+ @rm -f $(CONFIG_DIR)/.config.nopkg
+
+allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
+ @$(COMMON_CONFIG_ENV) \
+ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
+ $< --allyesconfig $(CONFIG_CONFIG_IN)
+ @rm -f $(CONFIG_DIR)/.config.nopkg
+
+allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
+ @$(COMMON_CONFIG_ENV) \
+ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
+ $< --allnoconfig $(CONFIG_CONFIG_IN)
+ @rm -f $(CONFIG_DIR)/.config.nopkg
+
+silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ $(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
+
+defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
+
+%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
+
+savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --savedefconfig=$(TOPDIR)/defconfig $(CONFIG_CONFIG_IN)
# check if download URLs are outdated
source-check: allyesconfig
- $(MAKE) _source-check
+ $(MAKE) $(EXTRAMAKEARGS) _source-check
endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
# Cleanup and misc junk
#
#############################################################
+
+# outputmakefile generates a Makefile in the output directory, if using a
+# separate output directory. This allows convenient use of make in the
+# output directory.
+outputmakefile:
+ifeq ($(NEED_WRAPPER),y)
+ $(Q)$(TOPDIR)/scripts/mkmakefile $(TOPDIR) $(O)
+endif
+
clean:
rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
$(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR)
ifeq ($(O),output)
rm -rf $(O)
endif
- rm -rf .config .config.old .config.cmd .auto.deps
- -$(MAKE) -C $(CONFIG) clean
+ rm -rf $(CONFIG_DIR)/.config $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.config.cmd $(CONFIG_DIR)/.auto.deps
flush:
- rm -f $(BUILD_DIR)/tgt-config.cache
-
-%_defconfig: $(TOPDIR)/configs/%_defconfig
- cp $^ .config
- @$(MAKE) oldconfig
+ rm -f $(BUILD_DIR)/tgt-config.cache $(BUILD_DIR)/host-config.cache
-configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config
+configured: dirs kernel-headers uclibc-config busybox-config linux26-config
prepatch: gcc-patched binutils-patched gdb-patched uclibc-patched
@echo 'Configuration:'
@echo ' menuconfig - interactive curses-based configurator'
@echo ' xconfig - interactive Qt-based configurator'
+ @echo ' gconfig - interactive GTK-based configurator'
@echo ' oldconfig - resolve any unresolved symbols in .config'
@echo ' randconfig - New config with random answer to all options'
@echo ' defconfig - New config with default answer to all options'
@echo 'See docs/README and docs/buildroot.html for further details'
@echo
-release: distclean
+release:
OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
- rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
- tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
- rm -rf $$OUT
+ git archive --format=tar --prefix=$$OUT/ master|gzip -9 >$$OUT.tar.gz
.PHONY: $(noconfig_targets)