make madwifi startup script aware of new iwpriv options
[openwrt_comio.git] / Makefile
blob77660bb8d7e11ed8d8dababd146ea6759a1bcce9
1 # Makefile for OpenWrt
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.
9 TOPDIR:=${CURDIR}
10 LC_ALL:=C
11 LANG:=C
12 export TOPDIR LC_ALL LANG
14 world:
16 include $(TOPDIR)/include/host.mk
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
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 $@)
43 @touch $@
45 clean: FORCE
46 rm -rf $(BUILD_DIR) $(BIN_DIR)
47 $(MAKE) target/linux/clean
49 dirclean: clean
50 rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST)
51 rm -rf $(TMP_DIR)
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
58 $(MAKE) package/index
60 package/symlinks:
61 $(SCRIPT_DIR)/feeds update
62 cd package; ln -sf ../feeds/packages openwrt-packages
64 .PHONY: clean dirclean prereq prepare world package/symlinks
66 endif