Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. TOPDIR:=${CURDIR}
  9. LC_ALL:=C
  10. LANG:=C
  11. IS_TTY:=${shell tty -s && echo 1 || echo 0}
  12. export TOPDIR LC_ALL LANG IS_TTY
  13. world:
  14. include $(TOPDIR)/include/debug.mk
  15. include $(TOPDIR)/include/host.mk
  16. ifneq ($(OPENWRT_BUILD),1)
  17. override OPENWRT_BUILD=1
  18. export OPENWRT_BUILD
  19. include $(TOPDIR)/include/toplevel.mk
  20. else
  21. include rules.mk
  22. include $(INCLUDE_DIR)/depends.mk
  23. include $(INCLUDE_DIR)/subdir.mk
  24. include $(INCLUDE_DIR)/target.mk
  25. include target/Makefile
  26. include package/Makefile
  27. include tools/Makefile
  28. include toolchain/Makefile
  29. $(toolchain/stamp-compile): $(tools/stamp-compile)
  30. $(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install)
  31. $(package/stamp-compile): $(target/stamp-compile)
  32. $(target/stamp-install): $(package/stamp-compile) $(package/stamp-install)
  33. clean: FORCE
  34. rm -rf build_* bin tmp
  35. dirclean: clean
  36. rm -rf staging_dir_* toolchain_build_* tool_build
  37. distclean: dirclean
  38. rm -rf dl .config*
  39. # check prerequisites before starting to build
  40. prereq: $(package/stamp-prereq) $(target/stamp-prereq) ;
  41. world: .config $(tools/stamp-install) $(toolchain/stamp-install) $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare) $(target/stamp-install) FORCE
  42. $(MAKE) package/index
  43. package/symlinks:
  44. $(SCRIPT_DIR)/feeds.sh $(CONFIG_SOURCE_FEEDS) $(CONFIG_SOURCE_FEEDS_REV)
  45. endif