add b43 fixes from #2677
[openwrt.git] / Makefile
1 # Makefile for OpenWrt
2 #
3 # Copyright (C) 2007 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 TOPDIR:=${CURDIR}
10 LC_ALL:=C
11 LANG:=C
12 export TOPDIR LC_ALL LANG
13
14 world:
15
16 include $(TOPDIR)/include/host.mk
17
18 ifneq ($(OPENWRT_BUILD),1)
19 override OPENWRT_BUILD=1
20 export OPENWRT_BUILD
21 include $(TOPDIR)/include/debug.mk
22 include $(TOPDIR)/include/depends.mk
23 include $(TOPDIR)/include/toplevel.mk
24 else
25 include rules.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
32
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)
40
41 $(BUILD_DIR)/.prepared: Makefile
42 @mkdir -p $$(dirname $@)
43 @touch $@
44
45 clean: FORCE
46 rm -rf $(BUILD_DIR) $(BIN_DIR)
47 $(MAKE) target/linux/clean
48 rm -rf $(TMP_DIR)
49
50 dirclean: clean
51 rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST)
52
53 # check prerequisites before starting to build
54 prereq: $(package/stamp-prereq) $(target/stamp-prereq) ;
55
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
58 $(MAKE) package/index
59
60 package/symlinks:
61 $(SCRIPT_DIR)/feeds.sh $(CONFIG_SOURCE_FEEDS) $(CONFIG_SOURCE_FEEDS_REV)
62
63 .PHONY: clean dirclean prereq prepare world package/symlinks
64
65 endif
This page took 0.049199 seconds and 5 git commands to generate.