Makefile 961 B

123456789101112131415161718192021222324252627282930313233
  1. #
  2. # Copyright (C) 2007 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. curdir:=tools
  10. # subdirectories to descend into
  11. $(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline $(if $(CONFIG_CCACHE),ccache)
  12. # builddir dependencies
  13. $(curdir)/squashfs/compile := $(curdir)/lzma/install
  14. # preparatory work
  15. define copy_include
  16. $(STAGING_DIR)/include-host/.done:
  17. @mkdir -p $$$$(dirname $$@)
  18. @cp $(1)/include/*.h $$$$(dirname $$@)/
  19. @touch $$@
  20. $(curdir)//prepare = $(STAGING_DIR)/include-host/.done
  21. $(curdir)//compile = $(STAGING_DIR)/include-host/.done
  22. endef
  23. $(eval $(call copy_include,$(curdir)))
  24. # prerequisites for the individual targets
  25. $(curdir)/ := .config prereq
  26. $(curdir)//install = $(1)/compile
  27. $(eval $(call stampfile,$(curdir),tools,install))
  28. $(eval $(call subdir,$(curdir)))