Makefile 988 B

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