Makefile 1015 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. all: world
  9. TOPDIR:=${CURDIR}
  10. LC_ALL:=C
  11. LANG:=C
  12. IS_TTY:=${shell tty -s && echo 1 || echo 0}
  13. export TOPDIR LC_ALL LANG IS_TTY
  14. ifneq ($(OPENWRT_BUILD),1)
  15. export OPENWRT_BUILD:=1
  16. include $(TOPDIR)/include/toplevel.mk
  17. else
  18. include $(TOPDIR)/include/host.mk
  19. include rules.mk
  20. include $(INCLUDE_DIR)/depends.mk
  21. include $(INCLUDE_DIR)/subdir.mk
  22. include tools/Makefile
  23. include toolchain/Makefile
  24. clean: FORCE
  25. rm -rf build_* bin tmp
  26. dirclean: clean
  27. rm -rf staging_dir_* toolchain_build_* tool_build
  28. distclean: dirclean config-clean symlinkclean docs/clean
  29. rm -rf dl
  30. toolchain/% package/% target/%: FORCE
  31. $(MAKE) -C $(patsubst %/$*,%,$@) $*
  32. world: .config $(tools/stamp) $(toolchain/stamp) FORCE
  33. $(MAKE) target/compile
  34. $(MAKE) package/compile
  35. $(MAKE) package/install
  36. $(MAKE) target/install
  37. $(MAKE) package/index
  38. endif