Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
  12. TARGETS_PREPARE:=$(patsubst %,%-prepare,$(TARGETS-y))
  13. TARGETS_COMPILE:=$(patsubst %,%-compile,$(TARGETS-y))
  14. TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
  15. TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
  16. STAMP:=$(STAGING_DIR)/stampfiles/.tools_installed
  17. all: install
  18. download: $(TARGETS_DOWNLOAD)
  19. compile: $(TARGETS_COMPILE)
  20. install: $(STAMP)
  21. clean: $(TARGETS_CLEAN)
  22. squashfs-compile: lzma-install
  23. ifneq ($(shell $(SCRIPT_DIR)/timestamp.pl -p . $(STAMP)),$(STAMP))
  24. $(STAMP): $(TARGETS_INSTALL)
  25. endif
  26. $(STAMP):
  27. mkdir -p $(shell dirname $@)
  28. touch $@
  29. $(STAGING_DIR)/include-host:
  30. @mkdir -p $@
  31. @$(CP) ./include/*.h $@/
  32. $(TOOL_BUILD_DIR):
  33. @mkdir -p $@
  34. $(eval $(call default_subtargets,$(STAGING_DIR)/include-host $(TOOL_BUILD_DIR)))
  35. ifeq ($(MAKECMDGOALS),install-targets)
  36. MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
  37. else
  38. .NOTPARALLEL:
  39. endif