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.
16 IS_TTY:=${shell tty -s && echo 1 || echo 0}
17 export TOPDIR LC_ALL LANG IS_TTY
21 ifneq ($(OPENWRT_BUILD),1)
22 export OPENWRT_BUILD:=1
23 include $(INCLUDE_DIR)/toplevel.mk
25 include $(INCLUDE_DIR)/depends.mk
26 include $(INCLUDE_DIR)/subdir.mk
27 include tools/Makefile
30 rm -rf build_* bin tmp
33 rm -rf staging_dir_* toolchain_build_* tool_build
35 distclean: dirclean config-clean symlinkclean docs/clean
38 toolchain/% package/% target/%: FORCE
39 $(MAKE) -C $(patsubst %/$*,%,$@) $*
41 world: .config $(tools/stamp) FORCE
42 $(MAKE) toolchain/install
43 $(MAKE) target/compile
44 $(MAKE) package/compile
45 $(MAKE) package/install
46 $(MAKE) target/install