3 # Copyright (C) 2006 OpenWrt.org
4 # Copyright (C) 2006 by Felix Fietkau <openwrt@nbd.name>
6 # This is free software, licensed under the GNU General Public License v2.
7 # See /LICENSE for more information.
11 #VERSION:=2.0 # uncomment for final release
13 #--------------------------------------------------------------
14 # Just run 'make menuconfig', configure stuff, then run 'make'.
15 # You shouldn't need to mess with anything beyond this point...
16 #--------------------------------------------------------------
17 export TOPDIR
=${shell pwd
}
18 include $(TOPDIR
)/include/verbose.mk
20 OPENWRTVERSION
:=$(RELEASE
)
22 OPENWRTVERSION
:=$(VERSION
) ($(OPENWRTVERSION
))
24 REV
:=$(shell LANG
=C svn
info | awk
'/^Revision:/ { print$$2 }' )
26 OPENWRTVERSION
:=$(OPENWRTVERSION
)/r
$(REV
)
33 ifneq ($(shell .
/scripts
/timestamp.pl
-p .pkginfo package Makefile
),.pkginfo
)
39 @echo Collecting package
info...
40 @
-for
dir in package
/*/; do \
41 echo Source-Makefile
: $${dir}Makefile
; \
42 $(NO_TRACE_MAKE
) --no-print-dir DUMP
=1 -C
$$dir 2>&- || echo
"ERROR: please fix package/$${dir}/Makefile" >&2; \
46 @.
/scripts
/gen_menuconfig.pl
< $< > $@ ||
rm -f
$@
49 -rm -f .pkginfo .config.in
51 .
/scripts
/config
/mconf
: .config.in
52 @
$(MAKE
) -C scripts
/config
all
54 .
/scripts
/config
/conf
: .config.in
55 @
$(MAKE
) -C scripts
/config conf
57 config
: .
/scripts
/config
/conf FORCE
60 defconfig
: .
/scripts
/config
/conf FORCE
62 $< -D .config Config.in
64 oldconfig
: .
/scripts
/config
/conf FORCE
67 menuconfig
: .
/scripts
/config
/mconf FORCE
71 $(NO_TRACE_MAKE
) -C scripts
/config
clean
73 package
/%: .pkginfo FORCE
74 $(MAKE
) -C package
$(patsubst package
/%,%,$@
)
76 target
/%: .pkginfo FORCE
77 $(MAKE
) -C target
$(patsubst target
/%,%,$@
)
80 $(MAKE
) -C toolchain
$(patsubst toolchain
/%,%,$@
)
82 .config
: .
/scripts
/config
/conf
83 @
[ -f .config
] ||
$(NO_TRACE_MAKE
) menuconfig
84 @
$< -D .config Config.in
&> /dev
/null
86 .prereq-build
: $(TOPDIR
)/include/prereq-build.mk
87 @
$(NO_TRACE_MAKE
) -s
-f
$(TOPDIR
)/include/prereq-build.mk prereq
2>/dev
/null ||
{ \
88 echo
"Prerequisite check failed. Use FORCE=1 to override."; \
93 .prereq-packages
: $(TOPDIR
)/include/prereq.mk .pkginfo .config
94 @
$(NO_TRACE_MAKE
) -s
-C package prereq
2>/dev
/null ||
{ \
95 echo
"Prerequisite check failed. Use FORCE=1 to override."; \
100 prereq
: .prereq-build .prereq-packages FORCE
102 download
: .config FORCE
103 $(MAKE
) toolchain
/download
104 $(MAKE
) package
/download
105 $(MAKE
) target
/download
108 .config .
/scripts
/config
/conf .
/scripts
/config
/mconf
: .prereq-build
109 world
: .prereq-packages
113 $(MAKE
) toolchain
/install
114 $(MAKE
) target
/compile
115 $(MAKE
) package
/compile
116 $(MAKE
) package
/install
117 $(MAKE
) target
/install
118 $(MAKE
) package
/index
124 rm -rf staging_dir_
* toolchain_build_
*
126 distclean: dirclean config-clean
127 rm -rf dl .
*config
* .pkg
* .prereq
130 .SILENT
: clean dirclean
distclean config-clean download world