Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 genext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline pkg-config automake $(if $(CONFIG_CCACHE),ccache) bison $(if $(CONFIG_powerpc),dtc) lua quilt autoconf
  12. # builddir dependencies
  13. $(curdir)/squashfs/compile := $(curdir)/lzma/install
  14. # preparatory work
  15. $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
  16. @for dir in $(STAGING_DIR) $(STAGING_DIR_HOST); do ( \
  17. set -x; \
  18. mkdir -p "$$dir"; \
  19. cd "$$dir"; \
  20. mkdir -p bin lib include stamp; \
  21. ); done
  22. mkdir -p $(BUILD_DIR_HOST)/stamp $(BUILD_DIR)/stamp
  23. $(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/
  24. touch $@
  25. $(STAGING_DIR_HOST)/bin/find:
  26. [ -x "$(FIND)" ] && ln -sf "$(FIND)" $@
  27. $(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/find
  28. $(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/find
  29. # prerequisites for the individual targets
  30. $(curdir)/ := .config prereq
  31. $(curdir)//install = $(1)/compile
  32. $(eval $(call stampfile,$(curdir),tools,install))
  33. $(eval $(call subdir,$(curdir)))