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 #--------------------------------------------------------------
28 CONFIG_CONFIG_IN
= Config.in.devel
30 CONFIG_CONFIG_IN
= Config.in
32 CONFIG_DEFCONFIG
= .defconfig
33 CONFIG
= package
/config
35 noconfig_targets
:= menuconfig config oldconfig randconfig \
36 defconfig allyesconfig allnoconfig release
tags
38 # Pull in the user's configuration file
39 ifeq ($(filter $(noconfig_targets
),$(MAKECMDGOALS
)),)
40 -include $(TOPDIR
)/.config
43 ifeq ($(strip $(BR2_HAVE_DOT_CONFIG
)),y
)
44 include $(TOPDIR
)/rules.mk
50 ##############################################################
54 ##############################################################
56 $(MAKE
) -C toolchain
install
58 ##############################################################
62 ##############################################################
64 package_compile
: target_compile
65 $(MAKE
) -C package compile
67 package_install
: package_compile toolchain
68 $(MAKE
) -C package
install
70 #############################################################
72 # You should probably leave this stuff alone unless you know
75 #############################################################
77 # In this section, we need .config
80 world
: $(DL_DIR
) $(BUILD_DIR
) configtest toolchain_install package_install target_install package_index
82 .PHONY
: all world
clean dirclean
distclean image_clean target_clean source target_install toolchain_install package_install configtest
85 -cp .config .config.
test
86 -scripts
/configtest.pl
90 $(STAGING_DIR
)/usr
/bin
/ipkg-make-index .
> Packages \
94 $(MAKE
) -C target compile
97 $(MAKE
) -C target
install
103 @mkdir
-p
$(BUILD_DIR
)
105 source
: $(TARGETS_SOURCE
)
109 $(MAKE
) -C package
$(patsubst package
/%,%,$@
)
112 $(MAKE
) -C target
$(patsubst target
/%,%,$@
)
115 $(MAKE
) -C toolchain
$(patsubst toolchain
/%,%,$@
)
117 #############################################################
119 # Cleanup and misc junk
121 #############################################################
123 rm -f
$(STAMP_DIR
)/.
*-compile
124 rm -f
$(STAMP_DIR
)/.
*-install
127 target_clean
: image_clean
129 rm -rf
$(BUILD_DIR
)/linux-
*/root
132 @
$(MAKE
) -C
$(CONFIG
) clean
138 rm -rf
$(STAMP_DIR
) $(DL_DIR
) $(BUILD_DIR
) $(TOOL_BUILD_DIR
) $(STAGING_DIR
)
139 rm -f .config
* .tmpconfig.h
141 sourceball
: distclean
144 rm -f buildroot.
tar.bz2
; \
145 tar -cvf buildroot.
tar buildroot
; \
146 bzip2
-9 buildroot.
tar; \
148 else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
153 # ---------------------------------------------------------------------------
156 $(MAKE
) -C
$(CONFIG
) conf
157 -@if
[ ! -f .config
] ; then \
158 cp
$(CONFIG_DEFCONFIG
) .config
; \
162 -@if
[ ! -f .config
] ; then \
163 cp
$(CONFIG_DEFCONFIG
) .config
; \
166 menuconfig
: $(CONFIG
)/mconf
168 -cp .config .config.
test
169 @
$(CONFIG
)/mconf
$(CONFIG_CONFIG_IN
)
170 -.
/scripts
/configtest.pl
172 config
: $(CONFIG
)/conf
174 -cp .config .config.
test
175 @
$(CONFIG
)/conf
$(CONFIG_CONFIG_IN
)
176 -.
/scripts
/configtest.pl
178 oldconfig
: $(CONFIG
)/conf
180 -cp .config .config.
test
181 @
$(CONFIG
)/conf
-o
$(CONFIG_CONFIG_IN
)
182 -.
/scripts
/configtest.pl
184 randconfig
: $(CONFIG
)/conf
186 -cp .config .config.
test
187 @
$(CONFIG
)/conf
-r
$(CONFIG_CONFIG_IN
)
188 -.
/scripts
/configtest.pl
190 allyesconfig
: $(CONFIG
)/conf
191 #@$(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
192 #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config
194 -cp .config .config.
test
195 @
$(CONFIG
)/conf
-o
$(CONFIG_CONFIG_IN
)
196 -.
/scripts
/configtest.pl
198 allnoconfig
: $(CONFIG
)/conf
200 -cp .config .config.
test
201 @
$(CONFIG
)/conf
-n
$(CONFIG_CONFIG_IN
)
202 -.
/scripts
/configtest.pl
204 defconfig
: $(CONFIG
)/conf
206 -cp .config .config.
test
207 @
$(CONFIG
)/conf
-d
$(CONFIG_CONFIG_IN
)
208 -.
/scripts
/configtest.pl
210 endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
212 .PHONY
: dummy subdirs release
distclean clean config oldconfig \
213 menuconfig
tags check test depend