3 # Copyright (C) 2007 OpenWrt.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
12 IS_TTY
:=${shell tty
-s
&& echo
1 || echo
0}
13 export TOPDIR LC_ALL LANG IS_TTY
17 include $(TOPDIR
)/include/host.mk
19 ifneq ($(OPENWRT_BUILD
),1)
20 override OPENWRT_BUILD
=1
22 include $(TOPDIR
)/include/debug.mk
23 include $(TOPDIR
)/include/depends.mk
24 include $(TOPDIR
)/include/toplevel.mk
27 include $(INCLUDE_DIR
)/depends.mk
28 include $(INCLUDE_DIR
)/subdir.mk
29 include target
/Makefile
30 include package
/Makefile
31 include tools
/Makefile
32 include toolchain
/Makefile
34 $(toolchain
/stamp-compile
): $(tools
/stamp-compile
)
35 $(target
/stamp-compile
): $(toolchain
/stamp-install
) $(tools
/stamp-install
) $(BUILD_DIR
)/.prepared
36 $(package
/stamp-compile
): $(target
/stamp-compile
)
37 $(target
/stamp-install
): $(package
/stamp-compile
) $(package
/stamp-install
)
39 $(BUILD_DIR
)/.prepared
: Makefile
40 @mkdir
-p
$$(dirname
$@
)
44 rm -rf
$(BUILD_DIR
) $(BIN_DIR
)
45 $(MAKE
) target
/linux
/clean
49 rm -rf
$(STAGING_DIR
) $(STAGING_DIR_HOST
) $(STAGING_DIR_TOOLCHAIN
) $(TOOLCHAIN_DIR
) $(BUILD_DIR_HOST
)
51 # check prerequisites before starting to build
52 prereq
: $(package
/stamp-prereq
) $(target
/stamp-prereq
) ;
54 prepare
: .config
$(tools
/stamp-install
) $(toolchain
/stamp-install
)
55 world
: prepare
$(target
/stamp-compile
) $(package
/stamp-cleanup
) $(package
/stamp-compile
) $(package
/stamp-install
) $(package
/stamp-rootfs-prepare
) $(target
/stamp-install
) FORCE
59 $(SCRIPT_DIR
)/feeds.sh
$(CONFIG_SOURCE_FEEDS
) $(CONFIG_SOURCE_FEEDS_REV
)
61 .PHONY
: clean dirclean prereq prepare world package
/symlinks