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 export TOPDIR LC_ALL LANG
16 include $(TOPDIR
)/include/host.mk
18 ifneq ($(OPENWRT_BUILD
),1)
19 override OPENWRT_BUILD
=1
21 include $(TOPDIR
)/include/debug.mk
22 include $(TOPDIR
)/include/depends.mk
23 include $(TOPDIR
)/include/toplevel.mk
26 include $(INCLUDE_DIR
)/depends.mk
27 include $(INCLUDE_DIR
)/subdir.mk
28 include target
/Makefile
29 include package
/Makefile
30 include tools
/Makefile
31 include toolchain
/Makefile
33 $(toolchain
/stamp-install
): $(tools
/stamp-install
)
34 $(target
/stamp-compile
): $(toolchain
/stamp-install
) $(tools
/stamp-install
) $(BUILD_DIR
)/.prepared
35 $(package
/stamp-cleanup
): $(target
/stamp-compile
)
36 $(package
/stamp-compile
): $(target
/stamp-compile
) $(package
/stamp-cleanup
)
37 $(package
/stamp-install
): $(package
/stamp-compile
)
38 $(package
/stamp-rootfs-prepare
): $(package
/stamp-install
)
39 $(target
/stamp-install
): $(package
/stamp-compile
) $(package
/stamp-install
) $(package
/stamp-rootfs-prepare
)
41 $(BUILD_DIR
)/.prepared
: Makefile
42 @mkdir
-p
$$(dirname
$@
)
46 rm -rf
$(BUILD_DIR
) $(BIN_DIR
)
47 $(MAKE
) target
/linux
/clean
50 rm -rf
$(STAGING_DIR
) $(STAGING_DIR_HOST
) $(STAGING_DIR_TOOLCHAIN
) $(TOOLCHAIN_DIR
) $(BUILD_DIR_HOST
)
53 # check prerequisites before starting to build
54 prereq
: $(package
/stamp-prereq
) $(target
/stamp-prereq
) ;
56 prepare
: .config
$(tools
/stamp-install
) $(toolchain
/stamp-install
)
57 world
: prepare
$(target
/stamp-compile
) $(package
/stamp-cleanup
) $(package
/stamp-compile
) $(package
/stamp-install
) $(package
/stamp-rootfs-prepare
) $(target
/stamp-install
) FORCE
61 $(SCRIPT_DIR
)/feeds.sh
$(CONFIG_SOURCE_FEEDS
) $(CONFIG_SOURCE_FEEDS_REV
)
63 .PHONY
: clean dirclean prereq prepare world package
/symlinks