Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/target.mk
  9. all: install
  10. $(BIN_DIR):
  11. mkdir -p $(BIN_DIR)
  12. linux-install: $(BIN_DIR)
  13. image_install: linux-install
  14. IMAGE_DIR:=linux/$(BOARD)-$(KERNEL)/image
  15. download: $(patsubst %,%-download,$(TARGETS-y))
  16. prepare: linux-prepare
  17. compile: linux-compile image_compile
  18. install: linux-install image_install
  19. ifeq ($(CONFIG_SDK),y)
  20. install: sdk_install
  21. endif
  22. ifeq ($(CONFIG_IB),y)
  23. install: imagebuilder_install
  24. endif
  25. clean: linux-clean sdk-clean imagebuilder-clean image_clean
  26. prereq: FORCE
  27. $(MAKE) -C linux/$(BOARD)-$(KERNEL) prereq
  28. [ \! -f $(IMAGE_DIR)/Makefile ] || $(MAKE) -C $(IMAGE_DIR) prereq
  29. sdk_install: FORCE
  30. $(MAKE) -C sdk install
  31. image_clean: FORCE
  32. $(MAKE) -C $(IMAGE_DIR) clean
  33. rm -f $(BIN_DIR)/openwrt-*
  34. image_compile: FORCE
  35. $(MAKE) -C $(IMAGE_DIR) compile
  36. image_install: image_compile
  37. $(MAKE) -C $(IMAGE_DIR) install
  38. imagebuilder_install: image_install
  39. $(MAKE) -C imagebuilder install
  40. %-prereq %-prepare %-download %-clean %-compile %-install %-refresh %-update: FORCE
  41. $(MAKE) -C $* $(patsubst $*-%,%,$@)