- REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
- ifneq ($(REV),)
- OPENWRTVERSION:=$(OPENWRTVERSION)/r$(REV)
- endif
-endif
-export OPENWRTVERSION
-
-ifeq ($(FORCE),)
- .config scripts/config/conf scripts/config/mconf: tmp/.prereq-build
- world: tmp/.prereq-package tmp/.prereq-target
-endif
-
-package/%/Makefile: ;
-target/%/Makefile: ;
-
-tmp/.packageinfo: $(wildcard package/*/Makefile include/package*.mk include/kernel.mk) FORCE
-tmp/.targetinfo: $(wildcard target/*/Makefile include/kernel*.mk) FORCE
-tmp/.%info:
- mkdir -p tmp/info
- $(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="$*info" SCAN_DIR="$(patsubst target,target/linux,$*)" SCAN_NAME="$*" SCAN_DEPS="$(filter-out FORCE, $^)" SCAN_EXTRA=""
-
-tmpinfo-clean: FORCE
- -rm -rf tmp/.*info
-
-tmp/.config-%.in: tmp/.%info
- ./scripts/metadata.pl $*_config < $< > $@ || rm -f $@
-
-.config: ./scripts/config/conf tmp/.config-target.in tmp/.config-package.in
- if [ \! -f .config ]; then \
- [ -e $(HOME)/.openwrt/defconfig ] && cp $(HOME)/.openwrt/defconfig .config; \
- $(NO_TRACE_MAKE) menuconfig; \
- fi
- $< -D .config Config.in &> /dev/null
-
-scripts/config/mconf:
- $(MAKE) -C scripts/config all
-
-scripts/config/conf:
- $(MAKE) -C scripts/config conf
-
-
-
-config: scripts/config/conf tmp/.config-target.in tmp/.config-package.in FORCE
- $< Config.in
-
-config-clean: FORCE
- $(NO_TRACE_MAKE) -C scripts/config clean
-
-defconfig: scripts/config/conf tmp/.config-target.in tmp/.config-package.in FORCE
- touch .config
- $< -D .config Config.in
+ include rules.mk
+ include $(INCLUDE_DIR)/depends.mk
+ include $(INCLUDE_DIR)/subdir.mk
+ include target/Makefile
+ include package/Makefile
+ include tools/Makefile
+ include toolchain/Makefile
+
+$(toolchain/stamp-install): $(tools/stamp-install)
+$(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install) $(BUILD_DIR)/.prepared
+$(package/stamp-cleanup): $(target/stamp-compile)
+$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
+$(package/stamp-install): $(package/stamp-compile)
+$(package/stamp-rootfs-prepare): $(package/stamp-install)
+$(target/stamp-install): $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare)
+
+printdb:
+ @true
+
+prepare: $(target/stamp-compile)