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 #--------------------------------------------------------------
19 include $(TOPDIR)/include/verbose.mk
21 OPENWRTVERSION:=$(RELEASE)
23 OPENWRTVERSION:=$(VERSION) ($(OPENWRTVERSION))
25 REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
27 OPENWRTVERSION:=$(OPENWRTVERSION)/r$(REV)
35 ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo)
36 @echo Collecting package info...
37 @-for dir in package/*/; do \
38 echo Source-Makefile: $${dir}Makefile; \
39 $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \
44 ./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@
47 -rm -f .pkginfo .config.in
49 ./scripts/config/mconf: .config.in
50 $(MAKE) -C scripts/config all
52 ./scripts/config/conf: .config.in
53 $(MAKE) -C scripts/config conf
55 config: ./scripts/config/conf FORCE
58 defconfig: ./scripts/config/conf FORCE
60 $< -D .config Config.in
62 oldconfig: ./scripts/config/conf FORCE
65 menuconfig: ./scripts/config/mconf FORCE
69 $(MAKE) -C scripts/config clean
71 package/%: .pkginfo FORCE
72 $(MAKE) -C package $(patsubst package/%,%,$@)
74 target/%: .pkginfo FORCE
75 $(MAKE) -C target $(patsubst target/%,%,$@)
78 $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
80 .config: ./scripts/config/conf FORCE
81 @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig
82 $< -D .config Config.in >/dev/null 2>/dev/null
84 download: .config FORCE
85 $(MAKE) toolchain/download
86 $(MAKE) package/download
87 $(MAKE) target/download
90 $(MAKE) toolchain/install
91 $(MAKE) target/compile
92 $(MAKE) package/compile
93 $(MAKE) package/install
94 $(MAKE) target/install
100 rm -rf staging_dir_* toolchain_build_*
102 distclean: dirclean config-clean
103 rm -rf dl .*config* .pkg*