3 # Copyright (C) 2005 by Felix Fietkau <nbd@vd-s.ath.cx>
4 # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
6 # This program is free software; you can redistribute it and/or modify
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.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
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
21 #--------------------------------------------------------------
22 # Just run 'make menuconfig', configure stuff, then run 'make'.
23 # You shouldn't need to mess with anything beyond this point...
24 #--------------------------------------------------------------
27 CONFIG_CONFIG_IN
= Config.in
28 CONFIG_DEFCONFIG
= .defconfig
29 CONFIG
= package
/config
31 noconfig_targets
:= menuconfig config oldconfig randconfig \
32 defconfig allyesconfig allnoconfig release
tags
34 # Pull in the user's configuration file
35 ifeq ($(filter $(noconfig_targets
),$(MAKECMDGOALS
)),)
36 -include $(TOPDIR
)/.config
39 ifeq ($(strip $(BR2_HAVE_DOT_CONFIG
)),y
)
40 include $(TOPDIR
)/rules.mk
44 ##############################################################
48 ##############################################################
50 $(MAKE
) -C toolchain
install
52 ##############################################################
56 ##############################################################
58 package_install
: toolchain
59 $(MAKE
) -C package compile
install
61 #############################################################
63 # You should probably leave this stuff alone unless you know
66 #############################################################
69 # In this section, we need .config
72 world
: $(DL_DIR
) $(BUILD_DIR
) target_prepare
$(TARGET_DIR
) toolchain_install package_install target_install package_index
74 .PHONY
: all world
clean dirclean
distclean image_clean target_clean source target_prepare target_install toolchain_install package_install
78 $(STAGING_DIR
)/usr
/bin
/ipkg-make-index .
> Packages \
82 $(MAKE
) -C target prepare
85 $(MAKE
) -C target
install
91 @mkdir
-p
$(BUILD_DIR
)
93 source
: $(TARGETS_SOURCE
)
95 #############################################################
97 # Cleanup and misc junk
99 #############################################################
101 rm -f
$(STAMP_DIR
)/.
*-compile
102 rm -f
$(STAMP_DIR
)/.
*-install
105 target_clean
: image_clean
109 @
$(MAKE
) -C
$(CONFIG
) clean
115 rm -rf
$(STAMP_DIR
) $(DL_DIR
) $(BUILD_DIR
) $(TOOL_BUILD_DIR
)
116 rm -f .config
* .tmpconfig.h
118 sourceball
: distclean
121 rm -f buildroot.
tar.bz2
; \
122 tar -cvf buildroot.
tar buildroot
; \
123 bzip2
-9 buildroot.
tar; \
125 else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
130 # ---------------------------------------------------------------------------
133 $(MAKE
) -C
$(CONFIG
) conf
134 -@if
[ ! -f .config
] ; then \
135 cp
$(CONFIG_DEFCONFIG
) .config
; \
139 -@if
[ ! -f .config
] ; then \
140 cp
$(CONFIG_DEFCONFIG
) .config
; \
143 menuconfig
: $(CONFIG
)/mconf
145 -cp .config .config.
test
146 @
$(CONFIG
)/mconf
$(CONFIG_CONFIG_IN
)
147 -.
/scripts
/configtest.pl
149 config
: $(CONFIG
)/conf
151 -cp .config .config.
test
152 @
$(CONFIG
)/conf
$(CONFIG_CONFIG_IN
)
153 -.
/scripts
/configtest.pl
155 oldconfig
: $(CONFIG
)/conf
157 -cp .config .config.
test
158 @
$(CONFIG
)/conf
-o
$(CONFIG_CONFIG_IN
)
159 -.
/scripts
/configtest.pl
161 randconfig
: $(CONFIG
)/conf
163 -cp .config .config.
test
164 @
$(CONFIG
)/conf
-r
$(CONFIG_CONFIG_IN
)
165 -.
/scripts
/configtest.pl
167 allyesconfig
: $(CONFIG
)/conf
168 #@$(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
169 #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config
171 -cp .config .config.
test
172 @
$(CONFIG
)/conf
-o
$(CONFIG_CONFIG_IN
)
173 -.
/scripts
/configtest.pl
175 allnoconfig
: $(CONFIG
)/conf
177 -cp .config .config.
test
178 @
$(CONFIG
)/conf
-n
$(CONFIG_CONFIG_IN
)
179 -.
/scripts
/configtest.pl
181 defconfig
: $(CONFIG
)/conf
183 -cp .config .config.
test
184 @
$(CONFIG
)/conf
-d
$(CONFIG_CONFIG_IN
)
185 -.
/scripts
/configtest.pl
187 endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
189 .PHONY
: dummy subdirs release
distclean clean config oldconfig \
190 menuconfig
tags check test depend