Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. # Main makefile for the host tools
  8. #
  9. include $(TOPDIR)/rules.mk
  10. TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils
  11. TARGETS-$(CONFIG_CCACHE) += ccache
  12. TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
  13. TARGETS_PREPARE:=$(patsubst %,%-prepare,$(TARGETS-y))
  14. TARGETS_COMPILE:=$(patsubst %,%-compile,$(TARGETS-y))
  15. TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
  16. TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
  17. STAMP:=$(STAGING_DIR)/stampfiles/.tools_installed
  18. all: install
  19. download: $(TARGETS_DOWNLOAD)
  20. compile: $(TARGETS_COMPILE)
  21. install: $(STAMP)
  22. clean: $(TARGETS_CLEAN)
  23. squashfs-compile: lzma-install
  24. ifneq ($(shell $(SCRIPT_DIR)/timestamp.pl -p . $(STAMP)),$(STAMP))
  25. $(STAMP): $(TARGETS_INSTALL)
  26. endif
  27. $(STAMP): $(TOPDIR)/.config
  28. mkdir -p $(shell dirname $@)
  29. touch $@
  30. $(STAGING_DIR)/include-host:
  31. @mkdir -p $@
  32. @$(CP) ./include/*.h $@/
  33. $(TOOL_BUILD_DIR):
  34. @mkdir -p $@
  35. $(eval $(call default_subtargets,$(STAGING_DIR)/include-host $(TOOL_BUILD_DIR)))
  36. ifeq ($(MAKECMDGOALS),install-targets)
  37. MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
  38. else
  39. .NOTPARALLEL:
  40. endif